{{- $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) }} {{- $currentHour := string . -}} {{- $addClass := "" -}} {{- $firstRow := eq . $start -}} {{- if eq . $start }}{{ $addClass = "first-main-row"}}{{ end -}}
{{ printf "%2d:00" . }}
{{- range $id, $day := $days }}
{{- range $listSchedule }} {{- if ne .day $day }}{{ continue }}{{ end -}} {{- $sTime := time.AsTime (printf "2025-01-02T%s:00" .start) -}} {{- $evHour := $sTime.Format "15" -}} {{- if ne $currentHour $evHour }}{{ continue }}{{ end -}} {{- $hours := int ($sTime.Format "15") -}} {{- $minutes := int ($sTime.Format "4") -}} {{- $style := printf "--duration: %d; --minutes: %d;" .duration $minutes -}} {{/* warnf "%s" $style */}}
{{ .title }}
{{ end -}}
{{ end -}}
{{ printf "%2d:00" . }}
{{ end }}