{{- define "title" -}} {{- $name := .Name -}} {{- if lower $name | i18n -}} {{- $name = lower $name | i18n -}} {{- end -}} {{- $name | humanize -}} {{- end -}} {{- define "main" -}} {{- $paginator := slice -}} {{- if eq .Section "events" -}} {{- $paginator = .Paginate (where site.RegularPages.ByLastmod.Reverse ".Params.when" "ne" nil) -}} {{- else if eq .Section "news" }} {{- $paginator = .Paginate (where (where .Site.RegularPages.ByLastmod.Reverse "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.mainSections) }} {{- else -}} {{- $paginator = .Paginate .RegularPagesRecursive.ByLastmod.Reverse -}} {{- end -}} {{- range first 5 $paginator.Pages -}}

{{ if and (isset .Params "categories") (eq .Section "events") }}{{ index .Params.categories 0 }}: {{ end }}{{- .Title -}}

{{ if .Params.when }}
{{ .Params.when }}
{{ end }} {{ if ne .Params.price nil }} {{ if eq .Params.price "free" }}
Der Eintritt ist frei.
{{ else }}
Eintritt: {{ .Params.price }}
{{ end }} {{ end }} {{ if ne .Params.register nil }}
Anmeldung unter {{ .Params.register }} erwünscht
{{ end }} {{ if ne .Params.covid nil }}
Es gilt die {{ .Params.covid }} Regel
{{ end }}
{{- if ne .Section .Site.Params.hiddenfolder -}} {{- if .Resources.ByType "image" -}}
{{- $pic := index (.Resources.ByType "image") 0 -}} {{- $thumb := $pic.Resize "1024x" }}
{{- end }}
{{- if .Params.description -}} {{- .Params.description | plainify -}} {{- else -}} {{- .Summary | plainify -}} {{- end }} {{ if .Truncated }}
{{- i18n "readmore" -}}..
{{ end }}
{{- end -}}
{{- end }} {{- end -}}