Skip to content

Commit

Permalink
style: change the look of navbar indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
youwen5 committed May 13, 2024
1 parent 04cbbe9 commit 9440516
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/lib/components/Navbar/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
}
}
onMount(() => {
return navigating.subscribe(updateCurrent)
})
onMount(() => navigating.subscribe(updateCurrent))
</script>

<nav class="h-16 lg:h-24 bg-background bg-opacity-50 backdrop-blur-lg fixed w-full z-40 font-serif">
Expand All @@ -37,22 +35,22 @@
<div class="gap-4 lg:gap-14 justify-around align-middle hidden md:flex tracking-tight">
<a
href="/"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-xl hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-b-sm rounded-t-md hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class:selected={current === 'home'}>Home</a
>
<a
href="/about"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-xl hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-b-sm rounded-t-md hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class:selected={current === 'about'}>About</a
>
<a
href="/portfolio"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-xl hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-b-sm rounded-t-md hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class:selected={current === 'portfolio'}>Portfolio</a
>
<a
href="/blog"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-xl hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class="text-lg border-b-4 sm:text-xl md:text-2xl font-medium text-primary px-2 py-1 rounded-b-sm rounded-t-md hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-all duration-300 border-b-secondary"
class:selected={current === 'blog'}>Blog</a
>
<ThemePicker let:builder>
Expand All @@ -69,6 +67,6 @@

<style lang="postcss">
.selected {
@apply border-b-primary;
@apply border-b-primary rounded-b-lg;
}
</style>

0 comments on commit 9440516

Please sign in to comment.