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>
This commit is contained in:
parent
a7664c9168
commit
cf242b3e4c
8 changed files with 83 additions and 41 deletions
|
|
@ -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
|
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
|
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
|
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
|
switch amber, as in the header. The page reserves space for the bar so it does
|
||||||
does not cover content.
|
not cover content.
|
||||||
|
|
||||||
## Brand spelling check
|
## Brand spelling check
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@
|
||||||
* 40C3 "MODEL_CITIZENS" design, after the 40C3 styleguide.
|
* 40C3 "MODEL_CITIZENS" design, after the 40C3 styleguide.
|
||||||
* Key colours: green (0), paper (A) and ink (B); the other colours are accents.
|
* Key colours: green (0), paper (A) and ink (B); the other colours are accents.
|
||||||
* Dark: ink background, paper text, green 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
|
* 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,
|
* only the foreground does. So in the light scheme green is only ever a fill or a line,
|
||||||
* with foreground-coloured text on it.
|
* with foreground-coloured text on it.
|
||||||
|
|
@ -23,8 +25,8 @@
|
||||||
--c40-paper: #ebedf0;
|
--c40-paper: #ebedf0;
|
||||||
--c40-ink: #001300;
|
--c40-ink: #001300;
|
||||||
|
|
||||||
--c40-light-bg: #e2eed6;
|
--c40-light-bg: var(--c40-paper);
|
||||||
--c40-light-fg: #010801;
|
--c40-light-fg: var(--c40-ink);
|
||||||
|
|
||||||
/* Text on green and amber fills. */
|
/* Text on green and amber fills. */
|
||||||
--c40-on-fill: light-dark(var(--c40-light-fg), var(--c40-ink));
|
--c40-on-fill: light-dark(var(--c40-light-fg), var(--c40-ink));
|
||||||
|
|
@ -218,11 +220,17 @@ nav a,
|
||||||
text-decoration: none;
|
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 {
|
.main-menu a {
|
||||||
padding: 0.15rem 0.75rem;
|
padding: 0.3rem 0.75rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
box-shadow: inset 0 0 0 1px currentcolor;
|
box-shadow: inset 0 0 0 2px var(--color-border);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
|
|
@ -236,24 +244,8 @@ nav a,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Nav row (layouts/_partials/menu.html): menu chips, and the language switch on the right. */
|
/* Language switch, on the right of the header: an amber chip with the icon, so it doesn't read
|
||||||
.nav-bar__row {
|
as a menu entry. */
|
||||||
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-selector {
|
.language-selector {
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
|
||||||
|
|
@ -261,7 +253,7 @@ nav a,
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.45em;
|
gap: 0.45em;
|
||||||
padding: 0.15rem 0.75rem;
|
padding: 0.3rem 0.75rem;
|
||||||
background: var(--c40-amber);
|
background: var(--c40-amber);
|
||||||
color: var(--c40-on-fill);
|
color: var(--c40-on-fill);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<defs>
|
<defs>
|
||||||
<style>
|
<style>
|
||||||
.cls-1 {
|
.cls-1 {
|
||||||
fill: #010801;
|
fill: #001300;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</defs>
|
</defs>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
|
@ -1,5 +1,5 @@
|
||||||
{{- /* Browser UI colours, the same as the page backgrounds in assets/css/_custom.css. */ -}}
|
{{- /* Browser UI colours, the same as the page backgrounds in assets/css/_custom.css. */ -}}
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#e2eed6">
|
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ebedf0">
|
||||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#001300">
|
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#001300">
|
||||||
{{- /*
|
{{- /*
|
||||||
Open Graph image for link previews. The theme's head/meta.html writes og:image only for the
|
Open Graph image for link previews. The theme's head/meta.html writes og:image only for the
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{{- /* Nav row: the main menu, and the language switch on the right.
|
<nav class="main-menu{{ if not ($.Param "menuinheader") }} mx--xs layout__navigation{{ end }}" aria-label="{{ i18n "menu_title" }}">
|
||||||
On small screens the theme's mobilemenu.js hides .main-menu and .header__region, and the
|
|
||||||
bottom bar (mobilemenu.html) takes over both. */ -}}
|
|
||||||
<div class="nav-bar mx--xs layout__navigation">
|
|
||||||
<div class="nav-bar__row">
|
|
||||||
<nav class="main-menu" aria-label="{{ i18n "menu_title" }}">
|
|
||||||
<ul class="flex-inline mx--0">
|
<ul class="flex-inline mx--0">
|
||||||
{{ $currentPage := . -}}
|
{{ $currentPage := . -}}
|
||||||
{{ range site.Menus.main -}}
|
{{ range site.Menus.main -}}
|
||||||
|
|
@ -11,6 +6,3 @@ bottom bar (mobilemenu.html) takes over both. */ -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="region header__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,13 @@
|
||||||
<h1 class="header__site-name">
|
<h1 class="header__site-name">
|
||||||
<a href="{{ site.Home.RelPermalink }}" rel="home" class="header__site-link">{{ site.Title }}</a>
|
<a href="{{ site.Home.RelPermalink }}" rel="home" class="header__site-link">{{ site.Title }}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
<div class="region header__region">
|
||||||
|
{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end -}}
|
||||||
|
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{ partial "menu.html" . }}
|
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
|
||||||
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
|
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
|
||||||
|
|
||||||
<div id="main-content" tabindex="-1"></div>
|
<div id="main-content" tabindex="-1"></div>
|
||||||
|
|
|
||||||
54
layouts/home-baseof.html
Normal file
54
layouts/home-baseof.html
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
{{ partial "lint-brand.html" . }}
|
||||||
|
<!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 }}
|
||||||
|
{{ if .HasShortcode "schedule" }}{{ partial "schedule-script.html" . }}{{ end }}
|
||||||
|
{{ if .HasShortcode "gallery" }}{{ partial "gallery-script.html" . }}{{ 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 }}">
|
||||||
|
<a class="skip-link visually-hidden" href="#main-content">{{ i18n "skip_to_content" }}</a>
|
||||||
|
<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 }}" 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="{{ i18n "logo_alt" }}" class="header__logo-image">
|
||||||
|
</a>
|
||||||
|
{{ end -}}
|
||||||
|
<h1 class="header__site-name">
|
||||||
|
<a href="{{ site.Home.RelPermalink }}" rel="home" class="header__site-link">{{ site.Title }}</a>
|
||||||
|
</h1>
|
||||||
|
<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 -}}
|
||||||
|
|
||||||
|
<div id="main-content" tabindex="-1"></div>
|
||||||
|
{{ 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,7 +15,7 @@
|
||||||
"purpose": "maskable"
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"theme_color": "#e2eed6",
|
"theme_color": "#ebedf0",
|
||||||
"background_color": "#e2eed6",
|
"background_color": "#ebedf0",
|
||||||
"display": "standalone"
|
"display": "standalone"
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue