From 0a415a4958c6a1cf80e118fc3677a2c1e065754f Mon Sep 17 00:00:00 2001 From: Vincent Mahnke Date: Mon, 9 Nov 2026 00:28:00 +0100 Subject: [PATCH] feat: Takes over the 40C3 startpage's background and headings Light green background (#dff0d4), which is also the text colour in the dark scheme. Page titles and the site name are capitals like the startpage's h1, and section headings are green boxes like its "GET INFORMED", so the home page's 40C3 heading is now an h2. The EH22 logo credit moves to the footer. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 2 +- assets/css/_custom.css | 52 ++++++++++++++++++++----------- assets/css/_events.css | 7 +---- content/de/37c3/electrum/index.md | 2 +- content/de/38c3/electrum/index.md | 2 +- content/de/_index.md | 2 +- content/en/_index.md | 2 +- data/events.yaml | 1 + layouts/_partials/footer.html | 10 +++++- layouts/_partials/head/extra.html | 2 +- layouts/_shortcodes/events.html | 9 +----- static/site.webmanifest | 4 +-- 12 files changed, 53 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 0f229a4..e80f7e9 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ events: - `motto` and `venue` are shown as they are. - `start` and `end` are `YYYY-MM-DD`. The card shows the range in the page's language, as on the 40C3 start page: `27.–30. Dezember 2025`, `27–30 December 2025`. Leave out `end` for a one-day event. - `status` (optional): `inprogress` greys the card out, without a link, and marks it "In Vorbereitung" / "In progress", for an event whose tours aren't online yet. Remove it once the event's section exists. -- `credit` (optional) names the logo's authors and licence in Markdown, shown below the cards, for logos whose licence asks for it. +- `credit` (optional) names the logo's authors and licence in Markdown, for logos whose licence asks for it. It is shown in the footer of the pages with the cards. The heading shows the event's logo, `assets/img/events/.svg`, in the text colour. The SVG's own colours are ignored, only its shape counts, so use a version without a background. Where each logo comes from, and its licence, is listed in [assets/img/events/Sources.txt](assets/img/events/Sources.txt). diff --git a/assets/css/_custom.css b/assets/css/_custom.css index c0f3378..05b4462 100644 --- a/assets/css/_custom.css +++ b/assets/css/_custom.css @@ -3,12 +3,12 @@ @import './_events.css'; /* - * 40C3 "MODEL_CITIZENS" design, after the 40C3 styleguide. + * 40C3 "MODEL_CITIZENS" design, after the 40C3 styleguide and the 40C3 startpage + * (events.ccc.de/congress/2026/infos/startpage.html). * Key colours: green (0), paper (A) and ink (B); the other colours are accents. * Dark: ink background, paper text, green accents. - * 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. + * Light: paper background and ink text. + * Paper is the startpage's light green (#dff0d4), not the styleguide's grey (#ebedf0). * 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,7 +22,7 @@ --c40-coral: #ea6f82; --c40-orange: #f88a30; --c40-amber: #ffbc40; - --c40-paper: #ebedf0; + --c40-paper: #dff0d4; --c40-ink: #001300; --c40-light-bg: var(--c40-paper); @@ -129,28 +129,36 @@ mark { color: var(--c40-on-fill); } -/* Headings: Jersey 10 for the big ones. h1 is the "loud header" (filled chip), h3 and below - are Hack Bold, h3 underlined like the styleguide's subheads. */ +/* Headings: Jersey 10 for the big ones, as on the 40C3 startpage. Page titles (h1) are capitals + in the foreground colour (green in the dark scheme), section headings (h2) capitals on a green + box. Post titles in lists and the schedule's days are plain h2s, the size of the card titles. + h3 and below are Hack Bold, h3 underlined like the styleguide's subheads. */ h1, h2 { + color: light-dark(var(--c40-light-fg), var(--c40-green)); font-family: var(--ff-display); - font-weight: 400; + /* Jersey 10 has a single weight; like the startpage, this has browsers draw it bolder. */ + font-weight: bold; letter-spacing: 0; - line-height: 1; + line-height: normal; } h1 { - width: fit-content; - max-width: 100%; - padding: 0.12em 0.3em 0.2em; - background: var(--c40-green); - color: var(--c40-on-fill); - font-size: calc(var(--fs-xxl) * var(--display-scale)); + font-size: min(3rem, calc(var(--fs-xxl) * var(--display-scale))); + text-transform: uppercase; } h2 { - color: light-dark(var(--c40-light-fg), var(--c40-green)); - font-size: calc(var(--fs-xl) * var(--display-scale)); + font-size: calc(var(--fs-l) * var(--display-scale)); +} + +h2:not(.title, .schedule__day-title) { + width: fit-content; + padding-inline: 1rem; + background: var(--c40-green); + color: var(--c40-on-fill); + font-size: min(2.4rem, calc(var(--fs-xl) * var(--display-scale))); + text-transform: uppercase; } h3 { @@ -174,7 +182,7 @@ h3 { white-space: pre-line; } -/* Branding: the logo, and the site name as a loud header chip like the page's own h1. */ +/* Branding: the logo, and the site name set like the page titles. */ .header { color: var(--color-text); } @@ -207,11 +215,17 @@ h3 { } } +/* The name takes the heading's colour; on hover and focus it gets the links' green chip, with + dark text, because green text would vanish on it. */ .header__site-link { - color: inherit; + &:link, + &:visited { + color: inherit; + } &:hover, &:focus-visible { + color: var(--c40-on-fill); text-decoration: underline; } } diff --git a/assets/css/_events.css b/assets/css/_events.css index 8de5a73..5cbdf69 100644 --- a/assets/css/_events.css +++ b/assets/css/_events.css @@ -51,7 +51,7 @@ color: inherit; font-family: var(--ff-display); font-size: calc(var(--fs-l) * var(--display-scale)); - font-weight: 400; + font-weight: bold; line-height: 1; text-decoration: none; } @@ -131,11 +131,6 @@ a.event-card:focus-visible { } } -.event-cards__credits { - color: var(--color-text-meta); - font-size: var(--fs-xs); -} - /* Forced colours drop background colours, and with them the masked logos. */ @media (forced-colors: active) { .event-card__logo { diff --git a/content/de/37c3/electrum/index.md b/content/de/37c3/electrum/index.md index 089b023..a5ded77 100644 --- a/content/de/37c3/electrum/index.md +++ b/content/de/37c3/electrum/index.md @@ -10,7 +10,7 @@ Das electrum ist Hamburgs Museum der Elektrizität und Technik. Ohne Strom geht {{< gallery-image src="Electrum_Hamburg-Harburg.nnw.jpg" alt="Museum electrum in Hamburg-Harburg, cc-by-sa NordNordWest" >}} {{< /gallery >}} -# Daten +## Daten * Tag 1 (27.12) **12:30 Uhr** * Dauer: 1,5h * Spache: Deutsch diff --git a/content/de/38c3/electrum/index.md b/content/de/38c3/electrum/index.md index 7e59539..3d1dcd9 100644 --- a/content/de/38c3/electrum/index.md +++ b/content/de/38c3/electrum/index.md @@ -18,7 +18,7 @@ Lizenz: (https://creativecommons.org/licenses/by-sa/3.0/de/legalcode) Das Museum wird von einem Verein geführt und unterstützt. Ihr seid herzlich dazu eingeladen, den Verein ebenfalls, entweder aktiv oder passiv, zu unterstützen, z. B. in [Form einer Vereinsmitgliedschaft](https://www.electrum-hamburg.de/content/download/71/298?version=2). -# Daten +## Daten * ~~Tag 3 (29.12.) **13:45 Uhr** Deutsch~~ ausgebucht * ~~Tag 3 (29.12.) **14:45 Uhr** Englisch~~ ausgebucht * Dauer: 1 Stunde diff --git a/content/de/_index.md b/content/de/_index.md index dd0b01a..f9ce871 100644 --- a/content/de/_index.md +++ b/content/de/_index.md @@ -14,7 +14,7 @@ cascade: intro: Wir von Hamburg Hackertours zeigen euch die Stadt! --- -# 40C3 +## 40C3 Wir bereiten Touren für den [40C3](https://events.ccc.de/category/40c3/) vor. In Kürze mehr! diff --git a/content/en/_index.md b/content/en/_index.md index e61a3e7..ab30599 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -14,7 +14,7 @@ cascade: intro: We at Hamburg Hackertours show you around the city! --- -# 40C3 +## 40C3 We are preparing tours for [40C3](https://events.ccc.de/category/40c3/). Stay tuned! diff --git a/data/events.yaml b/data/events.yaml index 9579788..949e184 100644 --- a/data/events.yaml +++ b/data/events.yaml @@ -1,6 +1,7 @@ # Event cards on the home page, rendered by the events shortcode, newest first. # event: the event's section (content/*//) and logo (assets/img/events/.svg). # status: inprogress greys out the card and leaves out the link, for an event without tours yet. +# credit: the logo's authors and licence in Markdown, shown in the footer of pages with the cards. events: - event: 40c3 title: { de: 40. Chaos Communication Congress, en: 40th Chaos Communication Congress } diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index e39f339..0e63352 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -1,6 +1,14 @@ -{{- /* Overrides the zen theme's footer.html. Same as the theme's, plus the 40C3 logo. */ -}} +{{- /* Overrides the zen theme's footer.html. Same as the theme's, plus the 40C3 logo and, on pages +with event cards, the credits for event logos whose licence asks for one (credit in data/events.yaml). */ -}} {{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}

{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}© {{ site.Title }}{{ end }}

+{{- if .HasShortcode "events" }} +{{- $credits := slice }} +{{- with hugo.Data.events }}{{ range .events }}{{ if .credit }}{{ $credits = $credits | append (dict "name" (.name | default (upper .event)) "credit" .credit) }}{{ end }}{{ end }}{{ end }} +{{- with $credits }} +

{{ range $index, $entry := . }}{{ if $index }} · {{ end }}{{ i18n "events_logo" (dict "Name" $entry.name) }}: {{ $entry.credit | site.Home.RenderString }}{{ end }}

+{{- end }} +{{- end }} {{ with $.Param "footer" }}

{{ . | site.Home.RenderString }}

{{ end }} {{ if $.Param "poweredby" }}

Powered by Hugo and the Zen theme.

{{ end }} diff --git a/layouts/_partials/head/extra.html b/layouts/_partials/head/extra.html index 957c2d7..94a21b7 100644 --- a/layouts/_partials/head/extra.html +++ b/layouts/_partials/head/extra.html @@ -1,6 +1,6 @@ {{ partial "head/fonts.html" . }} {{- /* 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/_shortcodes/events.html b/layouts/_shortcodes/events.html index c5e93a4..b8de3a8 100644 --- a/layouts/_shortcodes/events.html +++ b/layouts/_shortcodes/events.html @@ -3,7 +3,7 @@ Event cards from data/events.yaml, after the cards on the 40C3 start page (events.ccc.de/congress/2026/infos/startpage.html): the event's name and logo (assets/img/events/.svg) in a heading bar, its motto, full name, dates and venue below. Cards link to the event's section; an event that is in progress, or has no section, gets a -greyed-out card without a link. Logo credits from the data file follow the cards. +greyed-out card without a link. Logo credits from the data file are in the footer (footer.html). Usage: {{< events >}} */ -}} @@ -12,7 +12,6 @@ Usage: {{< events >}} {{- if not $events -}} {{- warnidf "warning-events-empty" "events: no events in data/events.yaml: %s" .Position -}} {{- else -}} -{{- $credits := slice -}}
    {{- range $events }} {{- $name := .name | default (upper .event) }} @@ -45,7 +44,6 @@ Usage: {{< events >}} {{- else }} {{- warnf "events: no logo assets/img/events/%s.svg" .event }} {{- end }} -{{- with .credit }}{{ $credits = $credits | append (dict "name" $name "credit" .) }}{{ end }}
  • {{- if $link }} @@ -74,9 +72,4 @@ Usage: {{< events >}}
  • {{- end }}
-{{- with $credits }} -

-{{- range $index, $entry := . }}{{ if $index }} · {{ end }}{{ i18n "events_logo" (dict "Name" $entry.name) }}: {{ $.Page.RenderString $entry.credit }}{{ end -}} -

-{{- end }} {{- end }} diff --git a/static/site.webmanifest b/static/site.webmanifest index 485596a..4214259 100644 --- a/static/site.webmanifest +++ b/static/site.webmanifest @@ -15,7 +15,7 @@ "purpose": "maskable" } ], - "theme_color": "#ebedf0", - "background_color": "#ebedf0", + "theme_color": "#dff0d4", + "background_color": "#dff0d4", "display": "standalone" } \ No newline at end of file