From d04f0802ed59458fafad2dfd0903785cde122530 Mon Sep 17 00:00:00 2001 From: William Diakite Date: Wed, 27 Sep 2023 10:47:05 -0400 Subject: [PATCH] adapt with landing page #14 --- src/lib/components/LandingPage.svelte | 2 +- src/lib/components/Nav.svelte | 16 +++++++--------- src/lib/styles/style.css | 13 ++++++++++++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/lib/components/LandingPage.svelte b/src/lib/components/LandingPage.svelte index 60fea17..abe31c7 100644 --- a/src/lib/components/LandingPage.svelte +++ b/src/lib/components/LandingPage.svelte @@ -113,7 +113,7 @@ /** Presentation */ .fill-vh { - height: 85vh; + height: 90vh; } .presentation-wrapper { diff --git a/src/lib/components/Nav.svelte b/src/lib/components/Nav.svelte index a138809..389a8c1 100644 --- a/src/lib/components/Nav.svelte +++ b/src/lib/components/Nav.svelte @@ -43,13 +43,13 @@ let prevScrollY: number = 0; const handleScroll = (e: Event) => { const nav = document.querySelector('nav.main'); - const top = nav?.getBoundingClientRect().top ?? 0; - // console.log({ top, scrollY }); + const top = nav?.getBoundingClientRect().top ?? 500; + console.log({ top, scrollY }); if ($showPresentation) { - if (top === 0) { + if (top <= 0) { + nav?.classList.remove('bottom-nav'); $showPresentation = false; - $showPresentation = $showPresentation; } } else { // if scrolling down @@ -65,6 +65,8 @@ } }; + $: console.log('showPresentation', $showPresentation); + const toggleNavMenu = () => { $showNavMenu = !$showNavMenu; }; @@ -94,7 +96,7 @@ {#if !smallScreen}