Schedule: show status fewseats as a short note next to the time
"Nur wenige Plätze über" / "only a few seats left", quieter than fully booked. Language badges no longer stretch when the time line wraps.
This commit is contained in:
parent
556dafb62c
commit
7815564078
4 changed files with 19 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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.
|
|||
<time class="schedule__time" datetime="{{ $day.date }}T{{ .time }}">{{ .time }}</time>
|
||||
{{- if $soldOut }}
|
||||
<span class="schedule__status">{{ i18n "schedule_soldout" }}</span>
|
||||
{{- else if $fewSeats }}
|
||||
<span class="schedule__status schedule__status--fewseats">{{ i18n "schedule_fewseats" }}</span>
|
||||
{{- end }}
|
||||
</span>
|
||||
{{- with .lang }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue