Text zu jedem Bild nach der Originalseite definiert. Erscheint bei Maus hover

This commit is contained in:
Michael Stangl
2026-08-27 09:40:17 +02:00
parent 7f376b4269
commit 5a2a7fd8e0
4 changed files with 61 additions and 30 deletions
+8 -2
View File
@@ -15,8 +15,14 @@
<button type="button" class="slider-arrow slider-prev" aria-label="Zurück">&#10094;</button>
<div class="slider-track">
{{ range $i, $img := . }}
<a href="{{ $img }}" target="_blank" rel="noopener" class="slider-slide lightbox-trigger">
<img src="{{ $img }}" alt="{{ $.Title }} – Foto {{ add $i 1 }}" loading="lazy">
{{ $src := $img }}
{{ $titel := printf "%s – Foto %d" $.Title (add $i 1) }}
{{ if reflect.IsMap $img }}
{{ $src = $img.bild }}
{{ with $img.titel }}{{ $titel = . }}{{ end }}
{{ end }}
<a href="{{ $src }}" target="_blank" rel="noopener" class="slider-slide lightbox-trigger">
<img src="{{ $src }}" alt="{{ $titel }}" title="{{ $titel }}" loading="lazy">
</a>
{{ end }}
</div>