From 454d7fbd7ef4102f5c12bcea12d38d01f035e634 Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Sun, 8 Nov 2026 11:49:58 +0100 Subject: [PATCH] fix: Restores header layout and uses 40C3 page colours for light theme - Light scheme: background #ebedf0 and text #001300, the colours the 40C3 info pages (events.ccc.de/congress/2026/infos) use. Their black link boxes and per-level heading colours are not copied; links, headings and chips follow the styleguide as before. The theme-color metas, the web manifest and the footer logo use the same colours. - Menu: the four entries are full-width buttons in a row below the header again (outlined like the styleguide's quiet chips; the current page, hover and focus are filled green). - Language link: back on the right of the header instead of in the menu bar. layouts/baseof.html, layouts/_partials/menu.html and layouts/home-baseof.html are main's again, so the theme only adds files under layouts/. - README: the language switch is in the header, not in the menu. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 4 +-- assets/css/_custom.css | 42 ++++++++++-------------- assets/img/40c3/logo-text-b.svg | 2 +- layouts/_partials/head/extra.html | 2 +- layouts/_partials/menu.html | 10 +----- layouts/baseof.html | 6 +++- layouts/home-baseof.html | 54 +++++++++++++++++++++++++++++++ static/site.webmanifest | 4 +-- 8 files changed, 83 insertions(+), 41 deletions(-) create mode 100644 layouts/home-baseof.html diff --git a/README.md b/README.md index c09a7a6..b836837 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,8 @@ shrinking the logo to fit the text. With JavaScript enabled, screens up to 666px wide swap the main menu and the language link in the header for a bottom navigation bar (`layouts/_partials/mobilemenu.html`): one box per menu entry plus one for the language switch. The current page is filled green and the language -switch amber, as in the header menu. The page reserves space for the bar so it -does not cover content. +switch amber, as in the header. The page reserves space for the bar so it does +not cover content. ## Brand spelling check diff --git a/assets/css/_custom.css b/assets/css/_custom.css index cea67ae..a9759e9 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -5,7 +5,9 @@ * 40C3 "MODEL_CITIZENS" design, after the 40C3 styleguide. * Key colours: green (0), paper (A) and ink (B); the other colours are accents. * Dark: ink background, paper text, green accents. - * Light: #e2eed6 background and #010801 text (picked for this site, not from the styleguide). + * Light: paper background and ink text, as on the 40C3 info pages + * (events.ccc.de/congress/2026/infos). Those pages also put black boxes behind links and give + * each heading level its own colour; this site doesn't, it sticks to the styleguide's chips. * WCAG AA contrast: on ink every palette colour works as text, but on the light background * only the foreground does. So in the light scheme green is only ever a fill or a line, * with foreground-coloured text on it. @@ -22,8 +24,8 @@ --c40-paper: #ebedf0; --c40-ink: #001300; - --c40-light-bg: #e2eed6; - --c40-light-fg: #010801; + --c40-light-bg: var(--c40-paper); + --c40-light-fg: var(--c40-ink); /* Text on green and amber fills. */ --c40-on-fill: light-dark(var(--c40-light-fg), var(--c40-ink)); @@ -217,11 +219,17 @@ nav a, text-decoration: none; } -/* Main menu: quiet (outlined) chips, the current page and hover are filled green. */ +/* Main menu: a row of full-width buttons (the items grow to fill the theme's flex row). Quiet, + outlined boxes; the current page, hover and focus are filled green like a loud header. */ +.main-menu li { + flex-grow: 1; + text-align: center; +} + .main-menu a { - padding: 0.15rem 0.75rem; + padding: 0.3rem 0.75rem; background: transparent; - box-shadow: inset 0 0 0 1px currentcolor; + box-shadow: inset 0 0 0 2px var(--color-border); color: var(--color-text); text-decoration: none; @@ -235,24 +243,8 @@ nav a, } } -/* Nav row (layouts/_partials/menu.html): menu chips, and the language switch on the right. */ -.nav-bar__row { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: 0.5rem; -} - -.nav-bar .header__region { - margin-inline-start: auto; -} - -/* On small screens mobilemenu.js hides both parts; drop the then empty row too. */ -.nav-bar:has(.main-menu[hidden]) { - display: none; -} - -/* Language switch: an amber chip with the icon, so it doesn't read as a menu entry. */ +/* Language switch, on the right of the header: an amber chip with the icon, so it doesn't read + as a menu entry. */ .language-selector { font-size: inherit; @@ -260,7 +252,7 @@ nav a, display: flex; align-items: center; gap: 0.45em; - padding: 0.15rem 0.75rem; + padding: 0.3rem 0.75rem; background: var(--c40-amber); color: var(--c40-on-fill); text-decoration: none; diff --git a/assets/img/40c3/logo-text-b.svg b/assets/img/40c3/logo-text-b.svg index 413d24d..925ec23 100644 --- a/assets/img/40c3/logo-text-b.svg +++ b/assets/img/40c3/logo-text-b.svg @@ -3,7 +3,7 @@ diff --git a/layouts/_partials/head/extra.html b/layouts/_partials/head/extra.html index 9cab363..ee579c3 100644 --- a/layouts/_partials/head/extra.html +++ b/layouts/_partials/head/extra.html @@ -1,5 +1,5 @@ {{- /* Browser UI colours, the same as the page backgrounds in assets/css/_custom.css. */ -}} - + {{- /* Open Graph image for link previews. The theme's head/meta.html writes og:image only for the diff --git a/layouts/_partials/menu.html b/layouts/_partials/menu.html index 8730502..6d551e9 100644 --- a/layouts/_partials/menu.html +++ b/layouts/_partials/menu.html @@ -1,9 +1,4 @@ -{{- /* Nav row: the main menu, and the language switch on the right. -On small screens the theme's mobilemenu.js hides .main-menu and .header__region, and the -bottom bar (mobilemenu.html) takes over both. */ -}} - diff --git a/layouts/baseof.html b/layouts/baseof.html index 97fcc76..c735616 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -30,9 +30,13 @@

{{ site.Title }}

+
+{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}} +{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}} +
-{{ partial "menu.html" . }} +{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}} {{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
diff --git a/layouts/home-baseof.html b/layouts/home-baseof.html new file mode 100644 index 0000000..c735616 --- /dev/null +++ b/layouts/home-baseof.html @@ -0,0 +1,54 @@ +{{ partial "lint-brand.html" . }} + + + + + +{{ block "title" . }}{{ .Title }} – {{ site.Title }}{{ end }} +{{ 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 }} +{{ if .HasShortcode "schedule" }}{{ partial "schedule-script.html" . }}{{ end }} +{{ if .HasShortcode "gallery" }}{{ partial "gallery-script.html" . }}{{ end }} + + + + +
+
+{{ if $.Param "logo" | default true -}} + +{{ end -}} +

+{{ site.Title }} +

+
+{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}} +{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}} +
+
+ +{{ 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 -}} + + + +{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}} +
+ + diff --git a/static/site.webmanifest b/static/site.webmanifest index a954211..485596a 100644 --- a/static/site.webmanifest +++ b/static/site.webmanifest @@ -15,7 +15,7 @@ "purpose": "maskable" } ], - "theme_color": "#e2eed6", - "background_color": "#e2eed6", + "theme_color": "#ebedf0", + "background_color": "#ebedf0", "display": "standalone" } \ No newline at end of file