2022-04-28 14:53:58 +02:00
{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact_mail" .context.Params.contact_mail "covid" .context.Params.covid "insta" .context.Params.insta }}
2022-04-10 10:36:34 +02:00
{{ if eq .type "list" }}
2022-04-09 21:34:04 +02:00
{{ $metas = dict "when" .context.Params.when "price" .context.Params.price }}
{{ end }}
2022-05-06 11:49:30 +02:00
{{ $type := .type }}
2022-04-09 21:34:04 +02:00
2022-04-11 15:45:49 +02:00
{{ $pic := "solo" }}
{{ $text := "solo" }}
2022-05-06 11:49:30 +02:00
{{ if eq $type "list" }}
{{- if and (.context.Resources.ByType "image") (.context.Content) -}}
{{ $pic = "multiple_small" }}
{{ $text = "multiple_big" }}
{{ else if and (.context.Resources.ByType "image") (not (.context.Content)) }}
{{ $pic = "multiple_medium" }}
{{ end }}
2022-04-09 21:34:04 +02:00
{{ end }}
2022-05-06 14:39:53 +02:00
{{ partial "snippets/article_metadata" $metas }}
< div class = "articleinner" >
{{ $i := .context.Resources.ByType "image" }}
{{- if .context.Content -}}
{{ if eq $type "list" }}
{{ if .context.Resources.Match "banner*" }}
< div class = "articlepicture {{ $pic }}" >
{{ range $i }}
{{ if hasPrefix .Name "banner" }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
< img src = "{{ $thumb.Permalink }}" / >
2022-05-06 11:49:30 +02:00
{{- end }}
2022-05-06 14:39:53 +02:00
{{- end }}
< / div >
{{- end }}
{{ end }}
< div class = "articletext {{ $text }}" >
{{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }}
{{ if and .context.Truncated (eq .type "list") }}
< div class = "readmore" > {{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..< / div >
2022-04-28 17:39:10 +02:00
{{ end }}
2022-05-06 14:39:53 +02:00
< / div >
{{ else }}
{{ if eq $type "article" }}
< div style = "display:flex; flex-direction: column;" >
{{ range $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
< a href = "{{ $img.Permalink }}" > < img src = "{{ $thumb.Permalink }}" / > < / a >
{{- end }}
{{- end }}
2022-05-06 11:49:30 +02:00
< / div >
2022-04-28 17:39:10 +02:00
{{ else }}
2022-05-06 14:39:53 +02:00
{{ range first 1 $i }}
{{ if not (hasPrefix .Name "banner") }}
{{ $img := . }}
{{ $thumb := $img.Resize "500x" }}
< img src = "{{ $thumb.Permalink }}" / >
2022-04-28 17:39:10 +02:00
{{- end }}
2022-05-06 14:39:53 +02:00
{{- end }}
{{ end }}
{{- end }}
< / div >
2022-04-10 02:24:33 +02:00
{{ define "pagefooter" }}
{{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }}
2022-04-12 08:26:18 +02:00
< div class = "article_footer" >
2022-04-10 13:56:50 +02:00
{{ with .Params.foundations }}
< b > Träger der Veranstaltung:< / b >
2022-04-12 08:26:18 +02:00
< div class = "article_footer_foundations1" >
2022-04-10 13:56:50 +02:00
{{ range . }}
{{ $l := . }}
2022-04-10 14:36:57 +02:00
{{ $url := "" }}
{{ if isset site.Params.foundations $l }}
{{ $url = index site.Params.foundations $l }}
{{ end }}
2022-04-28 14:53:58 +02:00
2022-04-28 18:11:33 +02:00
{{- $res_im := resources.GetMatch (printf "/images/foundations/%s*" $l ) -}}
2022-04-10 13:56:50 +02:00
{{ if $res_im }}
2022-04-11 16:56:06 +02:00
< div class = "article_footer_item1" >
{{ if $url }}< a href = "{{ $url | safeHTML }}" > {{ end }}< img src = "{{- $res_im.Permalink -}}" class = "borderrad4px article_footer_item1" / > {{ if $url }}< / a > {{ end }}
2022-04-10 13:56:50 +02:00
< / div >
2022-04-28 14:53:58 +02:00
{{ else }}
< div class = "article_footer_item1" >
2022-04-28 18:11:33 +02:00
assets/images/foundations/{{- $l -}} .* missing
2022-04-28 14:53:58 +02:00
< / div >
2022-04-10 13:56:50 +02:00
{{ end }}
{{ end }}
< / div >
{{ end }}
2022-04-12 08:26:18 +02:00
< div class = "article_footer_foundations2" >
2022-04-11 16:56:06 +02:00
< div class = "article_footer_item2" >
2022-04-11 15:45:49 +02:00
< b > {{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}< / b >
2022-04-10 13:56:50 +02:00
{{ .Date | time.Format ":date_full" }}
< / div >
{{ if ne .Date .Lastmod }}
2022-04-11 16:56:06 +02:00
< div class = "article_footer_item2" >
2022-04-11 15:45:49 +02:00
< b > {{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}< / b >
2022-04-10 13:56:50 +02:00
{{ .Lastmod | time.Format ":date_full" }}
< / div >
{{ end }}
< / div >
2022-04-10 02:24:33 +02:00
< / div >
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
2022-05-06 11:49:30 +02:00
< aside id = "sidebar" >
2022-05-06 15:18:31 +02:00
< h3 class = "align_menu" > {{ if i18n "categories" }}{{ i18n "categories" }}{{ else }}{{ "Categories" }}{{ end }}< / h3 >
2022-05-06 11:49:30 +02:00
{{ range .Params.categories }}
< div class = "align_menu" > < a href = "{{ " / categories / " | relLangURL } } { { . | urlize } } " > {{ . }}< / a > < / div >
{{ end }}
{{ if .Params.events }}
{{ range .Params.events }}
< div class = "align_menu" > < a href = "{{ " / events / " | relLangURL } } { { . | urlize } } " > {{ . }}< / a > < / div >
{{ end }}
{{ end }}
{{ if .Params.tags }}
< h3 class = "align_menu" > < a href = "{{ " / tags / " | relLangURL } } " > {{ if i18n "tags" }}{{ i18n "tags" }}{{ else }}{{ "Tags" }}{{ end }}< / a > < / h3 >
{{ range .Params.tags }}
< div class = "align_menu" > < a href = "{{ " / tags / " | relLangURL } } { { . | urlize } } " > {{ . }}< / a > < / div >
{{ end }}
{{ end }}
< / aside >
{{ end }}
2022-04-10 02:24:33 +02:00
{{ end }}