respect motion setting on navbar

This commit is contained in:
JovannMC 2025-02-06 20:52:18 +03:00
parent 0755b3eed8
commit b5878948ef
No known key found for this signature in database
1 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
import { browser } from "$app/environment";
import { page } from "$app/state";
import { duration, fade } from "$lib/animation";
import { setTheme } from "$lib/store/index.svelte";
import { motion, setTheme } from "$lib/store/index.svelte";
import clsx from "clsx";
import { MoonIcon, SunIcon } from "lucide-svelte";
import { quintOut } from "svelte/easing";
@ -111,9 +111,9 @@
.height}px; top: {linkRects[selectedIndex].top -
(containerRect?.top || 0)}px; left: {linkRects[
selectedIndex
].left -
(containerRect?.left ||
0)}px; transition: left var(--transition) {duration}ms, top var(--transition) {duration}ms;"
].left - (containerRect?.left || 0)}px; {$motion
? `transition: left var(--transition) ${duration}ms, top var(--transition) ${duration}ms;`
: ''}"
></div>
{/if}
<a