kaboom
This commit is contained in:
28
src/components/Header.astro
Normal file
28
src/components/Header.astro
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
import { SITE } from "../site-config";
|
||||
const currentPath = Astro.url.pathname;
|
||||
const links = [
|
||||
{ href: "/", label: "Home" },
|
||||
{ href: "/gallery", label: "Gallery" },
|
||||
{ href: "/about", label: "About" },
|
||||
{ href: "/contact", label: "Contact" },
|
||||
];
|
||||
---
|
||||
|
||||
<header class="header">
|
||||
<div class="container header-inner">
|
||||
<div class="header-title">
|
||||
<a href="/">{SITE.name}</a>
|
||||
</div>
|
||||
<nav class="header-nav">
|
||||
{links.map(({ href, label }) => (
|
||||
<a
|
||||
href={href}
|
||||
aria-current={currentPath === href ? "page" : undefined}
|
||||
>
|
||||
{label}
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user