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",
|
2024-12-07 15:11:48 -06:00
|
|
|
linkTo: `${Deno.env.get("BASE_URI_WEB")}/`,
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlineHome />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Blog",
|
2024-12-07 15:11:48 -06:00
|
|
|
linkTo: `${Deno.env.get("BASE_URI_WEB")}/posts`,
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlineBookmarkSquare />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Projects",
|
2024-12-07 15:11:48 -06:00
|
|
|
linkTo: `${Deno.env.get("BASE_URI_WEB")}/projects`,
|
2024-12-02 17:29:45 -06:00
|
|
|
icon: <hi.HiOutlineWrenchScrewdriver />,
|
2024-11-26 23:35:32 -06:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Contact",
|
2024-12-07 15:11:48 -06:00
|
|
|
linkTo: `${Deno.env.get("BASE_URI_WEB")}/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-07 15:11:48 -06:00
|
|
|
<header>
|
|
|
|
<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>
|
|
|
|
</a>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</header>
|
2024-11-26 23:35:32 -06:00
|
|
|
);
|
2024-10-10 15:16:55 -05:00
|
|
|
}
|