From 2105eb4eebaa727e049b8ce1b73968af2e50f946 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 9b25368cd3c0601c531d6dfffa9abf00e205fe8f 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 --- .../blog/2026/2026-05-08-diday-website/index.md | 4 +--- themes/ccchh/layouts/index.html | 15 ++++++--------- themes/ccchh/layouts/partials/blog-header.html | 6 ++++++ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/content/blog/2026/2026-05-08-diday-website/index.md b/content/blog/2026/2026-05-08-diday-website/index.md index 1eb4361..1e1c267 100644 --- a/content/blog/2026/2026-05-08-diday-website/index.md +++ b/content/blog/2026/2026-05-08-diday-website/index.md @@ -2,9 +2,7 @@ categories: article title: 'DIDAY.org mit Unterstützung des CCCHH' date: '2026-06-07T14:00:00+02:00' # date of the event -publishDate: '2026-06-07T14:00:00+02:00' # when to publish draft: false -location: Z9 authors: - stb tags: @@ -24,4 +22,4 @@ Worum geht es beim Digital Independence Day? [Kurz gesagt](https://diday.org/de/ Das besondere: Alle können mitmachen und beitragen. Die gesamte Webseite wird als Open Source auf [codeberg.org/DI-Day/website](https://codeberg.org/DI-Day/website) von allen Interessierten gepflegt und weiterentwickelt. Und um es auch wirklich einfach zu machen, da einzusteigen, haben wir unter [Wie? Gemeinsam](https://diday.org/de/together/) Anleitungen bereitgestellt, wie ihr direkt loslegen könnt. -Der CCC Hansestadt Hamburg e.V. fungiert als Heimat für die Webseite, sowohl technisch als auch rechtlich. Aber die Inhalte kommen von euch allen! Wir freuen uns zu sehen, was in den nächsten Monaten alles dazukommen wird. \ No newline at end of file +Der CCC Hansestadt Hamburg e.V. fungiert als Heimat für die Webseite, sowohl technisch als auch rechtlich. Aber die Inhalte kommen von euch allen! Wir freuen uns zu sehen, was in den nächsten Monaten alles dazukommen wird. 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 2c642a0a30b4119c951a7dc844008105d4c21586 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" . ) }}