{{ define "main" }} {{ partial "page-title.html" . }} {{/* ==== BILDER SAMMELN (Front-Matter oder Auto-Discovery) ==== */}} {{ $photos := .Params.images }} {{ if not $photos }} {{ $slug := .Params.slug | default .File.TranslationBaseName }} {{ $cands := slice (printf "static/images/leistungen/%s1.webp" $slug) (printf "static/images/leistungen/%s2.webp" $slug) }} {{ $auto := slice }} {{ range $cands }} {{ if fileExists . }} {{ $auto = $auto | append (dict "src" (replace . "static" "") "alt" $slug ) }} {{ end }} {{ end }} {{ $photos = $auto }} {{ end }} {{/* Erstes Bild für Hero, zweites fürs Ergebnis vormerken */}} {{ $heroPhoto := cond (gt (len $photos) 0) (index $photos 0) nil }} {{ $ergebnisPhoto := cond (gt (len $photos) 1) (index $photos 1) nil }} {{ $.Scratch.Set "ergebnisPhoto" $ergebnisPhoto }} {{ with $heroPhoto }} {{ end }} {{ if .Content }} {{ .Content }} {{ with .Params.usp }} {{ range $i, $u := . }} {{ if eq (mod $i 3) 0 }} {{ else if eq (mod $i 3) 1 }} {{ else }} {{ end }} {{ $u }} {{ end }} {{ end }} {{ end }} {{ with .Params.features }} Leistungen {{ $list := . }} {{/* ===== 1. Durchlauf ===== */}} {{ range $i, $f := $list }} {{ $icon := $f.icon | default (printf "i-%d" (mod $i 5)) }} {{ if or (eq $icon "pv") (eq $icon "i-0") }} {{ else if or (eq $icon "speicher") (eq $icon "i-1") }} {{ else if or (eq $icon "lade") (eq $icon "i-2") }} {{ else if or (eq $icon "study") (eq $icon "i-3") }} {{ else }} {{ end }} {{ $f.title }} {{ with $f.text }}{{ . | $.Page.RenderString (dict "display" "inline") }}{{ end }} {{ end }} {{/* ===== 2. Durchlauf (Duplikat) ===== */}} {{ range $i, $f := $list }} {{ $icon := $f.icon | default (printf "i-%d" (mod $i 5)) }} {{ if or (eq $icon "pv") (eq $icon "i-0") }} {{ else if or (eq $icon "speicher") (eq $icon "i-1") }} {{ else if or (eq $icon "lade") (eq $icon "i-2") }} {{ else if or (eq $icon "study") (eq $icon "i-3") }} {{ else }} {{ end }} {{ $f.title }} {{ with $f.text }}{{ . | $.Page.RenderString (dict "display" "inline") }}{{ end }} {{ end }} {{ end }} {{ with .Params.outcomes }} Ergebnis & Mehrwert {{ range . }} {{ . }} {{ end }} {{ $erg := $.Scratch.Get "ergebnisPhoto" }} {{ with $erg }} {{ else }} {{ with $heroPhoto }} {{ end }} {{ end }} {{ end }} {{ $impressum := site.GetPage "page" "impressum" }} {{ $ctaEnabled := or (.Params.cta.enable) (or .Params.cta_text .Params.cta_label) }} {{ if $ctaEnabled }} {{ .Params.cta_text | default "Lassen Sie uns Ihre Vision mit unserer Expertise zur Realität machen." }} {{/* Optional: Bei Bedarf zweite Zeile aus subtitle wiederverwenden */}} {{ with .Params.subtitle }} {{ . }} {{ end }} {{ with .Params.cta_label }} ⚡{{ . }} {{ end }} {{/* Fallback/Ergänzung: direkte Kontaktwege aus Impressum */}} {{ if $impressum }} ✉️E-Mail senden 📞Anrufen {{ end }} {{ end }} {{ end }}
{{ $u }}
{{ . | $.Page.RenderString (dict "display" "inline") }}
{{ . }}