|
|
|
@ -12,7 +12,10 @@ import { FiGithub, FiMail, FiLinkedin } from "react-icons/fi";
|
|
|
|
|
|
|
|
|
|
import HeaderProps from "@models/header";
|
|
|
|
|
|
|
|
|
|
export const Header: Component<{ header: HeaderProps }> = ({ header }) => {
|
|
|
|
|
export const Header: Component<{ header: HeaderProps; avatar: string }> = ({
|
|
|
|
|
header,
|
|
|
|
|
avatar
|
|
|
|
|
}) => {
|
|
|
|
|
const socials = useMemo(
|
|
|
|
|
() => [
|
|
|
|
|
{
|
|
|
|
@ -36,35 +39,38 @@ export const Header: Component<{ header: HeaderProps }> = ({ header }) => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="container mx-auto flex items-center min-h-screen">
|
|
|
|
|
<div>
|
|
|
|
|
{header.avatar !== undefined && (
|
|
|
|
|
<Image
|
|
|
|
|
src={header.avatar}
|
|
|
|
|
width={300}
|
|
|
|
|
alt={`A picture of ${header.fullName}`}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
<div className="flex items-center">
|
|
|
|
|
<Image
|
|
|
|
|
isBlurred
|
|
|
|
|
src={avatar}
|
|
|
|
|
width={300}
|
|
|
|
|
alt={`A picture of ${header.fullName}`}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<h1 className="text-4xl">{header.fullName}</h1>
|
|
|
|
|
<Spacer y={4} />
|
|
|
|
|
<Spacer x={8} />
|
|
|
|
|
|
|
|
|
|
<h2 className="text-2xl">{header.description}</h2>
|
|
|
|
|
<Spacer y={4} />
|
|
|
|
|
<div>
|
|
|
|
|
<h1 className="text-4xl">{header.fullName}</h1>
|
|
|
|
|
<Spacer y={4} />
|
|
|
|
|
|
|
|
|
|
{socials.map((social) => (
|
|
|
|
|
<Link href={social.link} key={social.name.toLowerCase()}>
|
|
|
|
|
<Tooltip showArrow content={social.name}>
|
|
|
|
|
<Button
|
|
|
|
|
className="text-2xl mr-4"
|
|
|
|
|
color="primary"
|
|
|
|
|
isIconOnly
|
|
|
|
|
aria-label={social.name}
|
|
|
|
|
>
|
|
|
|
|
{social.icon}
|
|
|
|
|
</Button>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
<h2 className="text-2xl">{header.description}</h2>
|
|
|
|
|
<Spacer y={4} />
|
|
|
|
|
|
|
|
|
|
{socials.map((social) => (
|
|
|
|
|
<Link href={social.link} key={social.name.toLowerCase()}>
|
|
|
|
|
<Tooltip showArrow content={social.name}>
|
|
|
|
|
<Button
|
|
|
|
|
className="text-2xl mr-4"
|
|
|
|
|
color="primary"
|
|
|
|
|
isIconOnly
|
|
|
|
|
aria-label={social.name}
|
|
|
|
|
>
|
|
|
|
|
{social.icon}
|
|
|
|
|
</Button>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|