Tour pages: size the few-seats note like the book button, add a warning sign
All checks were successful
/ build (push) Successful in 1m59s
/ accessibility (push) Successful in 3m54s

The note now has the "Book now" button's font, padding and border, so
both are the same height, and starts as far in as the button and the
calendar links, so the three line up on narrow screens as well. Like
the button's shopping cart, it gets an icon: a warning triangle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vincent Mahnke 2026-11-18 00:21:24 +01:00
commit 1c88d25508
Signed by: ViMaSter
GPG key ID: 6D787326BA7D6469
2 changed files with 19 additions and 4 deletions

View file

@ -10,9 +10,23 @@
font-weight: bold;
}
/* The note stays in one piece; the button and the calendar links wrap after it. */
/* The note stays in one piece; the button and the calendar links wrap after it. Font, box and
icon spacing are the "Book now" button's (.button--small and .tour-book), so the two are the
same height and the three line up, next to each other and, on narrow screens, below each
other. */
.tour-date .fewseats-note {
display: inline-flex;
align-items: center;
gap: 0.4em;
margin-inline-start: 0.4em;
padding: 0.35rem 0.5rem;
border: 1px solid var(--fewseats);
font-family: var(--ff-headings);
font-size: var(--fs-xs);
vertical-align: middle;
white-space: nowrap;
text-box-trim: trim-both;
text-box-edge: cap alphabetic;
}
.tour-fewseats {

View file

@ -7,7 +7,8 @@ Hackertours-Admin writes one per date:
Without day (dates grouped under a day) only the time and what follows is shown.
status: soldout strikes the date through and marks it fully booked, without the button and the
calendar links; fewseats adds the "only a few seats left" note before the button. Other values
calendar links; fewseats adds the "only a few seats left" note, with a warning sign, before
the button. Other values
are ignored. Params and their wording: README, "Shortcode: Tour date".
*/ -}}
{{- $position := string .Position -}}
@ -42,7 +43,7 @@ are ignored. Params and their wording: README, "Shortcode: Tour date".
<del>{{ $text | safeHTML }}</del> <span class="tour-date__status">{{ i18n "schedule_soldout" }}</span>
{{- else -}}
{{ $text | safeHTML }}<br>
{{- if $fewSeats }}<span class="fewseats-note">{{ i18n "fewseats" }}</span> {{ end -}}
{{- if $fewSeats }}<span class="fewseats-note">{{ partial "fa-icon.html" "solid/triangle-exclamation" }}{{ i18n "fewseats" }}</span> {{ end -}}
{{- with $book }}{{ partial "tour-book.html" . }} {{ end -}}
{{- partial "tour-calendar.html" (dict
"page" .Page