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 }}
<div class="postlist gridView">
{{ range (sort $showcasePosts "File.LogicalName") }} {{ range (sort $showcasePosts "File.LogicalName") }}
{{ if in .Dir .Site.Params.showcaseDir }} {{ if in .File.Dir .Site.Params.showcaseDir }}
<div class="showcaseCard {{if .Site.Params.discreteCards }}discrete{{ end }}"> <article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
<div> <div>
<h1>{{ .Title }}</h1> <h2>{{ .Title }}</h2>
<div>{{ .Content }}</div>
</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 }}