From 532be6f0ad6db6fc3c467577a6b73be12c88d53b Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 20:02:55 +0200 Subject: [PATCH 1/3] Theme: Update for hugo 0.153: switch to dart-sass libsass will be deprecated in hugo v0.153. Also fix some SASS 2.0 deprecation notices in our scss files --- README.md | 2 ++ themes/ccchh/assets/sass/main.scss | 26 ++++++++++++++++--------- themes/ccchh/layouts/partials/head.html | 4 ++-- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8bf8426..ce34ab0 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ Please note, that the website should be re-deployed at least daily to update the ### Add Pages To run a local version, just install HUGO by following the [instructions](https://gohugo.io/installation/) for your operating system. +Note that you also need to install the [Dart Sass compiler](https://sass-lang.com/dart-sass/). + To build the website and run a development webserver, execute: ```shell hugo server diff --git a/themes/ccchh/assets/sass/main.scss b/themes/ccchh/assets/sass/main.scss index 0396a7e..9784806 100644 --- a/themes/ccchh/assets/sass/main.scss +++ b/themes/ccchh/assets/sass/main.scss @@ -1,3 +1,6 @@ +@use "sass:map"; +@use "sass:math"; + $roomstate_color_unknown: #dda218; $roomstate_color_open: var(--ins-color); $roomstate_color_closed: var(--del-color); @@ -164,7 +167,12 @@ body>main { margin-bottom: 1rem; } - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { margin: 0.5rem 1rem; } @@ -202,7 +210,7 @@ body>main { display: block; margin: 0 auto; // (250px - 2*var(--grid-spacing-horizontal)) * 3/4 - max-height: (222px * 3/4); + max-height: math.div(222px * 3, 4); } // 2*250px + 2*var(--spacing) + 1px @@ -211,7 +219,7 @@ body>main { img.groups-img { // (150px - 2*var(--grid-spacing-horizontal)) * 3/4 - max-height: (122px*3/4); + max-height: math.div(122px*3, 4); } } @@ -221,7 +229,7 @@ body>main { img.groups-img { // (350px - 2*var(--grid-spacing-horizontal)) * 3/4 - max-height: (322px*3/4); + max-height: math.div(322px*3, 4); } // 2*350px + 2*var(--spacing) + 1px @@ -230,7 +238,7 @@ body>main { img.groups-img { // (250px - 2*var(--grid-spacing-horizontal)) * 3/4 - max-height: (222px*3/4); + max-height: math.div(222px*3, 4); } } } @@ -295,7 +303,7 @@ body>main { // When the header content doesn't display nicely anymore, switch to mobile mode. @import "../pico-1.5.11/scss/variables"; - @media (max-width: map-get($breakpoints, md)) { + @media (max-width: map.get($breakpoints, md)) { .hamburger-button { display: unset; position: absolute; @@ -375,15 +383,15 @@ body>main { } // Use the media queries, which we need, from here: - @if map-get($breakpoints, "sm") { - @media (min-width: map-get($breakpoints, "sm")) { + @if map.get($breakpoints, "sm") { + @media (min-width: map.get($breakpoints, "sm")) { ul { padding-left: 0; padding-right: 0; } .main-nav { - max-width: map-get($viewports, "sm"); + max-width: map.get($viewports, "sm"); } } } diff --git a/themes/ccchh/layouts/partials/head.html b/themes/ccchh/layouts/partials/head.html index 936de41..22ed943 100644 --- a/themes/ccchh/layouts/partials/head.html +++ b/themes/ccchh/layouts/partials/head.html @@ -1,5 +1,5 @@ -{{- $cssOptionsMain := dict "transpiler" "libsass" "targetPath" "css/style.css" -}} -{{- $cssOptionsPico := dict "transpiler" "libsass" "targetPath" "css/pico.css" -}} +{{- $cssOptionsMain := dict "transpiler" "dartsass" "targetPath" "css/style.css" -}} +{{- $cssOptionsPico := dict "transpiler" "dartsass" "targetPath" "css/pico.css" -}} {{- $jsResources := resources.Match "js/*.js" }} -- 2.51.2 From 63627e9b2b60cad2fc756534de73ef6a1a3e2556 Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 18:40:48 +0200 Subject: [PATCH 2/3] Theme,CI: Update for hugo v0.156 (.Site.Data) --- .forgejo/workflows/deploy.yaml | 2 +- themes/ccchh/layouts/shortcodes/calendar-table.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index b08a439..76719eb 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: build: runs-on: docker container: - image: hugomods/hugo:exts-0.148.1 + image: hugomods/hugo:dart-sass-0.156.0 steps: - name: Pipeline info run: | diff --git a/themes/ccchh/layouts/shortcodes/calendar-table.html b/themes/ccchh/layouts/shortcodes/calendar-table.html index 558f824..c0c2cbb 100644 --- a/themes/ccchh/layouts/shortcodes/calendar-table.html +++ b/themes/ccchh/layouts/shortcodes/calendar-table.html @@ -1,4 +1,4 @@ -{{- index .Site.Data "calendar.json" }} +{{- index hugo.Data "calendar.json" }} @@ -8,7 +8,7 @@ - {{- range first 7 (sort $.Site.Data.calendar "dtstart" ) }} + {{- range first 7 (sort hugo.Data.calendar "dtstart" ) }} {{- if eq ._type "vevent"}} {{- $start := time .dtstart }} -- 2.51.2 From 6875b82e61a6d2f4a86be8d20d7144a92a1728f9 Mon Sep 17 00:00:00 2001 From: jtbx Date: Sat, 23 May 2026 18:42:34 +0200 Subject: [PATCH 3/3] Theme,CI: Update for hugo v0.158 (renamed LanguageCode to Locale) --- .forgejo/workflows/deploy.yaml | 2 +- hugo.toml | 2 +- themes/ccchh/layouts/_default/rss.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 76719eb..cb9ff00 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -13,7 +13,7 @@ jobs: build: runs-on: docker container: - image: hugomods/hugo:dart-sass-0.156.0 + image: hugomods/hugo:dart-sass-0.158.0 steps: - name: Pipeline info run: | diff --git a/hugo.toml b/hugo.toml index 3b2548b..62fb6ad 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,5 +1,5 @@ baseURL = 'https://hamburg.ccc.de/' -languageCode = 'de-de' +locale = 'de-de' defaultContentLanguage = 'de' timeZone = 'Europe/Berlin' title = 'CCC Hansestadt Hamburg e.V.' diff --git a/themes/ccchh/layouts/_default/rss.xml b/themes/ccchh/layouts/_default/rss.xml index f4a91aa..baf0f96 100644 --- a/themes/ccchh/layouts/_default/rss.xml +++ b/themes/ccchh/layouts/_default/rss.xml @@ -37,7 +37,7 @@ {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }} Hugo - {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{ site.Language.Locale }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with .Site.Copyright }} {{ . }}{{ end }}{{ if not .Date.IsZero }} -- 2.51.2