diff --git a/content/page/info/raumbelegung/index.md b/content/page/info/raumbelegung/index.md index 6bece4d..cd9baa3 100644 --- a/content/page/info/raumbelegung/index.md +++ b/content/page/info/raumbelegung/index.md @@ -19,7 +19,6 @@ Um die Verfügbarkeit für alle Mitglieder transparent zu halten und Überschnei Weitere Infos zur Reservierung findest du unterhalb der Kalender. -{{< tsc/iframe >}}https://cloud.tsc-vfl.de/index.php/apps/calendar/embed/d5KikZAZJfJxMHyK-RyoP44ym84oa5NFm-8DBYtgZwmkDsdemr/listYear/now{{< /tsc/iframe >}} {{}} @@ -29,6 +28,9 @@ Weitere Infos zur Reservierung findest du unterhalb der Kalender. {{< tsc/calendar/schedule 10 22 "Mon" "Tue" "Wed" >}} {{< tsc/show-calendar 10 22 "Mo" "Di" "Mi" >}} + +{{< tsc/calendar/schedule 10 22 "Thu" "Fri" >}} + {{< tsc/show-calendar 10 22 "Do" "Fr" >}} diff --git a/themes/tsc_vfl/assets/css/_responsive.scss b/themes/tsc_vfl/assets/css/_responsive.scss index 162825d..d086a8f 100644 --- a/themes/tsc_vfl/assets/css/_responsive.scss +++ b/themes/tsc_vfl/assets/css/_responsive.scss @@ -11,9 +11,4 @@ } } -@mixin mouse-available { - @media screen and (pointer: fine) { - @content; - } -} diff --git a/themes/tsc_vfl/assets/css/_schedule.scss b/themes/tsc_vfl/assets/css/_schedule.scss index 94a34e1..ae22b3c 100644 --- a/themes/tsc_vfl/assets/css/_schedule.scss +++ b/themes/tsc_vfl/assets/css/_schedule.scss @@ -1,9 +1,19 @@ @use './responsive.scss' as r; @use './colors.scss' as *; +$calendar-height-row: 60px; + .calendar-schedule { display: grid; + font-size: xx-small; + + @include r.media-large { + & { + font-size: x-small; + } + } + .header { display: contents; font-weight: bold; @@ -19,13 +29,6 @@ text-align: center; } } - - .first-row { - grid-row: 1; - } - .second-row { - grid-row: 2; - } } .times { @@ -35,6 +38,57 @@ } } + .table-row { + height: $calendar-height-row; + + border-top: solid lightgray 1px; + } + + .main-entry { + position: relative; + + .event { + position: absolute; + z-index: 1; + + top: calc($calendar-height-row * var(--minutes) / 60.0); + height: calc($calendar-height-row * var(--duration) / 60.0); + + width: 30%; + box-sizing: border-box; + padding: 1px 0; + // overflow: hidden; + + --fg-color: black; + + &.room-vorne { + --bg-color: var(--color-vhvorne); + left: 2.5%; + } + &.room-mitte { + --bg-color: var(--color-vhmitte); + left: 35% + } + &.room-hinten { + --bg-color: var(--color-vhhinten); + --fg-color: white; + left: 67.5%; + } + + div { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 3px; + border-radius: 4px; + + color: var(--fg-color); + background-color: var(--bg-color); + } + + } + } + .cal-main-content { grid-row: 3 / 100; position: relative; @@ -88,14 +142,6 @@ } } - .background { - display: contents; - - > * { - grid-column: 1 / -1; - min-height: 10px; - } - } } .calendar-grid-2-days { diff --git a/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/schedule.html b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/schedule.html index d53dc92..d62bd30 100644 --- a/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/schedule.html +++ b/themes/tsc_vfl/layouts/shortcodes/tsc/calendar/schedule.html @@ -21,7 +21,39 @@ {{ end }}
-
+ {{ range (seq $start $end) }} + {{- $currentHour := string . -}} + {{- $addClass := "" -}} + {{- $firstRow := eq . $start -}} + {{- if eq . $start }}{{ $addClass = "first-main-row"}}{{ end -}} + {{ warnf "Current hour: %s (%T)" $currentHour $currentHour }} +
{{ 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") -}} + {{/* warnf "%T" $hours */}} + {{/* $hours = add $hours (sub 0 $start) (div $minutes 60.0) */}} + {{/* print $hours */}} + {{/* $hours = $hours - 0 + ($minutes / 60.0) */}} + {{- $style := printf "--duration: %d; --minutes: %d;" .duration $minutes -}} + {{/* warnf "%s" $style */}} +
+
+ {{ .title }} +
+
+ {{ end -}} +
+ {{ end -}} +
{{ printf "%2d:00" . }}
+ {{ 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 }} -
{{ . }}
vornemittehinten
{{ $time }} -
-
- {{ .title }} -
-
-
{{ $time }}