2024-12-02 17:29:45 -06:00
|
|
|
import * as hi from "jsr:@preact-icons/hi2";
|
|
|
|
|
2024-11-26 23:35:32 -06:00
|
|
|
interface HeaderLink {
|
|
|
|
name: string;
|
|
|
|
linkTo: string;
|
2024-12-02 17:29:45 -06:00
|
|
|
// deno-lint-ignore no-explicit-any
|
|
|
|
icon: any;
|
2024-11-26 23:35:32 -06:00
|
|
|
newTab?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
const headerLinks: Array<HeaderLink> = [
|
|
|
|
{
|
|
|
|
name: "Home",
|
|
|
|
linkTo: "/",
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlineHome />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Blog",
|
|
|
|
linkTo: "posts/",
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlineBookmarkSquare />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Projects",
|
2024-12-02 17:29:45 -06:00
|
|
|
linkTo: "projects/",
|
|
|
|
icon: <hi.HiOutlineWrenchScrewdriver />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Contact",
|
|
|
|
linkTo: "contact/",
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlinePencilSquare />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2024-10-10 15:16:55 -05:00
|
|
|
export default function Header() {
|
2024-11-26 23:35:32 -06:00
|
|
|
return (
|
2024-12-02 17:29:45 -06:00
|
|
|
<nav>
|
|
|
|
<div class="bg-[#313244] flex justify-center space-x-6 p-4">
|
|
|
|
{headerLinks.map((l) => {
|
|
|
|
const newTab = l.newTab ? "_blank" : "_self";
|
|
|
|
return (
|
|
|
|
<a
|
|
|
|
href={l.linkTo}
|
|
|
|
target={newTab}
|
|
|
|
class="text-[#cdd6f4]
|
|
|
|
text-lg
|
|
|
|
font-medium
|
|
|
|
transition-all
|
|
|
|
duration-300
|
|
|
|
ease-in-out
|
|
|
|
hover:text-[#cba6f7]
|
|
|
|
hover:drop-shadow-[0_0_20px_rgba(96,165,250,0.7)]
|
|
|
|
hover:scale-110
|
|
|
|
cursor-pointer"
|
|
|
|
>
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
{l.icon} {l.name}
|
|
|
|
</div>
|
2024-11-26 23:35:32 -06:00
|
|
|
</a>
|
2024-12-02 17:29:45 -06:00
|
|
|
);
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</nav>
|
2024-11-26 23:35:32 -06:00
|
|
|
);
|
2024-10-10 15:16:55 -05:00
|
|
|
}
|