From 0e49dfaba01d41beb978286d84bad6f15b2a7c9a Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 11 Nov 2024 10:40:58 +0100 Subject: [PATCH] refactor(Calendar day view): changes the classes for fhc-calendar-day-page so that the width is divided in calendar and content --- public/css/components/calendar.css | 28 ++++++++++++ public/js/components/Calendar/Day/Page.js | 56 +++++++++++++---------- 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/public/css/components/calendar.css b/public/css/components/calendar.css index 7cb105b85..2806ec60f 100644 --- a/public/css/components/calendar.css +++ b/public/css/components/calendar.css @@ -63,6 +63,34 @@ display: grid; } +.fhc-calendar-day-page { + /*aspect-ratio: 7/6;*/ + min-height: 0; +} +.fhc-calendar-day-page > div { + /*transform: translate(-0.75em, -0.75em);*/ + /*width: calc(100% + 1.5em);*/ + height: calc(100% + 1.5em); +} +.fhc-calendar-day-page .flex-column > div { + padding-left: 3em; +} +.fhc-calendar-day-page .flex-column { + border-right: 1px solid #dee2e6; +} +.fhc-calendar-day-page .events { + display: grid; + grid-template-columns: 3em 1fr; + margin-left: -3em; + /*min-height: 266.6666666667%;*/ +} +.fhc-calendar-day-page .events .day { + gap: 1px; +} +.fhc-calendar-day-page .events .hours, .fhc-calendar-day-page .events .day { + display: grid; +} + .fhc-calendar-lg .fhc-calendar-month-page-day, .fhc-calendar-lg .fhc-calendar-month-page-weekday, .fhc-calendar-md .fhc-calendar-month-page-day, diff --git a/public/js/components/Calendar/Day/Page.js b/public/js/components/Calendar/Day/Page.js index c66dcf33a..7ff94b5e5 100644 --- a/public/js/components/Calendar/Day/Page.js +++ b/public/js/components/Calendar/Day/Page.js @@ -138,33 +138,43 @@ export default { setTimeout(() => this.$refs.eventcontainer.scrollTop = this.$refs.eventcontainer.scrollHeight / 3 + 1, 0); }, template: /*html*/` -
-
-
-
-
{{day.toLocaleString(undefined, {weekday: size < 2 ? 'narrow' : (size < 3 ? 'short' : 'long')})}}
- {{day.toLocaleString(undefined, [{day:'numeric',month:'numeric'},{day:'numeric',month:'numeric'},{day:'numeric',month:'numeric'},{dateStyle:'short'}][this.size])}} +
+
+
+
+
+ +
+
+
+
+ {{hourPositionTime}} +
+
+
+
{{hour}}:00
+
+
+
+ +

this is a placeholder which means that no template was passed to the Calendar Page slot

+
+
+ +
+
-
-
-
- {{hourPositionTime}} -
-
-
-
{{hour}}:00
-
-
-
- -

this is a placeholder which means that no template was passed to the Calendar Page slot

-
-
- -
+
+
+
+

other content goes in here

+
` }