{{ define "main" }}
{{ .Content }}
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $lookback := time.ParseDuration "-6h" }} {{- $upcoming := where $events ".Params.date" "ge" (time.Now.Add $lookback) }} {{ 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 }} {{- if .Truncated }}

mehr lesen

{{- 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 }}