fix showing the active link in the navbar
All checks were successful
Build the docker image for the API / build (push) Successful in 2m16s
Build the docker image for the frontend application / build (push) Successful in 40s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-07-11 22:00:56 +03:00
parent 26d656896e
commit c287ffa086
15 changed files with 68 additions and 36 deletions

View File

@ -3,14 +3,13 @@
import { page } from "$app/stores";
export let link;
function is_active() {
return $page.url.pathname == link;
}
</script>
<a
style="text-decoration-color: var(--{color()}); {is_active() ? `color: var(--${color()})` : ''}"
style="
text-decoration-color: var(--{color()});
{$page.url.pathname === link ? `color: var(--${color()});` : ''}
"
data-sveltekit-preload-data
on:click={click}
href={link}