From 22ac93080c18b6abebc87b5d93075376fab8b66c 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 1952497883377061dc7f0e50eade4c9bf277dd1f 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 | 4 ++++ 3 files changed, 11 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..904c0de 100644 --- a/themes/ccchh/layouts/partials/blog-header.html +++ b/themes/ccchh/layouts/partials/blog-header.html @@ -14,7 +14,11 @@ {{- end }}
+ {{ if (eq .Params.categories "event") }} {{ .Date | time.Format "Mon, 2006-01-02 15:04" }} + {{- else }} + {{ .Date | time.Format "2006-01-02" }} + {{- end }} {{- with .Params.location }} From a8e87d5d291de42e39ef0afcd1a7be1f949ad8a4 Mon Sep 17 00:00:00 2001 From: echtnurich Date: Wed, 10 Jun 2026 20:28:18 +0200 Subject: [PATCH 3/3] Theme: Combine events and articles into the same list --- themes/ccchh/layouts/index.html | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index 5963234..8631c3b 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -12,25 +12,12 @@ {{- $articleDisplayTime := time.ParseDuration "-126h" }} {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} - {{ if or $upcoming $articleNew }} + {{- $neuigkeiten := $upcoming | append $articleNew }} + + {{ if $neuigkeiten }}

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 }} - - {{- range $articleNew.ByDate }} + {{- range $neuigkeiten.ByDate }}
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}