From 8996266a61f923ad5cd228ab183e802b7afd0330 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 18:52:43 +0100 Subject: [PATCH 1/5] 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; From 55d59be2e26592de4b2a13565d8bffdafec1fa1f Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:17:45 +0100 Subject: [PATCH 2/5] 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 }} From e6cb2bfe5c5e4d98854660b4374f5aff89cb5fbe Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:19:16 +0100 Subject: [PATCH 3/5] 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 From 3f9eb7faf7eaa28ebe27d3f251bb4aabf8168843 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:23:18 +0100 Subject: [PATCH 4/5] 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! From efab84c6aea8ada513110adf0c645fc5055ac140 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sat, 7 Nov 2026 19:37:14 +0100 Subject: [PATCH 5/5] 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()