{{ define "title" }} {{ end }} {{ define "main" }} {{ $s := .Site.Params }} {{ $meta := false }} {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }} {{- $paginator := slice -}} {{- $paginator = .Paginate $posts.ByDate.Reverse -}} {{ if eq $paginator.PageNumber 1 }} {{ if ne .Content "" }}
{{ .Content }}
{{ end }} {{ $meta := false }} {{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "=" true) }} {{ $article_age := sub now.Unix (int .Date.Unix) }} {{ if lt $article_age "1209600" }}

{{- .Title -}}

featured
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
{{ .Params.when }}
{{ end }} {{ if and (ne .Params.price "") (ne .Params.price nil) }} {{ if eq .Params.price "free" }}
Der Eintritt ist frei.
{{ else }}
Eintritt: {{ .Params.price }}
{{ end }} {{ end }}
{{- if .Resources.ByType "image" -}} {{- $pic := index (.Resources.ByType "image") 0 -}} {{ $thumb := "" }} {{ if eq .Content "" }}
{{- $thumb = $pic.Resize "1024x" }} {{ else }}
{{- $thumb = $pic.Resize "2048x" }} {{ end }}
{{- end }}
{{- if .Params.description -}} {{- .Params.description -}} {{- else -}} {{- .Summary -}} {{- end }} {{ if .Truncated }}
{{- i18n "readmore" -}}..
{{ end }}
{{ end }} {{ end }} {{ end }} {{- range first 5 $paginator.Pages -}} {{ $article_age := sub now.Unix (int .Date.Unix) }} {{ if or (ne .Params.featured true) (ge $article_age "1209600") }}

{{- .Title -}}

{{ if and (ne .Params.when "") (ne .Params.when nil) }}
{{ .Params.when }}
{{ end }} {{ if and (ne .Params.price "") (ne .Params.price nil) }} {{ if eq .Params.price "free" }}
Der Eintritt ist frei.
{{ else }}
Eintritt: {{ .Params.price }}
{{ end }} {{ end }}
{{- if .Resources.ByType "image" -}} {{- $pic := index (.Resources.ByType "image") 0 -}} {{ $thumb := "" }} {{ if eq .Content "" }}
{{- $thumb = $pic.Resize "1024x" }} {{ else }}
{{- $thumb = $pic.Resize "2048x" }} {{ end }}
{{- end }}
{{- if .Params.description -}} {{- .Params.description -}} {{- else -}} {{- .Summary -}} {{- end }} {{ if .Truncated }}
{{- i18n "readmore" -}}..
{{ end }}
{{ end }} {{- end }} {{ end }} {{ define "sidebar" }} {{- partial "structure/sidebar" . }} {{ end }}