{{ define "main" }} {{ $data := .Site.Data }} {{ if $data.homepage.slider.enable }} {{ with $data.homepage.slider }}

{{ $data.homepage.slider.title | markdownify }}

{{ range .slider_item }}

{{ .content | markdownify }}

{{ if .button.enable }} {{ .button.label }} {{ end }}
{{ end }}
{{ end }} {{ end }} {{ if $data.homepage.header_logos.enable }} {{ with $data.homepage.header_logos }}
{{ range .logos }}
{{ end }}
{{ end }} {{ end }} {{ if $data.homepage.about.enable }} {{ with $data.homepage.about }}

{{ .title | markdownify }}

{{ .content | markdownify }}
{{ if .button.enable }} {{ with .button }} {{ .label }} {{ end }} {{ end }}
{{ with .image }}
{{ end }}
{{ end }} {{ end }} {{ if $data.ausblick.enable }} {{ with $data.ausblick }} {{ partial "modal" . }} {{ end }} {{ end }} {{ if $data.homepage.blog.enable }}

{{ $data.homepage.blog.title }}

{{ if $data.ausblick.enable }} {{ with $data.ausblick }}
Angeheftet {{ .title }}
{{ range $index, $elements := where (where $.Site.RegularPages "Type" "author") "File.BaseFileName" "in" .author }} {{ if ne $index 0 }}, {{ end }} {{ if .Params.simplified }} {{ .Title }} {{ else }} {{ .Title }} {{ end }} {{ end }}

{{ .title }}

{{ .content | plainify | truncate 100 }}

{{ end }} {{ end }} {{ range first (cond $data.ausblick.enable (int $data.homepage.blog.number) (add $data.homepage.blog.number 1)) (where .Site.RegularPages "Type" "post")}}
{{ .Render "card" }}
{{ end }}
{{ end }} {{ if $data.homepage.success_banner.enable }} {{ with $data.homepage.success_banner }}
{{ range .feature_item }}
{{ with .image }} {{ end }} {{ with .icon }} {{ end }}

{{ .name | markdownify }}

{{ .content | markdownify }}
{{ end }}
{{ end }} {{ end }} {{ if $data.homepage.ganztagsangebote.enable }}

{{ $data.homepage.ganztagsangebote.title }}

{{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
{{ .Render "ganztag" }}
{{ end }}
{{ end }} {{ if $data.homepage.cta.enable }} {{ with $data.homepage.cta }}

{{ .title | markdownify }}

{{ .subtitle | markdownify }}
{{ if .button.enable }} {{ with .button }} {{ .label }} {{ end }} {{ end }}
{{ end }} {{ end }} {{ if $data.homepage.info.enable }} {{ partial "info.html" . }} {{ end }} {{ if $data.homepage.termine.enable }}

{{ $data.homepage.termine.title }}

{{ with .Site.GetPage "/termine/_index.md" }} {{ $events := slice }} {{ range .Params.events }} {{ if or (ge (.date | time.AsTime).Unix now.Unix) (and .enddate (ge (.enddate | time.AsTime).Unix now.Unix)) }} {{ $events = $events | append . }} {{ end }} {{ end }} {{ range first (int $data.homepage.termine.number) $events }} {{ partial "termin" . }} {{ end }} {{ end }}
{{ end }} {{ if $data.homepage.digitalpakt.enable }} {{ with $data.homepage.digitalpakt }} {{ end }} {{ end }} {{ if $data.homepage.footer_logos.enable }} {{ with $data.homepage.footer_logos }} {{ end }} {{ end }} {{ end }}