From ad684ed103f51f0ad0071aed105c4b12c7344bef Mon Sep 17 00:00:00 2001 From: HotPaotatoes <113345557+ChanatpakornD@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:09:15 +0700 Subject: [PATCH] Chanatpakorn/refactor navigation bar (#11) * feat: NavLink * feat:better nav * refactor:format --- src/components/navbar/NavLink.svelte | 34 ++++++ src/components/navbar/Navbar.svelte | 163 +++++---------------------- 2 files changed, 65 insertions(+), 132 deletions(-) create mode 100644 src/components/navbar/NavLink.svelte diff --git a/src/components/navbar/NavLink.svelte b/src/components/navbar/NavLink.svelte new file mode 100644 index 0000000..49f32ae --- /dev/null +++ b/src/components/navbar/NavLink.svelte @@ -0,0 +1,34 @@ + + + +
{ + hoverText = true; + }} + on:mouseleave={() => { + hoverText = false; + }} +> + + + {#each direct as character} +
+ {character.toUpperCase()} +
+ {/each} +
+
diff --git a/src/components/navbar/Navbar.svelte b/src/components/navbar/Navbar.svelte index 3aaff6a..ddb60db 100644 --- a/src/components/navbar/Navbar.svelte +++ b/src/components/navbar/Navbar.svelte @@ -1,147 +1,46 @@ -