2023-10-23 23:11:59 +02:00
|
|
|
import Image from "next/image"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import { ShadowContainer } from "@/components/design/ShadowContainer"
|
2021-12-04 15:52:51 +01:00
|
|
|
|
2021-04-18 01:56:23 +02:00
|
|
|
export interface PortfolioItemProps {
|
|
|
|
title: string
|
|
|
|
description: string
|
|
|
|
link: string
|
|
|
|
image: string
|
|
|
|
}
|
|
|
|
|
2023-08-01 17:22:09 +02:00
|
|
|
export const PortfolioItem = (props: PortfolioItemProps): JSX.Element => {
|
2021-04-18 01:56:23 +02:00
|
|
|
const { title, description, link, image } = props
|
|
|
|
|
|
|
|
return (
|
2023-10-23 23:11:59 +02:00
|
|
|
<ShadowContainer className="relative cursor-pointer items-center sm:ml-10">
|
2021-05-08 19:52:04 +02:00
|
|
|
<a
|
2023-10-23 23:11:59 +02:00
|
|
|
className="group inline-flex justify-center"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2021-05-08 19:52:04 +02:00
|
|
|
href={link}
|
|
|
|
aria-label={title}
|
|
|
|
>
|
2023-10-23 23:11:59 +02:00
|
|
|
<div className="flex justify-center">
|
2021-05-08 19:52:04 +02:00
|
|
|
<Image
|
2022-02-22 21:19:42 +01:00
|
|
|
quality={100}
|
2024-01-28 03:21:11 +01:00
|
|
|
className="size-auto transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5"
|
2021-05-08 19:52:04 +02:00
|
|
|
width={300}
|
|
|
|
height={300}
|
|
|
|
src={image}
|
|
|
|
alt={title}
|
|
|
|
/>
|
|
|
|
</div>
|
2023-10-23 23:11:59 +02:00
|
|
|
<div className="absolute bottom-0 h-auto overflow-hidden text-center opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
2024-01-28 01:56:47 +01:00
|
|
|
<h3 className="my-6 text-2xl font-semibold text-yellow dark:text-yellow-dark">
|
2021-05-08 19:52:04 +02:00
|
|
|
{title}
|
|
|
|
</h3>
|
2024-01-28 03:21:11 +01:00
|
|
|
<p className="mx-4 my-6 font-semibold">{description}</p>
|
2021-05-08 19:52:04 +02:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</ShadowContainer>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|