Files
website/app/src/lib/navbar_link.svelte
ngn c287ffa086
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
fix showing the active link in the navbar
Signed-off-by: ngn <ngn@ngn.tf>
2025-07-11 22:00:56 +03:00

27 lines
449 B
Svelte

<script>
import { color, click } from "$lib/util.js";
import { page } from "$app/stores";
export let link;
</script>
<a
style="
text-decoration-color: var(--{color()});
{$page.url.pathname === link ? `color: var(--${color()});` : ''}
"
data-sveltekit-preload-data
on:click={click}
href={link}
>
<slot></slot>
</a>
<style>
a {
font-weight: 900;
font-size: var(--size-4);
color: var(--white-1);
}
</style>