26 lines
913 B
HTML

<div class="bento-grid">
{{ range $index, $element := .Pages }}
{{ $size := index (slice "size-1" "size-2" "size-3" "size-4" "size-5") (mod $index 5) }}
<article class="bento-item {{ $size }}" style="--order: {{ $index }}">
<a href="{{ .Permalink }}" class="bento-link">
{{ if .Params.image }}
<div class="bento-image">
<img src="{{ .Params.image }}" alt="{{ .Title }}">
</div>
{{ end }}
<div class="bento-content">
<h2>{{ .Title }}</h2>
{{ with .Params.categories }}
<div class="post-meta">
{{ range . }}
<span class="category">{{ . }}</span>
{{ end }}
</div>
{{ end }}
<p>{{ .Summary }}</p>
</div>
</a>
</article>
{{ end }}
</div>