portfolio/src/pages/Experience.jsx

71 lines
2.1 KiB
React
Raw Normal View History

2023-10-12 09:56:13 +02:00
import { Link } from "react-router-dom";
import { useRecoilValue } from "recoil";
import { projectsAtom } from "../store";
import Tags from "../components/Tags";
2022-07-27 16:36:16 +02:00
function Experiance() {
2023-10-12 09:56:13 +02:00
const experianceList = useRecoilValue(projectsAtom);
const experianceListUI = experianceList.map((item, key) => {
2024-10-14 14:53:11 +02:00
const even = key % 2;
2023-10-12 09:56:13 +02:00
return (
2024-09-25 13:34:57 +02:00
<section
2024-10-14 14:53:11 +02:00
className={`flex-1 gap-4 mb-12 bg-[#f0f0f3] border shadow-box ${
(even === 0 && "rounded-tl-3xl rounded-br-3xl") ||
"rounded-tr-3xl rounded-bl-3xl"
}`}
2024-09-25 13:34:57 +02:00
key={item.id}
>
2024-10-14 14:53:11 +02:00
<div
className={`flex pt-4 md:pt-14 flex-col ${
even === 1 && "md:flex-row-reverse"
}`}
>
<div className=" basis-5/12">
<img className="w-full" src={item.previewImg} />
2023-10-12 09:56:13 +02:00
</div>
2024-10-14 14:53:11 +02:00
<div className="grow"></div>
<div className="flex flex-col px-4 pt-4 pb-8 basis-3/12">
2024-09-25 13:34:57 +02:00
<div>
2024-10-14 14:53:11 +02:00
<h2 className="text-subTMiniPhone md:text-subTMini mb-4 font-ht">
2024-09-25 13:34:57 +02:00
{item.title}
</h2>
</div>
2024-10-14 14:53:11 +02:00
{/* <div className="text-base mb-6 line-clamp-3 md:line-clamp-6">
2024-09-25 13:34:57 +02:00
<p>{item.info}</p>
2024-10-14 14:53:11 +02:00
</div> */}
2024-09-25 13:34:57 +02:00
<Tags listOfTags={item.tags} />
<div className="grow"></div>
2024-10-14 14:53:11 +02:00
<div className=" text-left">
2024-09-25 13:34:57 +02:00
<Link
className=" drop-shadow-doublelight hover:drop-shadow-light "
to={`/experience/${item.id}`}
>
read more
</Link>
</div>
2023-10-12 09:56:13 +02:00
</div>
</div>
</section>
);
});
2022-07-27 16:36:16 +02:00
return (
2024-01-02 23:04:17 +01:00
<div className="relative">
<div id="experience" className=" absolute -top-16 "></div>
2024-09-25 13:34:57 +02:00
<div className=" min-h-screen">
2024-10-14 14:53:11 +02:00
<h2 className=" text-subTPhone md:text-subT font-headline mb-6">
Projects<span className=" text-highlight">.</span>
2024-02-04 22:31:04 +01:00
</h2>
2024-10-14 14:53:11 +02:00
<div className="py-4 flex flex-col md:flex-row gap-10">
2024-09-25 13:34:57 +02:00
{experianceListUI}
</div>
2024-02-04 22:31:04 +01:00
</div>
2022-07-27 16:36:16 +02:00
</div>
);
}
export default Experiance;