Initial layout and a few pages

This commit is contained in:
2023-10-01 09:12:12 -06:00
parent 6fc8381e6f
commit dc4c8efeb2
36 changed files with 22694 additions and 3041 deletions

26
components/nav/index.tsx Normal file
View File

@@ -0,0 +1,26 @@
import { NavItem } from "../../types/nav.ts";
import { getNavItems } from "../../util/getNavItems.ts";
export function NavSection(props: { items: NavItem[] }) {
return (
<ul>
{props.items.map((i) => (
<li>
{i.children
? <NavSection items={i.children} />
: <a href={i.href} target={i.external ? "_blank" : ""}>{i.title}
</a>}
</li>
))}
</ul>
);
}
export function Nav() {
const navItems = getNavItems();
return (
<NavSection
items={navItems}
/>
);
}