summaryrefslogtreecommitdiff
path: root/themes/cranky/layouts/photography/list.html
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-11-14 17:14:20 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2023-11-14 17:14:20 -0500
commit81618e8bb6f00b3b74c30c1cc75a782cf266efd6 (patch)
tree3c2e85db1c401471004e5ca1241fa54e707c989f /themes/cranky/layouts/photography/list.html
initial commit
Diffstat (limited to 'themes/cranky/layouts/photography/list.html')
-rw-r--r--themes/cranky/layouts/photography/list.html16
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 }}