reformatted showcase view as grid postlist

This commit is contained in:
Gabriele Musco 2021-07-06 23:12:27 +02:00
parent 3176229a6b
commit 35cdd183eb
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 14 additions and 37 deletions

View File

@ -868,28 +868,3 @@ header.jumbotronContainer {
} }
} }
{{ end }} {{ end }}
.showcaseCard {
@extend article;
@extend .card;
margin-bottom: 24px;
display: flex;
flex-direction: row-reverse;
flex-wrap: wrap;
justify-content: center;
padding: 12px !important;
> img {
flex-basis: 30%;
width: 300px;
height: 250px;
object-fit: cover;
margin: 12px;
{{ if eq .Site.Params.navtype "circles" }}
border-radius: $border_radius;
{{ end }}
}
> div {
flex-basis: 60%;
}
}

View File

@ -1,17 +1,19 @@
{{ if .Site.Params.showcaseDir }} {{ if .Site.Params.showcaseDir }}
{{ $showcasePosts := where site.RegularPages "Section" "in" .Site.Params.showcaseDir }} {{ $showcasePosts := where site.RegularPages "Section" "in" .Site.Params.showcaseDir }}
{{ range (sort $showcasePosts "File.LogicalName") }} <div class="postlist gridView">
{{ if in .Dir .Site.Params.showcaseDir }} {{ range (sort $showcasePosts "File.LogicalName") }}
<div class="showcaseCard {{if .Site.Params.discreteCards }}discrete{{ end }}"> {{ if in .File.Dir .Site.Params.showcaseDir }}
<div> <article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<h1>{{ .Title }}</h1> <div>
<div>{{ .Content }}</div> <h2>{{ .Title }}</h2>
</div> {{ if .Params.image }}
{{ if .Params.image }} <img src="{{ .Params.image }}" />
<img src="{{ .Params.image }}" /> {{ end }}
{{ end }} <div>{{ .Content }}</div>
</div> </div>
</article>
{{ end }}
{{ end }} {{ end }}
{{ end }} </div>
<hr /> <hr />
{{ end }} {{ end }}