2024-12-23 21:18:55 +00:00
|
|
|
---
|
|
|
|
import { SITE } from "@consts";
|
2025-02-16 18:17:29 +00:00
|
|
|
import Button from "@components/Button.astro";
|
2025-02-13 16:55:09 +00:00
|
|
|
|
|
|
|
const pathname = new URL(Astro.request.url).pathname;
|
|
|
|
const currentPath = pathname.replace(/\/$/, "");
|
2024-12-23 21:18:55 +00:00
|
|
|
---
|
|
|
|
|
2025-02-13 18:55:50 +00:00
|
|
|
<header class="mx-auto w-full">
|
2025-02-15 23:08:31 +00:00
|
|
|
<nav class="flex w-full justify-between">
|
|
|
|
<div class="flex w-fit items-center justify-between">
|
|
|
|
<a href="/" aria-label={SITE.TITLE} title={SITE.TITLE} class="group">
|
|
|
|
<div
|
|
|
|
class="ring-secondary/10 size-8 rounded-full bg-linear-45 from-[#FF5907] from-50% to-[#FF8548] ring-1 transition-transform ease-in-out ring-inset group-hover:scale-105"
|
|
|
|
>
|
|
|
|
</div>
|
2025-02-13 16:55:09 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2025-02-15 23:08:31 +00:00
|
|
|
<ul class="flex w-fit flex-row items-center gap-4">
|
2025-02-12 13:03:43 +00:00
|
|
|
{
|
2025-02-13 16:55:09 +00:00
|
|
|
SITE.NAVLINKS.map((link) => {
|
|
|
|
let linkHref = link.href.replace(/\/$/, "");
|
|
|
|
const isActive = currentPath.startsWith(linkHref);
|
|
|
|
return (
|
2025-02-15 23:08:31 +00:00
|
|
|
<li class="text-tertiary hover:text-secondary focus:text-secondary font-medium capitalize transition-colors duration-300 focus:outline-hidden">
|
2025-02-13 16:55:09 +00:00
|
|
|
<a
|
|
|
|
href={link.href}
|
2025-02-15 23:08:31 +00:00
|
|
|
class:list={[isActive ? "text-secondary" : null]}
|
2025-02-13 16:55:09 +00:00
|
|
|
>
|
|
|
|
{link.name}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
);
|
|
|
|
})
|
2025-02-12 13:03:43 +00:00
|
|
|
}
|
2025-02-16 20:03:52 +00:00
|
|
|
<li>
|
|
|
|
<Button href={`mailto:${SITE.EMAIL}`} link="Email" />
|
|
|
|
</li>
|
2025-02-12 13:03:43 +00:00
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-12-23 21:18:55 +00:00
|
|
|
</header>
|