{{ define "banner" }} {{ $image := "" }} {{ $banner := "banner*" }} {{ if .Resources.GetMatch $banner }} {{ $image = .Resources.GetMatch $banner }} {{ end }} {{ $title := .Title }} {{ if .Params.events }} {{ $cat := index .Params.events 0 }} {{ $title = printf "%s: %s" $cat $title }} {{ end }} {{ partial "snippets/banner_new" (dict "context" . "image" $image "title" $title "section" .Section) }} {{ end }} {{ define "content" }}
{{ $metas := dict "when" .Params.when "price" .Params.price "contact_mail" .Params.contact_mail "covid" .Params.covid "insta" .Params.insta }} {{ $banner := slice }} {{ $image := slice }} {{ $thumb := "" }} {{ if .Resources.GetMatch "banner*" }} {{ $banner = slice (.Resources.GetMatch "banner*") }} {{ end }} {{ if .Resources.ByType "image" }} {{ $image = .Resources.ByType "image" }} {{ end }} {{ $image = (index (complement $banner $image) 0) }} {{ if $banner }} {{ $image = (index $banner 0) }} {{ end }} {{ $image = .Resources.GetMatch (string $image) }} {{ if ne $image nil }} {{ $thumb1 := $image.Fill "1280x480 smart"}} {{ $thumb = $image}} {{ end }} {{ partial "snippets/article_metadata" $metas }} {{- if .Description -}}

{{ .Description }}

{{ end }} {{ $count_href := .TableOfContents | strings.Count "href" }} {{ if ge $count_href 4 }}
Inhaltsverzeichnis
{{ .TableOfContents }}
{{ end }} {{ $content := .Content }} {{ if or .Content (.Resources.ByType "image")}}
{{- if .Content -}} {{- $content -}} {{ end }} {{ $ignore := slice (.Page.Resources.GetMatch "banner*") }} {{ $i := .Page.Resources }} {{ $files := complement $ignore $i }} {{ if $files }}

Addendum

{{ range $files }} {{ if not (in $content .) }} {{ if eq .MediaType.MainType "image" }} {{ $picname := . }} {{ . }}
{{ else }} {{ $fname := . }}
🗀 {{ $fname }}
{{ end }} {{ end }} {{ end }} {{ end }}
{{ end }}
{{ end }} {{ define "sidebar" }} {{ end }} {{ define "inner_footer" }}
{{ with .Params.foundations }}
Träger der Veranstaltung:
{{ range . }} {{ $l := . }} {{ $url := "" }} {{ if isset site.Params.foundations $l }} {{ $url = index site.Params.foundations $l }} {{ end }} {{- $res_im := resources.GetMatch (printf "/images/foundations/%s*" $l ) -}} {{ if $res_im }}
{{ if $url }}{{ end }} {{ if $url }}{{ end }}
{{ else }} {{ if eq hugo.Environment "development" }}
assets/images/foundations/{{- $l -}} .* missing
{{ else }} picture missing. {{ end }} {{ end }} {{ end }}
{{ end }} {{ partial "snippets/share" . }}
{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}:
{{ .Date | time.Format ":date_full" }}
{{ if ne .Date .Lastmod }}
{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}:
{{ .Lastmod | time.Format ":date_full" }}
{{ end }}
{{ end }}