personal-website/src/components/Navbar.astro

23 lines
530 B
Plaintext
Raw Normal View History

2024-03-26 21:12:10 +01:00
---
import Navlink from "./Navlink.astro";
const links = [
{
display: "Home",
href: "/"
2024-04-02 21:04:11 +02:00
}, {
2024-03-26 21:12:10 +01:00
display: "Blog",
href: "/blog"
}, {
display: "About",
href: "/about"
2024-04-02 21:04:11 +02:00
}, {
display: "Contact",
href: "/contact"
2024-03-26 21:12:10 +01:00
}
];
---
2024-04-02 21:04:11 +02:00
<nav class="w-full flex justify-center">
2024-03-26 21:12:10 +01:00
<div class="justify-around w-full md:w-[767px] flex">
2024-04-02 21:04:11 +02:00
{ links.map((item) => (<Navlink href={item.href}, display={item.display}, isActive={ (Astro.url.pathname.replace(Astro.currentLocale + "/", "").slice(0,-1) || "/") == item.href}/>)) }
2024-03-26 21:12:10 +01:00
</div>
</nav>