diff options
Diffstat (limited to 'src/routes/+page.svelte')
| -rw-r--r-- | src/routes/+page.svelte | 22 |
1 files changed, 15 insertions, 7 deletions
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 @@ </script> {#if !lastActivityWasToday} - <div id="activity-warning"> - <p> - You don't have any new activity statuses from the past day! Create one within {timeLeftToday()} - to keep your streak! - </p> - </div> + <p> + You don't have any new activity statuses from the past day! Create one within {timeLeftToday()} + to keep your streak! + </p> {/if} <div id="list-container"> |