From b944b4566e7b6bbb9b690bdebf361ab347553e38 Mon Sep 17 00:00:00 2001 From: OleSTEEP Date: Thu, 16 Oct 2025 18:01:23 +0300 Subject: [PATCH] frontend: mark current day on calendar --- frontend/src/lib/components/calendar.svelte | 35 ++++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/calendar.svelte b/frontend/src/lib/components/calendar.svelte index fd26664..01fab07 100644 --- a/frontend/src/lib/components/calendar.svelte +++ b/frontend/src/lib/components/calendar.svelte @@ -7,7 +7,7 @@ let now = new Date(); let year = now.getFullYear(); // this is the month & year displayed let month = now.getMonth(); - let current = now.getDay(); + let current = now.getDate(); var days: Array = []; // The days to display in each box $: month,year,initContent(); @@ -88,9 +88,9 @@ {#each days as day}
  • {#if selected == day} - + {:else} - + {/if}
  • {/each} @@ -162,6 +162,13 @@ cursor: pointer; } + .days li .current { + height: 2em; + padding: 5px; + aspect-ratio: 1/1; + border-radius: 30%; + } + .days li .active { height: 2em; padding: 5px; @@ -195,6 +202,10 @@ background: #5C8DC0; } + .month ul button { + color: white; + } + .month ul li { color: white; } @@ -217,7 +228,12 @@ .days li .active { color: white !important; - background: #5C8DC0; + background: #5C8DC0 !important; + } + + .days li .current { + color: white !important; + background: red; } } @@ -226,6 +242,10 @@ background: #2791FF; } + .month ul button { + color: white; + } + .month ul li { color: white; } @@ -248,7 +268,12 @@ .days li .active { color: white !important; - background: #2791FF; + background: #2791FF !important; + } + + .days li .current { + color: white !important; + background: red; } } \ No newline at end of file