personal-site/layouts/general_layout/HeaderNav.tsx

77 lines
2.5 KiB
TypeScript
Raw Normal View History

2023-10-24 17:59:00 +00:00
"use client";
import React from "react";
import { gsap } from "gsap";
/**
* General Header for all pages
*/
const HeaderNav = ({ mobile }: { mobile?: boolean }): React.ReactElement => {
const links: { title: string; url: string }[] = require("./links.json");
return (
2023-12-31 06:58:55 +00:00
<nav
className={
"items-start xl:items-center gap-x-6 gap-y-2 xl:flex-row" +
(mobile ? " flex-col" : " hidden xl:flex")
}
>
{links.map(
(
link: { title: string; url: string; download?: boolean },
index
) => {
return (
<a
key={index}
href={link.url}
data-href={link.url}
className="text-lg"
download={link.download}
>
{link.title}
</a>
);
}
)}
2023-10-24 17:59:00 +00:00
<span className="opacity-20">|</span>
<div className="flex items-start xl:items-center gap-4 flex-col xl:flex-row">
2023-12-31 06:58:55 +00:00
<a href="https://github.com/BenjaminToby" target="_blank">
2023-10-24 17:59:00 +00:00
<img
src="/images/github-white.png"
alt="Benjamin Toby Github"
width={20}
height={20}
className="flex items-center"
/>
</a>
<a
href="https://www.linkedin.com/in/benjamin-toby/"
target="_blank"
>
<img
src="/images/linkedin-white.png"
alt="Benjamin Toby Github"
width={20}
height={20}
className="flex items-center"
/>
</a>
2023-12-31 06:58:55 +00:00
<a href="https://team.tben.me" target="_blank">
<img
src="/images/mattermost-logo.webp"
alt="Benjamin Toby Github"
width={20}
height={20}
className="flex items-center"
/>
</a>
2023-10-24 17:59:00 +00:00
</div>
</nav>
);
};
export default HeaderNav;