{{ define "title" }} {{ .Title }} {{ end }} {{ define "main" }}
{{ .Content }}
{{ $s := .Site.Params }} {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }} {{- $paginator := slice -}} {{- $paginator = .Paginate $posts.ByLastmod.Reverse -}} {{- 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 }}