From cb6721ab9685ce81ed8c81da777eea5f3287c916 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Fri, 10 May 2024 22:13:36 +0100 Subject: [PATCH] Calendar --- front/src/components/Calendar.svelte | 73 ++++++++++++++++++ front/src/pages/PageBooking.svelte | 9 ++- front/src/styles/_calendar.scss | 107 +++++++++++++++++++++++++++ front/src/styles/main.scss | 1 + 4 files changed, 186 insertions(+), 4 deletions(-) create mode 100644 front/src/components/Calendar.svelte create mode 100644 front/src/styles/_calendar.scss diff --git a/front/src/components/Calendar.svelte b/front/src/components/Calendar.svelte new file mode 100644 index 0000000..47659c5 --- /dev/null +++ b/front/src/components/Calendar.svelte @@ -0,0 +1,73 @@ + + + +
+
+

{monthLabels[month]} {year}

+ + +
+
+ {#each weekLabels as weekname} + {weekname} + {/each} +
+
+ {#each {length:firstDayOffset} as _} +
+ {/each} + {#each {length:monthLength} as _, i} +
+ +
+ {/each} + {#each {length:lastDayOffset} as _} + + {/each} +
+
diff --git a/front/src/pages/PageBooking.svelte b/front/src/pages/PageBooking.svelte index 57f7498..e03014c 100644 --- a/front/src/pages/PageBooking.svelte +++ b/front/src/pages/PageBooking.svelte @@ -1,5 +1,6 @@