diff --git a/src/routes/Navbar.svelte b/src/routes/Navbar.svelte index cb78932..7690a5d 100644 --- a/src/routes/Navbar.svelte +++ b/src/routes/Navbar.svelte @@ -2,41 +2,91 @@ import { page } from '$app/stores'; import { routes } from "$lib/sitemap.ts" import ThemeSwitch from "$lib/components/ThemeSwitch.svelte" - import { Rss } from "lucide-svelte"; + import { Rss, Menu } from "lucide-svelte"; function isCurrentLink(pathname, route) { return route != "/" && pathname.startsWith(route) || route == "/post" && pathname.startsWith("/page"); } + + import { onMount } from 'svelte'; + + let showDropdown = false; + + function onDropdownToggle(event) { + showDropdown = !showDropdown; + } + function onKeyDown(event) { + if (event.key == "Escape") { + showDropdown = !showDropdown; + } + } -
+ + +