{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact_mail" .context.Params.contact_mail "covid" .context.Params.covid "insta" .context.Params.insta }} {{ $banner := slice }} {{ $image := slice }} {{ $thumb := "" }} {{ if .context.Resources.GetMatch "banner*" }} {{ $banner = slice (.context.Resources.GetMatch "banner*") }} {{ end }} {{ if .context.Resources.ByType "image" }} {{ $image = .context.Resources.ByType "image" }} {{ end }} {{ $image = (index (complement $banner $image) 0) }} {{ if $banner }} {{ $image = (index $banner 0) }} {{ end }} {{ $image = .context.Resources.GetMatch (string $image) }} {{ if ne $image nil }} {{ $thumb1 := $image.Fill "1280x480 smart"}} {{ $thumb = $image}} {{ end }} {{ $summary := "" }} {{ $content := .context.Content }} {{ if in .context.RawContent "" }} {{ $tmp := split .context.RawContent "" }} {{ $summary = index $tmp 0 | markdownify }} {{ $content = index $tmp 1 | markdownify }} {{ end }} {{ partial "snippets/article_metadata" $metas }} {{- if .context.Description -}}

{{ .context.Description }}

{{ end }} {{- if $summary -}}

{{ $summary }}

{{ end }} {{ $count_href := .context.TableOfContents | strings.Count "href" }} {{ if ge $count_href 4 }}
Inhaltsverzeichnis
{{ .context.TableOfContents }}
{{ end }} {{ if or $content (.context.Resources.ByType "image")}}
{{- if $content -}} {{- $content -}} {{ end }} {{ if .context.Resources.ByType "image" }} {{ range .context.Resources.ByType "image" }} {{ $picname := . }} {{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}}
{{ . }}
{{ . }}
{{ end }} {{ end }} {{ end }}
{{ end }} {{ if and (.comtext.Resources.GetMatch $banner) (ne .context.Params.banner false) }} {{ else if and (.context.Resources.Match "banner*") (ne .context.Params.banner false) }} {{ else if and (.context.Resources.ByType "image") (ne .context.Params.banner false) }} {{ else }} {{ end }}