We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2b3d261 + 371665a commit 8a94c5eCopy full SHA for 8a94c5e
src/routes/+layout.svelte
@@ -11,8 +11,8 @@
11
let { children } = $props();
12
13
let classesActive = $derived((/** @type {string} */ href) =>
14
- base + href === `/${page.url.pathname.split('/')[1]}`
15
- ? 'bg-primary-300 hover:bg-primary-300 hover:text-primary-700 text-primary-900'
+ href.split('/')[1] === page.url.pathname.split('/')[1] || href.split('/')[1] === page.url.hash
+ ? 'bg-primary-300 hover:bg-primary-300 hover:text-primary-700 text-primary-900'
16
: 'hover:text-primary-600'
17
);
18
0 commit comments