From 401f1ce11a10748eb43035e62e55a78fddc03f38 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 12:40:33 +0100 Subject: [PATCH 01/14] fix: Keeps logo size and resolves mobile menu overlap --- README.md | 7 ++ assets/css/_custom.css | 141 +++++++++++++++++++++-- content/de/_index.md | 2 - content/en/_index.md | 2 - layouts/_partials/language-selector.html | 21 ++++ 5 files changed, 157 insertions(+), 16 deletions(-) create mode 100644 layouts/_partials/language-selector.html diff --git a/README.md b/README.md index 476cd85..426651d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ hugo server --buildFuture --buildDrafts Then open http://localhost:1313 +The header uses the logo dimensions in `hugo.yaml` in both languages, without +shrinking the logo to fit the text. With JavaScript enabled, screens up to 666px +wide use a flat, borderless full-width menu button at the bottom and a scrollable +panel above it. The language link spans the panel's content width, includes the +translation icon, and uses the same font size as the menu links. +The page reserves space for the button so it does not cover content. + ## Shortcode: Language badge Use the `lang` shortcode to mark whether a tour is in German, English or bilingual. It renders a small superscript badge next to the text, with details when hovered over or parsed by a screenreader. diff --git a/assets/css/_custom.css b/assets/css/_custom.css index 04fd621..35730e8 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -1,6 +1,122 @@ @import './_schedule.css'; @import './_gallery.css'; +.header__logo { + flex-shrink: 0; +} + +.header__intro { + min-width: 0; +} + +@media (width <= 666px) { + .header { + flex-direction: column; + align-items: flex-start; + } +} + +/* Reserve space for the mobile menu without changing the theme's colours or fonts. */ +:root { + --mobile-bar-h: 3.25rem; +} + +.layout__page:has(> .mobile-nav:not([hidden])) { + padding-block-end: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); +} + +:root:has(.mobile-nav:not([hidden])) { + scroll-padding-block-end: calc(var(--mobile-bar-h) + 1rem); +} + +.mobile-nav { + position: fixed; + inset: 0; + width: auto; + height: auto; +} + +.mobile-nav__cover { + inset: 0; + width: auto; + height: auto; +} + +.mobile-nav__toggle.button { + position: fixed; + inset: auto 0 0; + justify-content: center; + gap: 0.6rem; + width: auto; + block-size: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); + padding: 0 var(--gutters) env(safe-area-inset-bottom, 0px); + border: 0; + border-radius: 0; + background: var(--color-button); + + &:hover, + &:focus-visible, + &:active { + background: var(--color-button-hover); + box-shadow: none; + } + + &:focus-visible { + outline-offset: -4px; + } +} + +.mobile-nav__sheet { + position: absolute; + inset: auto 0 calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); + width: auto; + height: auto; + max-height: calc(100% - var(--mobile-bar-h) - env(safe-area-inset-bottom, 0px) - var(--spacing-l)); + overflow-y: auto; + padding: var(--spacing-m) var(--gutters); + transform: translateY(100%); + + [data-navopen] & { + transform: translateY(0); + } +} + +.mobile-nav__region .language-selector ul { + flex: 1; + flex-direction: column; +} + +.language-selector a { + display: flex; + align-items: center; + gap: 0.45em; +} + +.language-selector .language-icon { + inline-size: 1.1em; + block-size: 1.1em; + flex-shrink: 0; + margin: 0; + fill: currentcolor; +} + +.mobile-nav__region .language-selector { + font-size: inherit; +} + +.mobile-nav__region .language-selector a, +.mobile-nav__navbar a { + padding-block: 0.5rem; +} + +.mobile-nav__region .language-selector a { + justify-content: center; +} + +.mobile-nav__navbar a { + display: block; +} + .header__intro_headline { margin: 0; font: bold var(--fs-xxl) "Arial"; @@ -45,18 +161,19 @@ th, td { --color-mobile-menu: #141414; } - nav ul li { - flex-grow: 1; - text-align: center; - } - .main-menu a:active { - text-decoration: none; - } - /* Links in text keep their underline: the link colour alone is too close to the text colour. */ - nav a, - .header a { - text-decoration: none; - } +} + +nav ul li { + flex-grow: 1; + text-align: center; +} +.main-menu a:active { + text-decoration: none; +} +/* Links in text keep their underline: the link colour alone is too close to the text colour. */ +nav a, +.header a { + text-decoration: none; } h2 a { diff --git a/content/de/_index.md b/content/de/_index.md index 6deb6c3..38d56e9 100644 --- a/content/de/_index.md +++ b/content/de/_index.md @@ -8,8 +8,6 @@ params: headline: Willkommen bei Hamburg Hackertours! intro: | Für den Congress und für das Easterhegg organisiert der CCC Hamburg Touren zu interessanten Orten in und um Hamburg. Hier findet ihr Informationen zu aktuellen und vergangenen Veranstaltungen! - logowidth: 500 - logoheight: 500 cascade: params: intro: Wir von Hamburg Hackertours zeigen euch die Stadt! diff --git a/content/en/_index.md b/content/en/_index.md index 4004062..85fadd3 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -8,8 +8,6 @@ params: headline: Welcome to Hackertours! intro: | For Congress and for Easterhegg CCC Hamburg is organizing tours to interesting places in and around Hamburg. Here you will find information about current and past events! - logowidth: 500 - logoheight: 500 cascade: params: intro: We at Hamburg Hackertours show you around the city! diff --git a/layouts/_partials/language-selector.html b/layouts/_partials/language-selector.html new file mode 100644 index 0000000..a577641 --- /dev/null +++ b/layouts/_partials/language-selector.html @@ -0,0 +1,21 @@ +{{- /* Keep the translation icon inside the link so the entire language row is clickable. +Compare with the theme's language-selector.html after updating Zen. */ -}} +{{- $icon := `` -}} + -- 2.54.0 From 18464414651b6473cf66b92394c5f6de9e9f0be0 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 13:40:09 +0100 Subject: [PATCH 02/14] refactor: Mobile footer directly shows menu options --- .gitmodules | 3 +- data/lucideicons.json | 7 +++ layouts/_partials/head/extra.html | 1 + layouts/_partials/icon.html | 12 +++++ .../_partials/language-selector-inline.html | 14 +++++ layouts/_partials/mobilemenu.html | 54 ++++++++++++------- static/icons/lucide/calendar.svg | 16 ++++++ static/icons/lucide/circle-question-mark.svg | 15 ++++++ static/icons/lucide/house.svg | 14 +++++ static/icons/lucide/languages.svg | 18 +++++++ static/icons/lucide/newspaper.svg | 16 ++++++ themes/zen | 2 +- 12 files changed, 151 insertions(+), 21 deletions(-) create mode 100644 data/lucideicons.json create mode 100644 layouts/_partials/icon.html create mode 100644 layouts/_partials/language-selector-inline.html create mode 100644 static/icons/lucide/calendar.svg create mode 100644 static/icons/lucide/circle-question-mark.svg create mode 100644 static/icons/lucide/house.svg create mode 100644 static/icons/lucide/languages.svg create mode 100644 static/icons/lucide/newspaper.svg diff --git a/.gitmodules b/.gitmodules index dc19131..4242125 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "themes/zen"] path = themes/zen - url = https://github.com/frjo/hugo-theme-zen.git + url = ssh://forgejo@git.hamburg.ccc.de/ViMaSter/hackertours-theme.git + branch = hackertours-mobile-nav diff --git a/data/lucideicons.json b/data/lucideicons.json new file mode 100644 index 0000000..ff446d1 --- /dev/null +++ b/data/lucideicons.json @@ -0,0 +1,7 @@ +{ + "house": "", + "rss": "", + "calendar": "", + "circle-question-mark": "", + "languages": "" +} \ No newline at end of file diff --git a/layouts/_partials/head/extra.html b/layouts/_partials/head/extra.html index 9bc15d9..bc6605d 100644 --- a/layouts/_partials/head/extra.html +++ b/layouts/_partials/head/extra.html @@ -48,3 +48,4 @@ og:image:alt. {{- end -}} {{- end -}} {{- end -}} + diff --git a/layouts/_partials/icon.html b/layouts/_partials/icon.html new file mode 100644 index 0000000..6329e76 --- /dev/null +++ b/layouts/_partials/icon.html @@ -0,0 +1,12 @@ +{{- /* +Render a Lucide icon from the local icons data file. +Usage: {{ partial "icon" "house" }} +Icons are fetched from data/lucideicons.json at build time +*/ -}} +{{- $iconName := . -}} +{{- with index hugo.Data.lucideicons $iconName -}} + {{- . | safeHTML -}} +{{- else -}} + {{- /* Fallback if icon not found */ -}} + +{{- end -}} diff --git a/layouts/_partials/language-selector-inline.html b/layouts/_partials/language-selector-inline.html new file mode 100644 index 0000000..3a6b0b6 --- /dev/null +++ b/layouts/_partials/language-selector-inline.html @@ -0,0 +1,14 @@ +{{- /* Inline language selector for mobile bottom nav */ -}} + diff --git a/layouts/_partials/mobilemenu.html b/layouts/_partials/mobilemenu.html index af2cf49..e77bced 100644 --- a/layouts/_partials/mobilemenu.html +++ b/layouts/_partials/mobilemenu.html @@ -1,22 +1,38 @@ - + {{ if hugo.IsMultilingual }} +
  • + {{ if eq .Lang "en" }} + + {{ partial "icon" "languages" }} + Deutsch + + {{ else }} + + {{ partial "icon" "languages" }} + English + + {{ end }} +
  • + {{ end }} + + diff --git a/static/icons/lucide/calendar.svg b/static/icons/lucide/calendar.svg new file mode 100644 index 0000000..4679497 --- /dev/null +++ b/static/icons/lucide/calendar.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/static/icons/lucide/circle-question-mark.svg b/static/icons/lucide/circle-question-mark.svg new file mode 100644 index 0000000..cf7e6ef --- /dev/null +++ b/static/icons/lucide/circle-question-mark.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/static/icons/lucide/house.svg b/static/icons/lucide/house.svg new file mode 100644 index 0000000..10e4097 --- /dev/null +++ b/static/icons/lucide/house.svg @@ -0,0 +1,14 @@ + + + + diff --git a/static/icons/lucide/languages.svg b/static/icons/lucide/languages.svg new file mode 100644 index 0000000..c3c1486 --- /dev/null +++ b/static/icons/lucide/languages.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/static/icons/lucide/newspaper.svg b/static/icons/lucide/newspaper.svg new file mode 100644 index 0000000..faf0fb5 --- /dev/null +++ b/static/icons/lucide/newspaper.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/themes/zen b/themes/zen index 6d4ee82..945820e 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 6d4ee822a88a3dbe2443b2c985523e376f47056f +Subproject commit 945820ec5b526065c796ede14dc44a4a4f0a3335 -- 2.54.0 From 5271f4c9ad57abfca4ea41b42bcf03bc56a29a93 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 14:19:39 +0100 Subject: [PATCH 03/14] Update submodule to use CCCHH/hackertours-theme with mobile nav changes - Point to https://git.hamburg.ccc.de/CCCHH/hackertours-theme.git (build agent accessible) - Track hackertours-mobile-nav branch - Includes mobile bottom navigation, local Lucide icons, and accessibility improvements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 4242125..fa85e59 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "themes/zen"] path = themes/zen - url = ssh://forgejo@git.hamburg.ccc.de/ViMaSter/hackertours-theme.git + url = ssh://git.hamburg.ccc.de/CCCHH/hackertours-theme.git branch = hackertours-mobile-nav -- 2.54.0 From d97bf289c8c35089bb6f7565e2ae18acfd880e27 Mon Sep 17 00:00:00 2001 From: ViMaSter Date: Sat, 7 Nov 2026 14:27:43 +0100 Subject: [PATCH 04/14] fix: Changes to HTTPS --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index fa85e59..cf9e5f0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "themes/zen"] path = themes/zen - url = ssh://git.hamburg.ccc.de/CCCHH/hackertours-theme.git + url = https://git.hamburg.ccc.de/CCCHH/hackertours.git branch = hackertours-mobile-nav -- 2.54.0 From 9a051b68bed318ec07064b1c08116881df875fef Mon Sep 17 00:00:00 2001 From: ViMaSter Date: Sat, 7 Nov 2026 14:29:21 +0100 Subject: [PATCH 05/14] fix: Uses correct repository --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index cf9e5f0..df27575 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "themes/zen"] path = themes/zen - url = https://git.hamburg.ccc.de/CCCHH/hackertours.git + url = https://git.hamburg.ccc.de/CCCHH/hackertours-theme.git branch = hackertours-mobile-nav -- 2.54.0 From 5c01de9fd486e81fe3d33c7bd94ba60c40992a45 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:20:07 +0100 Subject: [PATCH 06/14] Simplify header and move intro text to main content Header changes: - Remove headline and intro text from header - Keep only logo and site name (h1) in header - Remove header__intro section Home page changes: - Move intro/tagline text to main content area - Display at same level as 'News' and other content, not as header - Style as regular body text with .intro-text class Submodule update: - Update hackertours-theme to include intro text styling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- layouts/home-baseof.html | 9 +++------ layouts/home.html | 4 ++++ themes/zen | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/layouts/home-baseof.html b/layouts/home-baseof.html index 8b591e8..116d459 100644 --- a/layouts/home-baseof.html +++ b/layouts/home-baseof.html @@ -26,12 +26,9 @@ {{ i18n {{ end -}} -
    -

    {{ .Param "headline" }}

    - {{ if .Param "intro" }} -
    {{ .Param "intro" }}
    - {{ end }} -
    +

    +{{ site.Title }} +

    {{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}} {{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}} diff --git a/layouts/home.html b/layouts/home.html index ec93d88..b2600e4 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -2,6 +2,10 @@ {{ define "main" -}}
    +{{ if .Param "intro" }} +
    {{ .Param "intro" }}
    +{{ end }} + {{ .Content }} {{ $pages := .Site.RegularPages.RelatedTo (keyVals "tags" "current-event") -}} diff --git a/themes/zen b/themes/zen index 945820e..2fce4ed 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 945820ec5b526065c796ede14dc44a4a4f0a3335 +Subproject commit 2fce4ed623319c3dd7c12b9a0e3a59baa14c7dfb -- 2.54.0 From 7e00211b5f6dfdf72cc124f4a350017755498b11 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:39:02 +0100 Subject: [PATCH 07/14] Fix header alignment across all pages - Removed old header__intro wrapper and vertical stacking from baseof.html - All pages now use consistent horizontal header layout (logo left, h1 right) - Updated root assets/css/_custom.css to remove flex-direction: column on mobile - Updated theme's _custom.css to: - Scale logo to 50x50px on mobile, 100x100px on desktop - Reduce h1 font size from --fs-xxl to --fs-l - Set h1 margins to 0 and flex-shrink: 1 for proper flex alignment - Home and News pages now have aligned headers across all screen sizes - Updated submodule pointer to hackertours-mobile-nav with header fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- assets/css/_custom.css | 30 +++++++++++++++++------------- layouts/baseof.html | 7 +++---- themes/zen | 2 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/assets/css/_custom.css b/assets/css/_custom.css index 35730e8..6230903 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -5,14 +5,25 @@ flex-shrink: 0; } -.header__intro { +/* Header h1 styling - smaller and flexible */ +.header__site-name { + font-size: var(--fs-l); + margin-block-start: 0; + margin-block-end: 0; + flex-shrink: 1; min-width: 0; } -@media (width <= 666px) { - .header { - flex-direction: column; - align-items: flex-start; +/* Logo scaling - smaller on mobile */ +.header__logo-image { + width: 50px; + height: 50px; +} + +@media (width >= 667px) { + .header__logo-image { + width: 100px; + height: 100px; } } @@ -117,14 +128,6 @@ display: block; } -.header__intro_headline { - margin: 0; - font: bold var(--fs-xxl) "Arial"; - padding-bottom: 10px; -} -.header__intro_text { - font-family: var(--ff-body) -} table, th, td { border: 1px solid; } @@ -223,3 +226,4 @@ span.content-image { font-size: var(--fs-xs); color: var(--color-text-meta); } + diff --git a/layouts/baseof.html b/layouts/baseof.html index cf52f12..116d459 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -26,10 +26,9 @@ {{ i18n {{ end -}} -
    - -
    {{ .Param "intro" }}
    -
    +

    +{{ site.Title }} +

    {{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}} {{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}} diff --git a/themes/zen b/themes/zen index 2fce4ed..8e145bb 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 2fce4ed623319c3dd7c12b9a0e3a59baa14c7dfb +Subproject commit 8e145bb881721b041873b867227dc3282fb9a601 -- 2.54.0 From 2833fbd0a54800e8a75bb4c8884a32da570aca3e Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:43:16 +0100 Subject: [PATCH 08/14] Update submodule to include larger h1 font size on desktop Submodule commit 7a945e3: Increase h1 font size on desktop to use full available space - Mobile: h1 uses --fs-l - Desktop: h1 uses --fs-xxl Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- themes/zen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/zen b/themes/zen index 8e145bb..7a945e3 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 8e145bb881721b041873b867227dc3282fb9a601 +Subproject commit 7a945e3ce8b69d445c12ce4d0f233965bb2badb4 -- 2.54.0 From a1b3d53c7a10cad8186741533f9d843ef634800d Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:47:56 +0100 Subject: [PATCH 09/14] Update submodule: h1 now uses --fs-xxl on desktop, --fs-l only on mobile Fixes header sizing to properly scale with viewport: - Desktop (>= 667px): h1 uses --fs-xxl for larger headline - Mobile (<= 666px): h1 uses --fs-l for constrained space - Headline stays on one line across all screen sizes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- themes/zen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/zen b/themes/zen index 7a945e3..f5eaa82 160000 --- a/themes/zen +++ b/themes/zen @@ -1 +1 @@ -Subproject commit 7a945e3ce8b69d445c12ce4d0f233965bb2badb4 +Subproject commit f5eaa82f7dce4d7d25b7c4e9f7c56a356c1d82a2 -- 2.54.0 From 8996266a61f923ad5cd228ab183e802b7afd0330 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:52:43 +0100 Subject: [PATCH 10/14] Fix: h1 should use fs-xxl on desktop and only reduce to fs-l on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root project's _custom.css was overriding the theme's custom CSS because it had fs-l as the base font size instead of fs-xxl. Now the default is fs-xxl with media query override for mobile (≤ 666px). --- assets/css/_custom.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/assets/css/_custom.css b/assets/css/_custom.css index 6230903..1c0f6a4 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -5,15 +5,22 @@ flex-shrink: 0; } -/* Header h1 styling - smaller and flexible */ +/* Header h1 styling - responsive sizing that grows with viewport */ .header__site-name { - font-size: var(--fs-l); + font-size: var(--fs-xxl); margin-block-start: 0; margin-block-end: 0; flex-shrink: 1; min-width: 0; } +/* Smaller on mobile only */ +@media (width <= 666px) { + .header__site-name { + font-size: var(--fs-l); + } +} + /* Logo scaling - smaller on mobile */ .header__logo-image { width: 50px; -- 2.54.0 From 55d59be2e26592de4b2a13565d8bffdafec1fa1f Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:17:45 +0100 Subject: [PATCH 11/14] Add page title to home page with same styling as News/FAQ pages - Added

    with page title to home page - Uses same structure as list pages (News, FAQ, Tours) - Title inherits styling from existing .title class (--fs-xxl) --- assets/css/_custom.css | 10 +++------- layouts/home.html | 3 +++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/assets/css/_custom.css b/assets/css/_custom.css index 1c0f6a4..5dcf79f 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -143,9 +143,9 @@ th, td { font-variant-numeric: tabular-nums; } -.title-post-date { - font-size: .7em; - margin-left: 2em; +.title-post-date { margin-left: 0em; + display: block; + font-size: 0.5em; } /* Zen v7 paints body with --color-body-bg and .page with --color-page-bg. */ @@ -189,10 +189,6 @@ nav a, h2 a { margin-right: 2em; } - -.title-post-date { - margin-left: 0em; -} /* Visible when focused with the keyboard; the visually-hidden class hides it otherwise. */ .skip-link:focus { position: absolute; diff --git a/layouts/home.html b/layouts/home.html index b2600e4..5513a14 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -2,6 +2,9 @@ {{ define "main" -}}
    +
    +

    {{ .Title }}

    +
    {{ if .Param "intro" }}
    {{ .Param "intro" }}
    {{ end }} -- 2.54.0 From e6cb2bfe5c5e4d98854660b4374f5aff89cb5fbe Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:19:16 +0100 Subject: [PATCH 12/14] Update home page title to display as page heading Changed title from 'Hamburg Hackertours (en/de)' to 'Welcome to Hamburg Hackertours!' / 'Willkommen bei Hamburg Hackertours!' This title now displays as an h1 page heading on the home page, matching the style of News, FAQ, and Tours pages. --- content/de/_index.md | 2 +- content/en/_index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/de/_index.md b/content/de/_index.md index 38d56e9..e2c7c37 100644 --- a/content/de/_index.md +++ b/content/de/_index.md @@ -1,5 +1,5 @@ --- -title: Hamburg Hackertours (de) +title: Willkommen bei Hamburg Hackertours! menus: main: name: Home diff --git a/content/en/_index.md b/content/en/_index.md index 85fadd3..068f041 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -1,5 +1,5 @@ --- -title: Hamburg Hackertours (en) +title: Welcome to Hamburg Hackertours! menus: main: name: Home -- 2.54.0 From 3f9eb7faf7eaa28ebe27d3f251bb4aabf8168843 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:23:18 +0100 Subject: [PATCH 13/14] Fix: Add line break in home page intro text Split the intro text into two lines: - First line: Organization statement - Second line: Information availability statement Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- content/de/_index.md | 3 ++- content/en/_index.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/content/de/_index.md b/content/de/_index.md index e2c7c37..08cf4ee 100644 --- a/content/de/_index.md +++ b/content/de/_index.md @@ -7,7 +7,8 @@ weight: 1 params: headline: Willkommen bei Hamburg Hackertours! intro: | - Für den Congress und für das Easterhegg organisiert der CCC Hamburg Touren zu interessanten Orten in und um Hamburg. Hier findet ihr Informationen zu aktuellen und vergangenen Veranstaltungen! + Für den Congress und für das Easterhegg organisiert der CCC Hamburg Touren zu interessanten Orten in und um Hamburg. + Hier findet ihr Informationen zu aktuellen und vergangenen Veranstaltungen! cascade: params: intro: Wir von Hamburg Hackertours zeigen euch die Stadt! diff --git a/content/en/_index.md b/content/en/_index.md index 068f041..a95b39a 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -7,7 +7,8 @@ weight: 1 params: headline: Welcome to Hackertours! intro: | - For Congress and for Easterhegg CCC Hamburg is organizing tours to interesting places in and around Hamburg. Here you will find information about current and past events! + For Congress and for Easterhegg CCC Hamburg is organizing tours to interesting places in and around Hamburg. + Here you will find information about current and past events! cascade: params: intro: We at Hamburg Hackertours show you around the city! -- 2.54.0 From efab84c6aea8ada513110adf0c645fc5055ac140 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:37:14 +0100 Subject: [PATCH 14/14] fix: Normalizes any bodycopy to "Hackertours" casing --- .gitignore | 1 + README.md | 13 ++++ assets/css/_custom.css | 5 +- content/de/_index.md | 4 +- content/de/eh22/_index.md | 2 +- ...4-12-04-old-elbe-tunnel-also-in-english.md | 2 +- ...-12-17-last-chance-ticket-gaengeviertel.md | 4 +- ...2-17-last-chance-ticket-old-elbe-tunnel.md | 4 +- .../2024-12-17-last-chance-ticket-stubnitz.md | 4 +- content/de/posts/2024-12-31-happy-new-year.md | 6 +- content/de/posts/2025-02-14-eh22-coming-up.md | 2 +- .../posts/2025-04-10-eh-last-minute-tours.md | 2 +- content/de/posts/2025-12-30-happy-2026.md | 2 +- content/de/posts/2026-11-03-40c3-coming.md | 2 +- content/en/_index.md | 4 +- content/en/eh22/_index.md | 2 +- .../posts/2023-12-25-payment-waiting-list.md | 6 +- ...4-12-04-old-elbe-tunnel-also-in-english.md | 2 +- ...-12-17-last-chance-ticket-gaengeviertel.md | 4 +- ...2-17-last-chance-ticket-old-elbe-tunnel.md | 4 +- .../2024-12-17-last-chance-ticket-stubnitz.md | 4 +- content/en/posts/2024-12-31-happy-new-year.md | 6 +- content/en/posts/2025-02-14-eh22-coming-up.md | 2 +- .../posts/2025-04-10-eh-last-minute-tours.md | 6 +- content/en/posts/2025-12-30-happy-2026.md | 2 +- content/en/posts/2026-11-03-40c3-coming.md | 2 +- layouts/_partials/lint-brand.html | 15 +++++ layouts/baseof.html | 1 + layouts/home-baseof.html | 1 + tests/test_brand_lint.py | 64 +++++++++++++++++++ 30 files changed, 138 insertions(+), 40 deletions(-) create mode 100644 layouts/_partials/lint-brand.html create mode 100644 tests/test_brand_lint.py diff --git a/.gitignore b/.gitignore index 1516e93..b0a48ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ public resources/_gen +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 426651d..4c6a557 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,19 @@ panel above it. The language link spans the panel's content width, includes the translation icon, and uses the same font size as the menu links. The page reserves space for the button so it does not cover content. +## Brand spelling check + +Hugo builds check content source lines for the name `Hackertours` in any other +casing and report the file and line as build errors for pages included in the +build. URLs, email addresses, social handles, Matrix room addresses and +Markdown link destinations are excluded. Commented-out content is checked too, +so it is ready to publish. + +For an intentional exception, add `` at the +end of a Markdown line, or `# hackertours-lint-ignore` at the end of a YAML +front matter line. This ignores that entire source line, so keep unrelated +occurrences on other lines. + ## Shortcode: Language badge Use the `lang` shortcode to mark whether a tour is in German, English or bilingual. It renders a small superscript badge next to the text, with details when hovered over or parsed by a screenreader. diff --git a/assets/css/_custom.css b/assets/css/_custom.css index 5dcf79f..f58cbc2 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -1,6 +1,10 @@ @import './_schedule.css'; @import './_gallery.css'; +.intro-text { + white-space: pre-line; +} + .header__logo { flex-shrink: 0; } @@ -229,4 +233,3 @@ span.content-image { font-size: var(--fs-xs); color: var(--color-text-meta); } - diff --git a/content/de/_index.md b/content/de/_index.md index 08cf4ee..623bfd4 100644 --- a/content/de/_index.md +++ b/content/de/_index.md @@ -19,9 +19,9 @@ Wir bereiten Touren für den [40C3](https://events.ccc.de/category/40c3/) vor. I )\s*$` $line) -}} + {{- $text := replaceRE `\]\([^)]*\)` "]" $line -}} + {{- $text = replaceRE `(?i)(?:https?://|mailto:|www\.)[^\s<>"']+|[[:alnum:]._%+-]+@[[:alnum:]._-]+|@[[:alnum:]_]+|#[[:alnum:]_-]+:[[:alnum:]._-]+` "" $text -}} + {{- range findRE `(?i)\bhackertours\b` $text -}} + {{- if ne . "Hackertours" -}} + {{- errorf "%s:%d: %q should be \"Hackertours\" (different casing) - to ignore this, add a hackertours-lint-ignore comment on this line" $file.Filename (add $index 1) . -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/layouts/baseof.html b/layouts/baseof.html index 116d459..c735616 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -1,3 +1,4 @@ +{{ partial "lint-brand.html" . }} diff --git a/layouts/home-baseof.html b/layouts/home-baseof.html index 116d459..c735616 100644 --- a/layouts/home-baseof.html +++ b/layouts/home-baseof.html @@ -1,3 +1,4 @@ +{{ partial "lint-brand.html" . }} diff --git a/tests/test_brand_lint.py b/tests/test_brand_lint.py new file mode 100644 index 0000000..bbb3a54 --- /dev/null +++ b/tests/test_brand_lint.py @@ -0,0 +1,64 @@ +import shutil +import subprocess +import tempfile +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] + + +class BrandLintTest(unittest.TestCase): + def build(self, source): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + (root / "content").mkdir() + (root / "layouts" / "_partials").mkdir(parents=True) + (root / "hugo.toml").write_text('baseURL = "https://example.org/"\n') + (root / "content" / "_index.md").write_text(source) + (root / "layouts" / "home.html").write_text( + '{{ partial "lint-brand.html" . }}{{ .Content }}' + ) + shutil.copy( + ROOT / "layouts" / "_partials" / "lint-brand.html", + root / "layouts" / "_partials" / "lint-brand.html", + ) + return subprocess.run( + ["hugo", "--source", str(root)], + capture_output=True, + text=True, + check=False, + ) + + def test_errors_include_spelling_and_source_line(self): + result = self.build("---\ntitle: Hackertours\n---\nHACKERTOURS and hackertours\n") + self.assertNotEqual(result.returncode, 0) + for line, spelling in [(2, "Hackertours"), (4, "HACKERTOURS"), (4, "hackertours")]: + self.assertIn(f':{line}: "{spelling}" should be "Hackertours"', result.stderr) + + def test_valid_names_identifiers_and_explicit_exceptions(self): + result = self.build( + "---\n" + "title: Hackertours # hackertours-lint-ignore\n" + "---\n" + "Hackertours\n" + "Hackertours \n" + "[Shop](https://hackertours.example/hackertours) " + "ticket@hackertours.example @hackertours " + "#easterhegg-hackertours:example.org\n" + ) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_marker_only_ignores_its_own_line(self): + result = self.build( + "---\ntitle: Hackertours\n---\n" + "Hackertours \n" + "Hackertours\n" + ) + self.assertNotEqual(result.returncode, 0) + self.assertIn(':5: "Hackertours" should be "Hackertours"', result.stderr) + self.assertNotIn(':4: "Hackertours" should be "Hackertours"', result.stderr) + + +if __name__ == "__main__": + unittest.main() -- 2.54.0