add caption on slideshow and lightbox

This commit is contained in:
2024-02-07 21:32:54 +01:00
parent 30f01d96ec
commit c3935f1924
3 changed files with 42 additions and 16 deletions

View File

@@ -3,7 +3,10 @@
<div class="snap-slideshow" id="snap-slideshow-{{ $galno }}" style="--columns:1;--min-width:0px;--gap:0px;--slideshow-width:{{ default "100%" .width }};--cursor:{{ .cursor }};--aspectratio:{{ safeCSS (default "16/10" .aspectratio) }};">
{{- range $i, $img := $imgs }}
<div class="snap-image">
<div class="numbertext">{{ add $i 1 }} / {{ len $imgs }}</div>
<div class="snap-numbertext">{{ add $i 1 }} / {{ len $imgs }}</div>
{{- with $img.html.title }}
<div class="snap-caption">{{ . }}</div>
{{- end }}
<img
src="{{ relURL $img.src }}"
{{ range $attr, $value := $img.html -}}