Vorschau auf der ersten Seite war kaputt. Jetzt Text und Bild paarweise wieder durchgehen

This commit is contained in:
Michael Stangl
2026-08-27 09:44:22 +02:00
parent 5a2a7fd8e0
commit f29c1ad29a
+4 -1
View File
@@ -54,7 +54,10 @@
{{ range $page := $pages }}
<div class="fewo-card">
{{ $vorschau := $page.Params.vorschau }}
{{ if and (not $vorschau) $page.Params.bilder }}{{ $vorschau = index $page.Params.bilder 0 }}{{ end }}
{{ if and (not $vorschau) $page.Params.bilder }}
{{ $erstes := index $page.Params.bilder 0 }}
{{ $vorschau = cond (reflect.IsMap $erstes) $erstes.bild $erstes }}
{{ end }}
{{ with $vorschau }}
<a href="{{ $page.RelPermalink }}" class="fewo-card-imglink">
<img src="{{ . }}" alt="{{ $page.Title }}" class="fewo-card-img" loading="lazy">