From b112a13c7e8f5e4a50c3e43e3edf60f4c73e1ba5 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Mon, 20 Jan 2025 12:41:37 +0100 Subject: [PATCH] Create list of all configured room occupations --- content/page/info/raumbelegung/liste.md | 13 ++++++ .../layouts/shortcodes/tsc/calendar/list.html | 40 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 content/page/info/raumbelegung/liste.md create mode 100644 themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html diff --git a/content/page/info/raumbelegung/liste.md b/content/page/info/raumbelegung/liste.md new file mode 100644 index 0000000..6de9491 --- /dev/null +++ b/content/page/info/raumbelegung/liste.md @@ -0,0 +1,13 @@ +--- +title: Raumbelegungs Liste +date: 2025-01-20T09:02:00 +draft: false +build: + list: local + # render: never +--- + +Auf dieser Seite werden die Angebote des Vereins noch einmal zusammen gefasst. +Dies dient der internen Kontrolle im Verein. + +{{< tsc/calendar/list >}} diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html new file mode 100644 index 0000000..714d1e4 --- /dev/null +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html @@ -0,0 +1,40 @@ +{{- $list := partialCached "tsc/calendar/list" . -}} +{{- $list = sort $list "weight" -}} +{{- $list = sort $list "start" -}} +{{- $list = sort $list "class" -}} +{{- $list = sort $list "title" -}} + + + + + + + + + + + + + {{ range $list -}} + + + + + + + + + {{- end}} + +
GruppeKategorieJahrgangTagZeitOrt
+ {{ .title }}{{ with .subtitle }} - {{ . }}{{ end }} + + {{ with .class }}{{ . }}{{ end }} + {{ with .age }}{{ . }}{{ end }}{{ index site.Data.days .day }} + {{- $startTimeStr := printf "2025-01-02T%s:00" .start -}} + {{- $startTime := time.AsTime $startTimeStr -}} + {{- $duration := time.Duration "minute" .duration -}} + {{- $endTime := $startTime.Add $duration}} + {{/* warnf "Start %s, duration %s, %s" $startTime $duration $endTime */}} + {{- $startTime.Format "15:04"}} - {{ $endTime.Format "15:04" }} + {{ .room }}