diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index 715614e..7d58d28 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -6,6 +6,7 @@ import { page } from "$app/state"; let mobileMenuOpen = $state(false); + let resourcesOpen = $state(false); let auth = $state(false); let admin = $state(false); let searchQuery = $state(""); @@ -33,8 +34,10 @@ }); const path = $derived(page.url.pathname); + const onUnits = $derived(path === "/units" || path.startsWith("/units/")); const onNotes = $derived(path === "/notes" || path.startsWith("/notes/")); const onQuestions = $derived(path === "/questions" || path.startsWith("/questions/")); + const onResources = $derived(onUnits || onNotes || onQuestions); const onAdmin = $derived(path === "/admin" || path.startsWith("/admin/")); @@ -43,10 +46,56 @@ Notebook