🔥 Removed unused component HeaderLink

Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
This commit is contained in:
Sid 2025-05-29 19:30:23 +02:00
parent 05e29431a6
commit 70663064a0
Signed by: sidski
GPG key ID: D2BBDF3EDE6BA9A6

View file

@ -1,21 +0,0 @@
---
import type { HTMLAttributes } from 'astro/types';
type Props = HTMLAttributes<'a'>;
const { href, class: className, ...props } = Astro.props;
const { pathname } = Astro.url;
const isActive = href === pathname || href === pathname.replace(/\/$/, '');
---
<a href={href} class:list={[className, { active: isActive }]} {...props}>
<slot />
</a>
<style>
a {
display: inline-block;
text-decoration: none;
font-weight: bolder;
}
</style>