From ef12ad4be5953d0e53e6acba8682a0465d23bb78 Mon Sep 17 00:00:00 2001 From: sinavir Date: Mon, 18 Jul 2022 21:56:47 +0200 Subject: [PATCH 1/2] better_display_on_small_screens --- src/App.svelte | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 2b2216e..ada5a5c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -47,11 +47,9 @@ locale: frLocale, allDayContent: '', headerToolbar: { - left: mobile ? false : 'prev,next today', + left: 'prev,next today', center: 'title', - right: mobile - ? 'prev,today,next dayGridMonth,timeGridWeek,timeGridDay,listWeek' - : 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' + right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' }, height: '100%', schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', From 17aa03295ca249afd3aa9906ff8fadb8dadfedad Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 26 Jul 2022 00:09:19 +0200 Subject: [PATCH 2/2] title on top on mobiles --- src/App.svelte | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index ada5a5c..359568f 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -32,6 +32,18 @@ const params = new URL(document.location).searchParams.getAll('c'); + const headers = mobile + ? { + left: 'title', + center: 'prev,today,next', + right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' + } + : { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' + }; + let calendar; let options = writable({ @@ -46,11 +58,7 @@ ], locale: frLocale, allDayContent: '', - headerToolbar: { - left: 'prev,next today', - center: 'title', - right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' - }, + headerToolbar: headers, height: '100%', schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', nowIndicator: true, @@ -140,6 +148,11 @@ margin-bottom: 0 !important; } + + :global(.fc-toolbar-chunk:not(:last-child)) { + margin-bottom: 0.25em; + } + @media (max-width: 765px) { :global(.fc-header-toolbar) { flex-direction: column;