From 97fb8d9663c83093ace5150846adf8d20b2e0808 Mon Sep 17 00:00:00 2001 From: mariosemes Date: Thu, 26 Mar 2026 21:18:23 +0100 Subject: [PATCH] Make sidebar collapsible with hamburger toggle Sidebar is now hidden by default, opened via a small hamburger button in the top-left corner. Clicking a nav link or the overlay closes it. Keeps focus on the search bar. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/client/src/routes/+layout.svelte | 55 +++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/src/client/src/routes/+layout.svelte b/src/client/src/routes/+layout.svelte index d888bd3..4d4ff21 100644 --- a/src/client/src/routes/+layout.svelte +++ b/src/client/src/routes/+layout.svelte @@ -3,19 +3,56 @@ import { page } from '$app/stores'; let { children } = $props(); + let sidebarOpen = $state(false); + function isActive(path) { const current = $page.url.pathname; if (path === '/') return current === '/'; return current.startsWith(path); } + + function closeSidebar() { + sidebarOpen = false; + } -
+
+ + + + + {#if sidebarOpen} + + {/if} + -