Upgrade to Hugo 0.16x and zen theme v7.1.0 #63

Merged
stb merged 1 commit from upgrade-hugo into main 2026-10-16 15:11:27 +02:00
12 changed files with 22 additions and 33 deletions
Showing only changes of commit 5c1b60fa3a - Show all commits

Upgrade to Hugo 0.16x and zen theme v7.1.0
All checks were successful
/ build (pull_request) Successful in 32s
/ cleanup-staging (pull_request) Successful in 3s

- Bump themes/zen from v5.7.0 to v7.1.0 (vanilla CSS, no libsass).
- Move layouts to Hugo's new template structure (_default -> root,
  index.html -> home.html, shortcodes -> _shortcodes).
- Replace deprecated language API in templates (Locale, Direction, Name)
  and sync base templates and mobile menu with theme v7.
- Config: languageName/languageCode -> label/locale; move copyright to
  the top-level key the v7 footer reads.
- Port _custom.scss to assets/css/_custom.css and map page/body
  backgrounds to v7's --color-body-bg/--color-page-bg.
- CI: build with hugomods/hugo:0.165.0.
Stefan Bethke 2026-10-16 15:06:48 +02:00

View file

@ -11,7 +11,7 @@ jobs:
build:
runs-on: docker
container:
image: docker.io/hugomods/hugo:0.150.1
image: docker.io/hugomods/hugo:0.165.0
steps:
- name: Pipeline info
run: |

61
assets/css/_custom.css Normal file
View file

@ -0,0 +1,61 @@
.header__intro_headline {
font: bold var(--fs-xxl) "Arial";
padding-bottom: 10px;
}
.header__intro_text {
font-family: var(--ff-body)
}
table, th, td {
border: 1px solid;
}
th, td {
padding: 3px 6px;
font-variant-numeric: tabular-nums;
}
.title-post-date {
font-size: .7em;
margin-left: 2em;
}
/* Zen v7 paints body with --color-body-bg and .page with --color-page-bg. */
:root {
--color-body-bg: light-dark(var(--color-grey-100), #141414);
--color-page-bg: light-dark(var(--color-white), #242424);
}
@media (prefers-color-scheme: dark) {
:root {
--color-headings: #faf5f5;
--color-header-bg: #242424;
--color-text: #faf5f5;
--color-link: #66f2ff;
--color-footer-bg: #242424;
--color-border: #faf5f5;
--color-button: #141414;
--color-button-text: #faf5f5;
--color-button-hover: #343434;
--color-brand: #66f2ff;
--color-text-meta: #faf5f5;
--color-mobile-menu: #141414;
}
nav ul li {
flex-grow: 1;
text-align: center;
}
.main-menu a:active {
text-decoration: none;
}
a {
text-decoration: none;
}
}
h2 a {
margin-right: 2em;
}
.title-post-date {
margin-left: 0em;
}

View file

@ -1,16 +1,15 @@
baseURL: 'https://hackertours.hamburg.ccc.de/'
defaultContentLanguage: de
defaultContentLanguageInSubdir: true
#languageCode: 'de-de'
title: 'Hamburg Hackertours'
theme: "zen"
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich."
ignoreLogs:
- 'warning-frontmatter-params-overrides'
#https://themes.gohugo.io/themes/hugo-theme-zen/#configuration
params:
contact: "ticket@hackertours.hamburg.ccc.de"
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich."
dateFormat: "02.01.2006 15:04"
description: "Hamburg Hackertours"
footer: "[Impressum & Datenschutz](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
@ -28,19 +27,19 @@ params:
languages:
en:
weight: 1
languageName: "English"
languageCode: "en"
label: "English"
locale: "en"
contentDir: content/en
pagination:
pagerSize: 25
params:
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours."
footer: "[Imprint & Data Protection](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
title: "Hamburg Hackertours"
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours."
de:
weight: 2
languageName: "Deutsch"
languageCode: "de"
label: "Deutsch"
locale: "de"
contentDir: content/de
pagination:
pagerSize: 25

View file

@ -8,7 +8,7 @@
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
</svg>
</button>
<div class="mobile-nav__sheet link-inverted link-nav" id="sheet" aria-hidden="true">
<div class="mobile-nav__sheet link-nav" id="sheet" data-theme="dark" aria-hidden="true">
<div class="mobile-nav__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
<ul class="mobile-nav__navbar">

View file

@ -0,0 +1,16 @@
{{- $code := .Get 0 | lower -}}
{{- $validCodes := slice "de" "en" "deen" -}}
{{- if not (in $validCodes $code) -}}
<span style="color: red; font-weight: bold;">Warning: Invalid or missing language code '{{ $code }}'. Use 'de', 'en', or 'deen'.</span>
{{- else -}}
{{- $label := cond (eq $code "de") "DE" (cond (eq $code "en") "EN" (cond (eq $code "deen") "DE/EN" "")) -}}
{{- $title := "" -}}
{{- if eq $code "deen" -}}
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird zweisprachig stattfinden (Deutsch und Englisch)" "This tour will be bilingual (German and English)" -}}
{{- else if eq $code "de" -}}
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird auf Deutsch stattfinden" "This tour will be held in German" -}}
{{- else if eq $code "en" -}}
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird auf Englisch stattfinden" "This tour will be held in English" -}}
{{- end -}}
<abbr style="font-size: .65em; vertical-align: super;" title="{{ $title }}">{{ $label }}</abbr>
{{- end -}}

View file

@ -0,0 +1 @@
<iframe style="width: 100%; height: 300px; border: 0;" allowfullscreen allow="geolocation" src="//umap.openstreetmap.fr/en/map/39c3-hackertours_1329184?scaleControl=true&miniMap=false&scrollWheelZoom=true&zoomControl=true&editMode=disabled&moreControl=true&searchControl=false&tilelayersControl=false&embedControl=false&datalayersControl=false&onLoadPanel=none&captionBar=false&captionMenus=true&datalayers=bdd7ff4a-820c-4d08-acd6-a4e1f457b09a%2C82c00520-3aac-454b-96c1-f84d76734b59%2C0b4c18d6-f604-40b0-a322-05b69635ba5c%2Cde42bd8b-d6e8-4bc0-9a2d-2b0168c693c1%2C3bb4795a-1e46-4755-b729-17aeb462498c%2C3a5870ba-4539-4f58-adc9-d0b86b82b4f1%2Cf9d4edf5-c7ac-4e8a-bb39-816312075660%2C3e12b58e-cf69-458d-86ff-6c3d7df79365%2C706815ab-ff61-4840-bc05-cae55242648f%2C6ebae518-b9c0-4900-8f52-085690afa3e7%2C8324f966-450f-4dcf-bec7-e893a3716b42&captionControl=false&locateControl=false&measureControl=false&printControl=null&homeControl=false"></iframe>

50
layouts/baseof.html Normal file
View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ block "title" . }}{{ .Title }} – {{ site.Title }}{{ end }}</title>
{{ partial "head/meta.html" . }}
{{ partialCached "head/favicons.html" . }}
{{ partialCached "head/styles.html" . }}
{{ partial "head/meta-json-ld.html" . }}
{{ partial "head/scripts.html" . }}
{{ partial "head/math.html" . }}
{{ partialCached "head/tracking.html" . }}
{{ partial "head/extra.html" . }}
{{ block "head" . }}{{ end }}
</head>
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with .Section }} section-page--{{ . | urlize }}{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
<header class="header layout__header">
{{ if $.Param "logo" | default true -}}
<a href="{{ site.Home.RelPermalink }}" title="Home" rel="home" class="header__logo">
<img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "images/logo.png" | relURL }}{{ end }}"{{ with $.Param "logowidth" }} width="{{ . }}"{{ end }}{{ with $.Param "logoheight" }} height="{{ . }}"{{ end }} alt="Home" class="header__logo-image">
</a>
{{ end -}}
<div class="header__intro">
<div class="header__intro_headline"><a href="{{ site.Home.RelPermalink }}" title="Home" class="header__site-link" rel="home"><span>{{ site.Title }}</span></a></div>
<div class="header__intro_text">{{ .Param "intro" }}</div>
</div>
<div class="region header__region">
{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}}
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
</div>
</header>
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
{{ block "main" . }}{{ end }}
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
<footer class="footer layout__footer mt--l">
{{ partial "footer.html" . }}
</footer>
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
</div>
</body>
</html>

52
layouts/home-baseof.html Normal file
View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ block "title" . }}{{ .Title }} – {{ site.Title }}{{ end }}</title>
{{ partial "head/meta.html" . }}
{{ partialCached "head/favicons.html" . }}
{{ partialCached "head/styles.html" . }}
{{ partial "head/meta-json-ld.html" . }}
{{ partial "head/scripts.html" . }}
{{ partial "head/math.html" . }}
{{ partialCached "head/tracking.html" . }}
{{ partial "head/extra.html" . }}
{{ block "head" . }}{{ end }}
</head>
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with .Section }} section-page--{{ . | urlize }}{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
<header class="header layout__header">
{{ if $.Param "logo" | default true -}}
<a href="{{ site.Home.RelPermalink }}" title="Home" rel="home" class="header__logo">
<img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "images/logo.png" | relURL }}{{ end }}"{{ with $.Param "logowidth" }} width="{{ . }}"{{ end }}{{ with $.Param "logoheight" }} height="{{ . }}"{{ end }} alt="Home" class="header__logo-image">
</a>
{{ end -}}
<div class="header__intro">
<div class="header__intro_headline">{{ .Param "headline" }}</div>
{{ if .Param "intro" }}
<div class="header__intro_text">{{ .Param "intro" }}</div>
{{ end }}
</div>
<div class="region header__region">
{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}}
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
</div>
</header>
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
{{ block "main" . }}{{ end }}
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
<footer class="footer layout__footer mt--l">
{{ partial "footer.html" . }}
</footer>
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
</div>
</body>
</html>

15
layouts/home.html Normal file
View file

@ -0,0 +1,15 @@
{{ define "title" }}{{ site.Title }}{{ end }}
{{ define "main" -}}
<main class="main layout__main">
{{ .Content }}
{{ $pages := .Site.RegularPages.RelatedTo (keyVals "tags" "current-event") -}}
{{ $paginator := .Paginate $pages -}}
{{ range $paginator.Pages -}}
{{ .Render "summary" }}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end -}}

16
layouts/list-bytitle.html Normal file
View file

@ -0,0 +1,16 @@
{{ define "main" -}}
<main class="main layout__main">
<header>
<h1 class="title">{{ .Title }}</h1>
</header>
{{ .Content }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages.ByTitle -}}
{{ .Render "summary" }}
{{ end -}}
{{ partial "pagination.html" . }}
</main>
{{ end -}}

12
layouts/summary.html Normal file
View file

@ -0,0 +1,12 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
{{- $postDate := "" }}
{{- if .Param "showPostDate" | default false }}
{{- $postDate = .Params.date.Format .Site.Params.dateFormat }}
{{- end }}
<h2 class="title mt--s{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a> <span class="title-post-date">{{ $postDate }}</span></h2>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
{{ .Summary }}
</article>

@ -1 +1 @@
Subproject commit acc3f6277010b9eac4290c86f340330616fe2d54
Subproject commit 6d4ee822a88a3dbe2443b2c985523e376f47056f