birdsounds.media/layouts/partials/photos-grid.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

21 lines
No EOL
469 B
HTML

<ul class="photos-grid">
{{ range . }}
<li>
<a href="{{ .Permalink }}">
{{ $page := . }}
{{ $alt := or .Title "image" }}
{{ with resources.GetMatch .Params.photo_asset}}
{{ $tinyw := default "480x webp Lanczos" }}
{{ $page.Scratch.Set "tiny" (.Resize $tinyw) }}
{{ $tiny := $page.Scratch.Get "tiny" }}
<img class="photo-asset" src="{{ $tiny.Permalink }}" alt="{{ $alt }}" title="{{ $alt }}">
{{ end }}
</a>
</li>
{{end}}
</ul>