initial commit

This commit is contained in:
2024-05-11 12:42:46 +02:00
commit cdbd1801fd
28 changed files with 8444 additions and 0 deletions

13
components/Link.tsx Normal file
View File

@@ -0,0 +1,13 @@
import React from "react";
import { usePageContext } from "vike-react/usePageContext";
export function Link({ href, children }: { href: string; children: string }) {
const pageContext = usePageContext();
const { urlPathname } = pageContext;
const isActive = href === "/" ? urlPathname === href : urlPathname.startsWith(href);
return (
<a href={href} className={isActive ? "is-active" : undefined}>
{children}
</a>
);
}