diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html index 1b29d31f..30dfec6e 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/list.html @@ -3,6 +3,9 @@ {{- $list = sort $list "start" -}} {{- $list = sort $list "class" -}} {{- $list = sort $list "title" -}} +{{- $cals := apply $list "index" "." "class" -}} +{{- $cals = uniq $cals -}} +{{ warnf "%s" $cals}} @@ -39,3 +42,42 @@ {{- end}}
+ +{{ range $cals }} +{{- $class := . -}} +

Class {{ with . }}{{ . }}{{else}}nil{{end}}

+ + + + + + + + + + + + + {{ range $list -}} + {{- if ne .class $class }}{{ continue }}{{ end }} + + + + + + + + {{- end}} + +
GruppeJahrgangTagZeitOrt
+ {{ .title }}{{ with .subtitle }} - {{ . }}{{ end }} + {{ if (.extern | default false) }}(ext.){{ 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 }}
+{{ end }}