initial commit

This commit is contained in:
zackartz 2024-05-05 16:19:04 -04:00
commit 8a8f7c6f62
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
146 changed files with 8471 additions and 0 deletions

View file

@ -0,0 +1,24 @@
---
import type { HTMLAttributes } from 'astro/types';
type Props = HTMLAttributes<'a'>;
const { href, class: className, ...props } = Astro.props;
const { pathname } = Astro.url;
const subpath = pathname.match(/[^\/]+/g);
const isActive = href === pathname || href === '/' + subpath?.[0];
---
<a href={href} class:list={[className, { active: isActive }]} {...props}>
<slot />
</a>
<style>
a {
@apply inline-block no-underline;
}
a.active {
font-weight: bolder;
text-decoration: underline;
}
</style>