Files
my-website-v2/frontend/components/Header.tsx
Wyatt J. Miller a48396f1bc
Some checks failed
Build and Release Docker Images / build-and-push (./backend, public/Dockerfile, my-website-v2_public) (push) Failing after 26m3s
Build and Release Docker Images / build-and-push (./backend, task/Dockerfile, my-website-v2_task) (push) Failing after 26m40s
Build and Release Docker Images / build-and-push (./frontend, Dockerfile, my-website-v2_frontend) (push) Failing after 17m6s
Build and Release Docker Images / create-release (push) Has been skipped
adjusted the header, footer
2025-07-27 00:35:01 -04:00

58 lines
1.5 KiB
TypeScript

import * as hi from "jsr:@preact-icons/hi2";
interface HeaderLink {
name: string;
linkTo: string;
// deno-lint-ignore no-explicit-any
icon: any;
newTab?: boolean;
}
const headerLinks: Array<HeaderLink> = [
{
name: "Home",
linkTo: `${Deno.env.get("BASE_URI_WEB")}/`,
icon: <hi.HiOutlineHome />,
},
{
name: "Blog",
linkTo: `${Deno.env.get("BASE_URI_WEB")}/posts`,
icon: <hi.HiOutlineBookmarkSquare />,
},
{
name: "Projects",
linkTo: `${Deno.env.get("BASE_URI_WEB")}/projects`,
icon: <hi.HiOutlineWrenchScrewdriver />,
},
{
name: "Contact",
linkTo: `${Deno.env.get("BASE_URI_WEB")}/contact`,
icon: <hi.HiOutlinePencilSquare />,
},
];
export default function Header() {
return (
<header>
<nav>
<div class="grid grid-cols-2 mt-4 place-items-center md:flex md:flex-row items-center justify-center md:gap-8">
{headerLinks.map((l) => {
const newTab = l.newTab ? "_blank" : "_self";
return (
<a
href={l.linkTo}
target={newTab}
class="text-[#cdd6f4] text-md sm: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>
);
}