From da5da9fd62157da1bf00142c1c2a40f0f5ad25e6 Mon Sep 17 00:00:00 2001 From: jtbx Date: Mon, 8 Jun 2026 22:00:24 +0200 Subject: [PATCH 1/3] Theme: Display articles for 5 days (+6 hours) --- themes/ccchh/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index 8f1b5f6..c75d145 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -28,7 +28,7 @@ {{- end }} {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} - {{- $articleDisplayTime := time.ParseDuration "-30h" }} + {{- $articleDisplayTime := time.ParseDuration "-126h" }} {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} {{ if $articleNew }}
From c43009bbb3cdefccb1e67eb835dcebb87a68bdf2 Mon Sep 17 00:00:00 2001 From: jtbx Date: Mon, 8 Jun 2026 21:58:04 +0200 Subject: [PATCH 2/3] Theme: Fix doubled "Neuigkeiten" heading --- themes/ccchh/layouts/index.html | 15 ++++++--------- themes/ccchh/layouts/partials/blog-header.html | 6 ++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index c75d145..5963234 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -7,7 +7,12 @@ {{- $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 }} + + {{- $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 }}

Neuigkeiten

{{- range $upcoming.ByDate }} @@ -24,15 +29,7 @@ {{- end }}
{{- end }} -
- {{- end }} - {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} - {{- $articleDisplayTime := time.ParseDuration "-126h" }} - {{- $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 eef7cba..05edaf5 100644 --- a/themes/ccchh/layouts/partials/blog-header.html +++ b/themes/ccchh/layouts/partials/blog-header.html @@ -14,7 +14,12 @@ {{- 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 }} @@ -25,6 +30,7 @@ {{- end -}} {{- end }} + {{- end }} {{- if $showTags }} {{- with .Page.GetTerms "tags" }} From 3df895f73461bc0081bd787d1a7ec61f73990145 Mon Sep 17 00:00:00 2001 From: jtbx Date: Thu, 11 Jun 2026 22:12:25 +0200 Subject: [PATCH 3/3] Theme: Reverse article order on start page articles are in the past, so sorting them in descending order will result in the most recent being the first item. --- themes/ccchh/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index 5963234..ef3708d 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -30,7 +30,7 @@
{{- end }} - {{- range $articleNew.ByDate }} + {{- range $articleNew.ByDate.Reverse }}
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}