Merge branch 'schedule-title-status' into 40c3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
c2d4c63b6f
5 changed files with 44 additions and 3 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue