{{- $start := .Get 0 -}} {{- $end := .Get 1 -}} {{- $days := after 2 .Params -}} {{- $numDays := len $days -}} {{- $calendar := $.Site.Data.calendar.calendar -}} {{- $listSchedule := partialCached "tsc/calendar/list" . }}
{{ range $days }}
{{ . }}
{{ end }}
{{ range $days }}
Vorne
Mitte
Hinten
{{ end }}
{{ range (seq $start $end) }}
{{ printf "%2d:00" . }}
{{ printf "%2d:00" . }}
{{ end }}
{{ range $id, $day := $days }}
{{ range $listSchedule }} {{- if ne .day $day }}{{ continue }}{{ end }} {{- $sTime := time.AsTime (printf "2025-01-02T%s:00" .start) -}} {{- $hours := int ($sTime.Format "15") -}} {{- $minutes := int ($sTime.Format "4") -}} {{/* warnf "%T" $hours */}} {{ $hours = add $hours (sub 0 $start) (div $minutes 60.0) }} {{/* print $hours */}} {{/* $hours = $hours - 0 + ($minutes / 60.0) */}} {{- $top := mul $hours 60 -}} {{- $height := mul (div .duration 60.0) 60 -}} {{- $style := printf "top: %1.0fpx; height: %1.0fpx;" $top $height -}} {{/* warnf "%s" $style */}}
{{ .title }}
{{ end }}
{{ end }}
{{ range $idx, $val := (seq $start $end)}}
{{ end }}
{{ range $days }} {{ end }} {{ range $days }} {{ end }} {{ range seq $start $end }} {{ $hour := . }} {{ range seq 0 15 45 }} {{ $firstMin := "" }} {{ if eq . 0 }} {{ $firstMin = "first-min" }} {{ end }} {{ $time := printf "%2d:%02d" $hour . }} {{ if or (eq . 0) (eq . 30) }} {{ end }} {{ range $days }} {{ $day := . }} {{ $firstRoom := true }} {{ range slice "vorne" "mitte" "hinten" }} {{ $room := . }} {{ $addClass := "" }} {{ if $firstRoom }} {{ $addClass = "first-col-of-room" }} {{ $firstRoom = false }} {{ end }} {{ with index (index (index $calendar .) $day) $time }} {{ else }} {{ end }} {{ end }} {{ end }} {{ if or (eq . 0) (eq . 30) }} {{ $time := printf "%2d.%02d" $hour . }} {{ end }} {{ end }} {{ end }}
{{ . }}
vorne mitte hinten
{{ $time }}
{{ .title }}
{{ $time }}