birdsounds.media/layouts/partials/albums-list.html

32 lines
791 B
HTML
Raw Normal View History

<ul class="albums-list">
{{ range . }}
<li>
{{ $album_title := .Title }}
{{ $album_permalink := .Permalink }}
{{ $page := . }}
<figure class="album">
{{ with resources.GetMatch .Params.featured_asset }}
{{/*
1280px (80rem) = 640
*/}}
{{ $smallw := default "640x webp Lanczos" }}
{{ $page.Scratch.Set "small" (.Resize $smallw) }}
{{ $small := $page.Scratch.Get "small" }}
<a href="{{ $album_permalink }}">
<img class="album-cover" src="{{ $small.Permalink }}" alt="{{ $album_title }}" title="{{ $album_title }}">
</a>
{{ end }}
<figcaption class="album-details">
<p class="album-title"><a href="{{ .Permalink }}">{{ .Title }}</a></p>
<p class="album-summary">{{ .Summary }}</p>
</figcaption>
</figure>
</li>
{{end}}
</ul>