Migrate more stuff

This commit is contained in:
Jon Staab
2025-02-03 16:37:14 -08:00
parent 0f705c459a
commit 8d3433b167
150 changed files with 2001 additions and 1205 deletions
+4 -7
View File
@@ -2,18 +2,15 @@
import {page} from "$app/stores"
import Button from "@lib/components/Button.svelte"
export let title = ""
export let href = ""
export let prefix = ""
export let notification = false
let {title = "", href = "", prefix = "", notification = false, ...restProps} = $props()
$: active = $page.url?.pathname?.startsWith(prefix || href || "bogus")
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">
<div
class="avatar cursor-pointer rounded-full p-1 {$$props.class} transition-colors hover:bg-base-300"
class="avatar cursor-pointer rounded-full p-1 {restProps.class} transition-colors hover:bg-base-300"
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>
@@ -26,7 +23,7 @@
{:else}
<Button on:click class="relative z-nav-item flex h-14 w-14 items-center justify-center">
<div
class="avatar cursor-pointer rounded-full p-1 {$$props.class} transition-colors hover:bg-base-300"
class="avatar cursor-pointer rounded-full p-1 {restProps.class} transition-colors hover:bg-base-300"
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>