{{ define "main" }}
{{ .Content }}
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $upcoming := where $events ".Params.date" "ge" now }} {{ if $upcoming }}

Neuigkeiten

{{- range $upcoming.ByDate }}
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }} {{- if in .RawContent "" }} {{ .Summary | safeHTML }} {{- else }}

{{ .Summary | safeHTML }}

{{- end }}
{{- end }}
{{- end }} {{- $home := .Site.GetPage "/home" }} {{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }} {{- range sort $sections "File.Path" "asc" }}
{{- $hdg_id := .Title | lower | safeURL }}

{{ .Title }}

{{ .Content -}} {{- $subsec_dir := strings.TrimLeft "home/" .File.Dir }} {{- $subsec_glob := printf "%s*.md" (strings.TrimLeft "home/" .File.Dir) }} {{- $subsecs := where ($home.Resources.Match $subsec_glob) ".File.LogicalName" "!=" "index.md" }} {{- if $subsecs }}
{{- range $subsecs }} {{- $link := .Params.link }}
{{- if eq $link nil }}

{{ .Title }}

{{- else }}

{{ .Title }}

{{- end }} {{- $img_path := printf "%s%s" $subsec_dir .Params.Image }} {{- with $home.Resources.Get $img_path }} {{- end }} {{ .Content }}
{{- end }}
{{- end }} {{- with .Params.Resources }}
{{- range . }} {{- $img := $home.Resources.GetMatch (printf "*/%s" .src) }} {{- end }}
{{- end }}
{{ end }}
{{ end }}