birdsounds.media/layouts/partials/albums-list.html
a 9aa43df629 First commit
The basic parts of the layouts/theme should work. I have only populated 2 albums so far.
2024-05-17 21:14:05 -05:00

32 lines
791 B
HTML

<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>