Attempt a shortcode for the schedule overview
All checks were successful
/ build (pull_request) Successful in 25s

This commit is contained in:
Stefan Bethke 2026-10-16 18:53:55 +02:00
commit c0dfc9131d
24 changed files with 570 additions and 148 deletions

View file

@ -24,4 +24,23 @@ Use the `lang` shortcode to mark whether a tour is in German, English or bilingu
- English: `{{< lang en >}}`
- Bilingual: `{{< lang deen >}}`
For usage references check the [German](/content/de/39c3/_index.md) and [English](/content/en/39c3/_index.md) tour overview.
## Shortcode: Tour schedule
The tour overview of an event (`content/*/<event>/_index.md`) shows the schedule with `{{< schedule >}}`. It reads `data/schedule/<event>.yaml`, which is shared by both languages:
```yaml
days:
- day: 1
date: "2025-12-27"
tours:
- { time: "11:30", tour: xfel, lang: deen }
- { time: "12:00", tour: city-walk, lang: de }
```
- `tour` is the slug of the tour page in the event section. The card shows that page's title, without the event prefix, and links to it.
- `lang` is `de`, `en` or `deen`, or a list of these. It renders the same badge as the `lang` shortcode.
- `time` is `HH:MM` with a leading zero (`09:30`). Tours are sorted by time, so their order in the file doesn't matter.
Wide screens get one column per day on an hour grid, with tours that start at the same time side by side. The first column shows the hour wherever the first day has no tour in it. On narrow screens a day picker shows one day at a time, starting with today's day during the event.
For a different event than the page's section, pass its name: `{{< schedule 39c3 >}}`.