diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index b88bcf5..c9114e1 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -7,8 +7,9 @@ const buttonVariants = tv({ base: [ 'inline-flex h-9 items-center justify-center gap-2 rounded-sm', - 'px-4 text-[15px] font-bold no-underline transition-colors', - 'active:translate-y-px active:hover:inset-shadow-[0_3px_3px_0] active:inset-shadow-bg/80' + 'px-4 text-[15px] font-bold no-underline transition-colors transition-transform', + 'active:translate-y-px active:hover:inset-shadow-[0_3px_3px_0] active:inset-shadow-bg/80', + 'focus-visible:-translate-y-1 focus-visible:shadow-[0_5px_0px_0]' ], variants: { variant: { @@ -16,6 +17,7 @@ 'bg-text text-bg backdrop-blur-md', 'hover:bg-accent/60 hover:text-white', 'disabled:bg-text/30', + 'focus-visible:shadow-accent focus-visible:outline-none! focus-visible:data-[active=true]:-translate-y-2 focus-visible:data-[active=true]:shadow-accent/70', 'data-[active=true]:translate-y-px data-[active=true]:bg-accent', 'data-[active=true]:text-white data-[active=true]:inset-shadow-[0_2px_2px_0]', 'data-[active=true]:inset-shadow-bg/80' @@ -23,6 +25,7 @@ outlined: [ 'border-2 border-accent/50 bg-transparent text-text backdrop-blur-md', 'hover:bg-accent/40', + 'focus-visible:shadow-accent focus-visible:outline-none! focus-visible:data-[active=true]:-translate-y-2 focus-visible:data-[active=true]:shadow-accent/70', 'disabled:opacity-50', 'data-[active=true]:translate-y-px data-[active=true]:bg-accent', 'data-[active=true]:inset-shadow-[0_3px_3px_0] data-[active=true]:inset-shadow-bg/80' diff --git a/src/lib/editor/Navbar.svelte b/src/lib/editor/Navbar.svelte index e312f3d..45b2777 100644 --- a/src/lib/editor/Navbar.svelte +++ b/src/lib/editor/Navbar.svelte @@ -368,16 +368,19 @@ {:else} - + {#snippet child({ props })} + + {/snippet} { + if (browser && url.pathname !== resolve('/')) { + goto(resolve('/'), { replaceState: true }); + } +}; diff --git a/src/routes/[...home]/+page.ts b/src/routes/[...home]/+page.ts deleted file mode 100644 index 19262a5..0000000 --- a/src/routes/[...home]/+page.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { redirect } from '@sveltejs/kit'; - -export const prerender = true; - -export const load = () => { - redirect(308, '/'); -};