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) => {
|
|
|
|
|
const position = key % 2;
|
|
|
|
|
|
|
|
|
|
const imgClasses = ["flex-1", "hidden", "md:block"];
|
|
|
|
|
|
|
|
|
|
if (position === 1) {
|
|
|
|
|
imgClasses.push("md:order-last");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<section className="flex flex-col md:flex-row gap-4 mb-12" key={item.id}>
|
|
|
|
|
<div className={imgClasses.join(" ")}>
|
|
|
|
|
<img className="rounded-md" src={item.img[0]} />
|
|
|
|
|
</div>
|
|
|
|
|
<div className="flex-1 flex flex-col">
|
|
|
|
|
<div>
|
|
|
|
|
<h2 className="text-2xl mb-4"> {item.title}</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<img
|
|
|
|
|
className="block md:hidden mb-4 rounded-md"
|
|
|
|
|
src={item.img[0]}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2024-01-05 12:52:34 +01:00
|
|
|
<div className="text-sm mb-6">
|
2023-10-12 09:56:13 +02:00
|
|
|
<p>{item.info}</p>
|
|
|
|
|
</div>
|
|
|
|
|
<Tags listOfTags={item.tags} />
|
|
|
|
|
<div className="grow"></div>
|
|
|
|
|
<div className=" text-right">
|
|
|
|
|
<Link
|
|
|
|
|
className=" drop-shadow-doublelight hover:drop-shadow-light "
|
|
|
|
|
to={`/experience/${item.id}`}
|
|
|
|
|
>
|
|
|
|
|
read more
|
|
|
|
|
</Link>
|
|
|
|
|
</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>
|
|
|
|
|
<h1>Welcome to Experience</h1>
|
2023-10-12 09:56:13 +02:00
|
|
|
<div className="py-4">{experianceListUI}</div>
|
2022-07-27 16:36:16 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Experiance;
|