diff options
Diffstat (limited to 'themes/cranky/layouts/photography/list.html')
-rw-r--r-- | themes/cranky/layouts/photography/list.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/themes/cranky/layouts/photography/list.html b/themes/cranky/layouts/photography/list.html new file mode 100644 index 0000000..77a4a24 --- /dev/null +++ b/themes/cranky/layouts/photography/list.html @@ -0,0 +1,16 @@ +{{ define "title" -}} {{ .Title | title }} {{- end }} {{ define "main" -}} {{ +.Content }} +<!-- Match all files in the gallery folder which are images --> +<div class="photo-gallery"> + {{- range sort (resources.Match "images/gallery/*") "Name" "desc" -}} {{ + $image := . }} {{ $small := $image.Resize "300x webp" }} + <a href="{{ .RelPermalink }}" class="photo-item"> + <img + src="{{ $small.RelPermalink }}" + alt="{{ $image.Name }}" + loading="lazy" + /> + </a> + {{ end -}} +</div> +{{- end }} |