Tweak mobile nav

This commit is contained in:
Jon Staab
2026-03-17 15:03:40 -07:00
parent 58a6be911a
commit baa1d49b3a
3 changed files with 28 additions and 28 deletions
+14 -14
View File
@@ -15,20 +15,7 @@
const active = $derived($page.url?.pathname?.startsWith(prefix || href || "bogus"))
</script>
{#if href}
<a {href} class="relative z-nav-item flex h-14 w-14 items-center justify-center p-1">
<div
class="aspect-square flex-grow cursor-pointer rounded-full {restProps.class} flex items-center justify-center transition-colors hover:bg-base-300"
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>
{@render children?.()}
{#if !active && notification}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary"></div>
{/if}
</div>
</a>
{:else}
{#if onclick}
<Button {onclick} class="relative z-nav-item flex h-14 w-14 items-center justify-center p-1">
<div
class="aspect-square flex-grow cursor-pointer rounded-full {restProps.class} flex items-center justify-center transition-colors hover:bg-base-300"
@@ -41,4 +28,17 @@
{/if}
</div>
</Button>
{:else}
<a {href} class="relative z-nav-item flex h-14 w-14 items-center justify-center p-1">
<div
class="aspect-square flex-grow cursor-pointer rounded-full {restProps.class} flex items-center justify-center transition-colors hover:bg-base-300"
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>
{@render children?.()}
{#if !active && notification}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary"></div>
{/if}
</div>
</a>
{/if}