diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2023-11-14 17:14:20 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2023-11-14 17:14:20 -0500 |
commit | 81618e8bb6f00b3b74c30c1cc75a782cf266efd6 (patch) | |
tree | 3c2e85db1c401471004e5ca1241fa54e707c989f /themes/cranky/layouts/photography |
initial commit
Diffstat (limited to 'themes/cranky/layouts/photography')
-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 }} |