Merge remote-tracking branch 'origin/schedule-title-status' into HEAD
All checks were successful
/ build (push) Successful in 15s
/ accessibility (push) Successful in 1m19s

# Conflicts:
#	i18n/de.yaml
#	i18n/en.yaml
This commit is contained in:
Stefan Bethke 2026-10-17 09:33:15 +02:00
commit 9b97ea86da
5 changed files with 44 additions and 3 deletions

View file

@ -76,16 +76,26 @@ so an hour without tours still gets a row.
{{- $seen = merge $seen (dict .time (add $nth 1)) }}
{{- $page := $.Page.GetPage .tour }}
{{- if not $page }}{{ warnf "schedule: %s: no page for tour %q on day %v" $event .tour $day.day }}{{ end }}
<li class="schedule__card" style="--schedule-row: {{ add (index $slotRow .time) $nth }}">
{{- $entry := . }}
{{- $soldOut := eq .status "soldout" }}
{{- /* 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 }}
<li class="schedule__card{{ if $soldOut }} schedule__card--soldout{{ end }}" style="--schedule-row: {{ add (index $slotRow .time) $nth }}">
<span class="schedule__when">
<time class="schedule__time" datetime="{{ $day.date }}T{{ .time }}">{{ .time }}</time>
{{- if $soldOut }}
<span class="schedule__status">{{ i18n "schedule_soldout" }}</span>
{{- end }}
</span>
{{- with .lang }}
<span class="schedule__langs">{{ range (cond (reflect.IsSlice .) . (slice .)) }}{{ partial "lang-badge.html" (dict "code" . "class" "schedule__lang") }}{{ end }}</span>
{{- end }}
{{- with $page }}
{{- $title := .LinkTitle | replaceRE $prefix "" }}
{{- $title := $ownTitle | default (.LinkTitle | replaceRE $prefix "") }}
<a class="schedule__title" href="{{ .RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
{{- else }}
<span class="schedule__title">{{ .tour }}</span>
<span class="schedule__title">{{ $ownTitle | default $entry.tour }}</span>
{{- end }}
</li>
{{- end }}