diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b03cd63..eb4d11d 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,7 @@ <script lang="ts"> import '../app.css'; import { env } from '$env/dynamic/public'; + import { goto } from '$app/navigation'; let navPaths = [ { @@ -78,7 +79,14 @@ ? 'btn btn-square relative w-16 h-16' : 'btn btn-square group/menu-button relative w-16 h-16'} on:click={() => { - if (!isTouch) showMenuPermanent = !showMenuPermanent; + if (!isTouch) { + let activePath = navPaths.find((path) => path.active); + if (activePath !== undefined) { + goto(activePath.href); + } else { + showMenuPermanent = !showMenuPermanent; + } + } }} on:touchend={() => { isTouch = true;