feat: Applies 40c3 style to website
Rebased onto main after the bottom navigation bar (#68). Main's markup and behaviour win; this commit only contributes the 40c3 look. - Jersey 10 and Hack fonts, the 40c3 palette and light/dark schemes, theme-color metas, web manifest and the 40c3 logo/footer. - Header: site name as green chip; nav row with the language switch as amber chip. The tagline stays out of the header, as in main. - Mobile (up to 666px): main's bottom navigation bar is kept and restyled (2px borders and dividers, current page green, language switch amber, visible keyboard focus). The old button-and-sheet styling is dropped. - Start pages: 40C3 heading; stale commented-out 39C3 block removed. - layouts/home-baseof.html removed; it was identical to baseof.html. - Removed the leftover 'h2 a' margin that made the news list 2px wider than a 390px viewport. - README: describe the bottom navigation bar. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
75a8d446e4
commit
6cbf724fce
7 changed files with 587 additions and 216 deletions
6
layouts/_partials/footer.html
Normal file
6
layouts/_partials/footer.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{- /* Overrides the zen theme's footer.html. Same as the theme's, plus the 40C3 logo. */ -}}
|
||||
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
|
||||
<p class="footer__event">{{ partial "logo-40c3.html" (dict "class" "footer__logo") }}</p>
|
||||
<p>{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
|
||||
{{ with $.Param "footer" }}<p>{{ . | site.Home.RenderString }}</p>{{ end }}
|
||||
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
{{- /* 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: dark)" content="#001300">
|
||||
{{- /*
|
||||
Open Graph image for link previews. The theme's head/meta.html writes og:image only for the
|
||||
"image" param; without it, this uses the first image in the page, a Markdown image or a
|
||||
|
|
|
|||
10
layouts/_partials/logo-40c3.html
Normal file
10
layouts/_partials/logo-40c3.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{{- /*
|
||||
40C3 text logo, picked to suit the colour scheme: green on dark, dark text colour on light.
|
||||
Params: class (optional, on the picture element).
|
||||
*/ -}}
|
||||
{{- $light := resources.Get "img/40c3/logo-text-b.svg" -}}
|
||||
{{- $dark := resources.Get "img/40c3/logo-text-0.svg" -}}
|
||||
<picture{{ with .class }} class="{{ . }}"{{ end }}>
|
||||
<source srcset="{{ $dark.RelPermalink }}" media="(prefers-color-scheme: dark)">
|
||||
<img src="{{ $light.RelPermalink }}" alt="40C3 MODEL_CITIZENS" width="138" height="71" loading="lazy">
|
||||
</picture>
|
||||
|
|
@ -1,4 +1,9 @@
|
|||
<nav class="main-menu{{ if not ($.Param "menuinheader") }} mx--xs layout__navigation{{ end }}" aria-label="{{ i18n "menu_title" }}">
|
||||
{{- /* 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. */ -}}
|
||||
<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">
|
||||
{{ $currentPage := . -}}
|
||||
{{ range site.Menus.main -}}
|
||||
|
|
@ -6,3 +11,6 @@
|
|||
{{ end -}}
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="region header__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
1
layouts/_shortcodes/logo-40c3.html
Normal file
1
layouts/_shortcodes/logo-40c3.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{- partial "logo-40c3.html" (dict "class" "event-logo") -}}
|
||||
|
|
@ -30,13 +30,9 @@
|
|||
<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 -}}
|
||||
{{ partial "menu.html" . }}
|
||||
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
|
||||
|
||||
<div id="main-content" tabindex="-1"></div>
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
{{ 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>
|
||||
Loading…
Reference in a new issue