From cbbbf59d169b3caae2121caf9c923b445e50c568 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 20 Sep 2023 15:44:02 -0700 Subject: fix(page): fix height limit with activity warning --- src/routes/+page.svelte | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/routes') diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index c5109c4a..76c05f86 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -19,7 +19,7 @@ document.querySelectorAll('.list').forEach((list) => { list.style.maxHeight = `calc(100vh - ${ document.querySelector('#list-container')?.getBoundingClientRect().bottom - }px)`; + }px + 1.1rem)`; }); } @@ -32,6 +32,16 @@ currentUserIdentity.name = currentUserIdentity.name; lastActivityWasToday = (await lastActivityDate(currentUserIdentity)).toDateString() >= new Date().toDateString(); + + if (!lastActivityWasToday) { + if ($settings.limitListHeight) { + document.querySelectorAll('.list').forEach((list) => { + list.style.maxHeight = `calc((100vh - ${ + document.querySelector('#list-container')?.getBoundingClientRect().bottom + }px) - 1.9rem)`; + }); + } + } } }); @@ -60,12 +70,10 @@ {#if !lastActivityWasToday} -
-

- You don't have any new activity statuses from the past day! Create one within {timeLeftToday()} - to keep your streak! -

-
+

+ You don't have any new activity statuses from the past day! Create one within {timeLeftToday()} + to keep your streak! +

{/if}
-- cgit v1.2.3