diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index ef3708d..8f1b5f6 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -7,12 +7,7 @@ {{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $lookback := time.ParseDuration "-6h" }} {{- $upcoming := where $events ".Params.date" "ge" (time.Now.Add $lookback) }} - - {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} - {{- $articleDisplayTime := time.ParseDuration "-126h" }} - {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} - - {{ if or $upcoming $articleNew }} + {{ if $upcoming }}

Neuigkeiten

{{- range $upcoming.ByDate }} @@ -29,8 +24,16 @@ {{- end }}
{{- end }} + + {{- end }} - {{- range $articleNew.ByDate.Reverse }} + {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} + {{- $articleDisplayTime := time.ParseDuration "-30h" }} + {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} + {{ if $articleNew }} +
+

Neuigkeiten

+ {{- range $articleNew.ByDate }}
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }} diff --git a/themes/ccchh/layouts/partials/blog-header.html b/themes/ccchh/layouts/partials/blog-header.html index 05edaf5..eef7cba 100644 --- a/themes/ccchh/layouts/partials/blog-header.html +++ b/themes/ccchh/layouts/partials/blog-header.html @@ -14,12 +14,7 @@ {{- end }}
- {{- if (eq .Params.categories "event") }} {{ .Date | time.Format "Mon, 2006-01-02 15:04" }} - {{- else }} - {{ .Date | time.Format "2006-01-02" }} - {{- end }} - {{- if (eq .Params.categories "event") }} {{- with .Params.location }} @@ -30,7 +25,6 @@ {{- end -}} {{- end }} - {{- end }} {{- if $showTags }} {{- with .Page.GetTerms "tags" }}