From 78155640786c2e15bb21d0f12b48a3865e6099b2 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Mon, 16 Nov 2026 09:54:04 +0100 Subject: [PATCH] Schedule: show status fewseats as a short note next to the time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Nur wenige Plätze über" / "only a few seats left", quieter than fully booked. Language badges no longer stretch when the time line wraps. --- themes/hackertours/assets/css/_schedule.css | 13 +++++++++++++ themes/hackertours/i18n/de.yaml | 1 + themes/hackertours/i18n/en.yaml | 1 + .../hackertours/layouts/_shortcodes/schedule.html | 4 ++++ 4 files changed, 19 insertions(+) diff --git a/themes/hackertours/assets/css/_schedule.css b/themes/hackertours/assets/css/_schedule.css index 7757cfc..fbc29c7 100644 --- a/themes/hackertours/assets/css/_schedule.css +++ b/themes/hackertours/assets/css/_schedule.css @@ -196,6 +196,17 @@ color: var(--color-text-meta); } +/* Only a few seats left: a quieter note than "fully booked", in the case the tour pages + use. If it doesn't fit next to the time it moves below it as a whole, and only breaks + (in balanced lines) when the card is narrower than the note. */ +.schedule__status--fewseats { + min-width: 0; + font-weight: normal; + letter-spacing: normal; + text-transform: none; + text-wrap: balance; +} + /* Fully booked: still listed and linked, but muted. */ .schedule__card--soldout { border-inline-start-color: var(--schedule-line); @@ -218,6 +229,8 @@ position: relative; z-index: 1; display: flex; + /* Badges keep their height when the status note wraps the time line. */ + align-items: start; gap: 0.25rem; } diff --git a/themes/hackertours/i18n/de.yaml b/themes/hackertours/i18n/de.yaml index ad41250..f19e60f 100644 --- a/themes/hackertours/i18n/de.yaml +++ b/themes/hackertours/i18n/de.yaml @@ -11,6 +11,7 @@ logo_alt: "Hamburg Hackertours – Startseite" map_39c3_title: "Karte der 39C3-Touren mit Wegen vom CCH (uMap)" schedule_day: "Tag {{ .Day }}" schedule_pick_day: "Tag auswählen" +schedule_fewseats: "Nur wenige Plätze über" schedule_soldout: "ausgebucht" skip_to_content: "Zum Inhalt springen" tour_map_label: "Karte der Tourorte" diff --git a/themes/hackertours/i18n/en.yaml b/themes/hackertours/i18n/en.yaml index db6db3c..a05e6b3 100644 --- a/themes/hackertours/i18n/en.yaml +++ b/themes/hackertours/i18n/en.yaml @@ -11,6 +11,7 @@ logo_alt: "Hamburg Hackertours – home page" map_39c3_title: "Map of the 39C3 tours with routes from the CCH (uMap)" schedule_day: "Day {{ .Day }}" schedule_pick_day: "Choose a day" +schedule_fewseats: "only a few seats left" schedule_soldout: "fully booked" skip_to_content: "Skip to content" tour_map_label: "Map of the tour locations" diff --git a/themes/hackertours/layouts/_shortcodes/schedule.html b/themes/hackertours/layouts/_shortcodes/schedule.html index 226cb5e..e2247ab 100644 --- a/themes/hackertours/layouts/_shortcodes/schedule.html +++ b/themes/hackertours/layouts/_shortcodes/schedule.html @@ -77,7 +77,9 @@ so an hour without tours still gets a row. {{- $page := $.Page.GetPage .tour }} {{- if not $page }}{{ warnf "schedule: %s: no page for tour %q on day %v" $event .tour $day.day }}{{ end }} {{- $entry := . }} +{{- /* Other status values are ignored. */}} {{- $soldOut := eq .status "soldout" }} +{{- $fewSeats := eq .status "fewseats" }} {{- /* A tour's own title, in the page's language, replaces its page's title. */}} {{- $ownTitle := "" }} {{- with .title }}{{ $ownTitle = index . site.Language.Name | default (index . "en") }}{{ end }} @@ -102,6 +104,8 @@ so an hour without tours still gets a row. {{- if $soldOut }} {{ i18n "schedule_soldout" }} +{{- else if $fewSeats }} +{{ i18n "schedule_fewseats" }} {{- end }} {{- with .lang }}