From 86e95b61d197b853ad4b114d41a1367db50fc572 Mon Sep 17 00:00:00 2001 From: Nikola Ganchev Date: Thu, 21 Sep 2023 12:33:39 +0300 Subject: [PATCH 1/6] Separate MobileNavbar.svelte from Navbar.svelte --- src/lib/MobileNavbar.svelte | 188 ++++++++++++++++++++++++++++++++++++ src/lib/Navbar.svelte | 161 +++--------------------------- 2 files changed, 199 insertions(+), 150 deletions(-) create mode 100644 src/lib/MobileNavbar.svelte diff --git a/src/lib/MobileNavbar.svelte b/src/lib/MobileNavbar.svelte new file mode 100644 index 0000000..396a528 --- /dev/null +++ b/src/lib/MobileNavbar.svelte @@ -0,0 +1,188 @@ + + + +
+
+ +
+ +
+ + diff --git a/src/lib/Navbar.svelte b/src/lib/Navbar.svelte index f69d508..565dfad 100644 --- a/src/lib/Navbar.svelte +++ b/src/lib/Navbar.svelte @@ -1,23 +1,14 @@ + + + + + + diff --git a/src/lib/MobileNavbar.svelte b/src/lib/MobileNavbar.svelte index 396a528..cc32235 100644 --- a/src/lib/MobileNavbar.svelte +++ b/src/lib/MobileNavbar.svelte @@ -4,10 +4,17 @@ import NavPlus from "$lib/NavPlus.svelte"; import { fly } from 'svelte/transition'; import { afterNavigate } from "$app/navigation"; + import NavLines from "$lib/NavLines.svelte"; - export let closeNavbar; export let navigationLinksLeft; export let navigationLinksRight; + export let scrollMode; + let isMobileMenuOpen; + + const closeNavbar = () => { + isMobileMenuOpen = false; + document.body.classList.remove("no-scroll") + } let mobileOpenSubsectionsKeys = [] let navBackground; @@ -19,44 +26,55 @@ } - -
-
- +
+ +
+{:else} +
+
- - +{/if} diff --git a/src/lib/Navbar.svelte b/src/lib/Navbar.svelte index 579392b..4f50608 100644 --- a/src/lib/Navbar.svelte +++ b/src/lib/Navbar.svelte @@ -1,12 +1,9 @@ + +
+ + From 615f4c43063e3df465d1aa77b06af3c539940f6a Mon Sep 17 00:00:00 2001 From: Nikola Ganchev Date: Fri, 22 Sep 2023 20:50:24 +0300 Subject: [PATCH 6/6] Fix Close.svelte usages --- src/lib/MobileNav.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/MobileNav.svelte b/src/lib/MobileNav.svelte index cc32235..2b9cc53 100644 --- a/src/lib/MobileNav.svelte +++ b/src/lib/MobileNav.svelte @@ -1,5 +1,5 @@