diff --git a/src/components/navigation/Header.svelte b/src/components/navigation/Header.svelte index 30c6083..7ef1bc5 100644 --- a/src/components/navigation/Header.svelte +++ b/src/components/navigation/Header.svelte @@ -6,37 +6,79 @@ } from '$env/static/public'; import ThemeSwitcher from '$lib/ThemeSwitch/ThemeSwitcher.svelte'; + import MobileMenu from './MobileMenu.svelte'; + + let isMobileMenuOpen = false; + let headerLinks = null; if (PUBLIC_NAV_BAR_LINKS) { headerLinks = JSON.parse(PUBLIC_NAV_BAR_LINKS); } + + function toggleNavbar() { + isMobileMenuOpen = !isMobileMenuOpen; + }
-
-
- - {PUBLIC_OBA_REGION_NAME} - - - {PUBLIC_OBA_REGION_NAME} - +
+ -
- {#each Object.entries(headerLinks) as [key, value]} - - {/each} +
-
+ +
+ +{#if isMobileMenuOpen} + +{/if} + + diff --git a/src/components/navigation/MobileMenu.svelte b/src/components/navigation/MobileMenu.svelte new file mode 100644 index 0000000..4d9488f --- /dev/null +++ b/src/components/navigation/MobileMenu.svelte @@ -0,0 +1,45 @@ + + +
+ + +
+ {#each Object.entries(headerLinks) as [key, value]} + {key} + {/each} +
+ +
+ +
+
+ +