From 5252b48602677f08415c44b81dece85015f2af07 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Fri, 16 Jul 2021 01:27:57 +0700 Subject: [PATCH] fix: navigation doesnt close on mobile --- client/src/components/navbar.svelte | 40 ++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/client/src/components/navbar.svelte b/client/src/components/navbar.svelte index ad1bc5f..17bf85b 100644 --- a/client/src/components/navbar.svelte +++ b/client/src/components/navbar.svelte @@ -54,10 +54,42 @@ style="transition: left {duration}s ease-in-out" >
-
goto('/')} class="hover:cursor-pointer flex-1 font-bold text-4xl py-6">Jokesbapak2
-
goto('/why')} class="flex-1 py-3 text-3xl">{$_('navigation.why')}
-
goto('/guide')} class="flex-1 py-3 text-3xl">{$_('navigation.guide')}
-
goto('/api')} class="flex-1 py-3 text-3xl">{$_('navigation.api')}
+
{ + open = false; + return goto('/'); + }} + class="hover:cursor-pointer flex-1 font-bold text-4xl py-6" + > + Jokesbapak2 +
+
{ + open = false; + return goto('/why'); + }} + class="flex-1 py-3 text-3xl" + > + {$_('navigation.why')} +
+
{ + open = false; + return goto('/guide'); + }} + class="flex-1 py-3 text-3xl" + > + {$_('navigation.guide')} +
+
{ + open = false; + return goto('/api'); + }} + class="flex-1 py-3 text-3xl" + > + {$_('navigation.api')} +
{/if}