{{ $title := .title }} {{ $link := .link }} {{ $p := .pages }} {{ if and (.limit) (not .paginate) }} {{ $p = first .limit .pages }} {{ end }} {{ $paginator := .pages }} {{ if .paginate }} {{ $paginator = .context.Paginate $p }} {{ $p = $paginator.Pages }} {{ end }} {{ if $p }}
{{ if $title }}

{{ if $link }} {{ end }} {{ $title }} {{ if $link }} {{ end }}

{{ end }} {{ range $p }}
{{ $metas := dict "when" .Params.when "price" .Params.price }} {{ $banner := slice }} {{ $image := slice }} {{ $images := slice }} {{ if .Resources.GetMatch "banner*" }} {{ $banner = slice (.Resources.GetMatch "banner*") }} {{ end }} {{ if .Resources.ByType "image" }} {{ $image = .Resources.ByType "image" }} {{ end }} {{ $images = complement $banner $image }} {{ $image = (index (complement $banner $image) 0) }} {{ $banner = (index $banner 0) }}
{{ if $title }}

{{ else }}

{{ end }} {{ if .Params.events }} {{ index .Params.events 0 }}: {{ else if .Params.recurrent }} {{ if i18n "recurrent"}} {{ i18n "recurrent"}}: {{ else }} {{ "Recurrent"}}: {{ end }} {{ else if .Params.categories }} {{ if in .Params.categories "Buha" }} In eigener Sache: {{ end }} {{ end }} {{ .Title }} {{ if $title }}

{{ else }}{{ end }} {{ with .Resources.GetMatch $banner }} {{ $good_w := "1920"}} {{ $good_h := "550"}} {{ $b := true }} {{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }}
Banner not shown, because:
{{ if lt (int .Width) $good_w }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Width: {{ .Width }}px: too small, must be {{ $good_w -}}px in width
{{ end }} {{ else if gt (int .Width) $good_w }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Width: {{ .Width }}px: too big, must be {{ $good_w -}}px in width
{{ end }} {{ end }} {{ if lt (int .Height) $good_h }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Height: {{ .Height }}px: too small, must be {{ $good_h -}}px in height
{{ end }} {{ else if gt (int .Height) $good_h }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Height: {{ .Height }}px: too big, must be {{ $good_h -}}px in height
{{ end }} {{ end }}
{{ end }} {{ if eq $b true }} Banner Image. {{ end }} {{ end }} {{ partial "snippets/article_metadata" $metas }}
{{ if .Description }}

{{ .Description }}

{{ else if .Content }} {{ $summary := "" }} {{ if in .RawContent "" }} {{ $tmp := split .RawContent "" }} {{ index $tmp 0 | markdownify }} {{ else }} {{ if hasPrefix .Summary "

" }} {{ .Summary }} {{ else }}

{{ .Summary }}

{{ end }} {{ end }} {{ else if $image }} {{ $i := (.Resources.GetMatch $image).Permalink }} {{ end }}
{{ end }} {{ if .paginate }} {{ partial "snippets/paginator" (dict "paginator" $paginator) }} {{ end }}
{{ end }}