Add FAQ page and nav link
CI / ci (push) Successful in 28s
CI / ci (pull_request) Successful in 27s
Docker / docker (pull_request) Successful in 17s

This commit is contained in:
2026-03-07 16:08:26 +01:00
parent 8c2bfc8884
commit f859194e96
3 changed files with 315 additions and 14 deletions
+26 -12
View File
@@ -4,6 +4,7 @@ const currentPath = Astro.url.pathname;
const links = [
{ href: "/", label: "home" },
{ href: "/start", label: "start" },
{ href: "/faq", label: "q&a" },
{ href: "/about", label: "about" },
{ href: "/projects", label: "projects" },
{ href: "/now", label: "now" },
@@ -19,18 +20,31 @@ function isActive(href: string, current: string): boolean {
<nav class="nav" aria-label="Main navigation">
<div class="nav-inner">
{links.map((link, i) => (
<>
{i > 0 && <span class="nav-sep" aria-hidden="true">·</span>}
<a
href={link.href}
class:list={["nav-link", { active: isActive(link.href, currentPath) }]}
aria-current={isActive(link.href, currentPath) ? "page" : undefined}
>
~/{link.label}
</a>
</>
))}
{
links.map((link, i) => (
<>
{i > 0 && (
<span class="nav-sep" aria-hidden="true">
·
</span>
)}
<a
href={link.href}
class:list={[
"nav-link",
{ active: isActive(link.href, currentPath) },
]}
aria-current={
isActive(link.href, currentPath)
? "page"
: undefined
}
>
~/{link.label}
</a>
</>
))
}
</div>
</nav>