refactor: change the data retrival to only one json file

This commit is contained in:
Alvalen 2025-01-15 13:52:51 +07:00
parent 415eede707
commit 4bbcdd3ce4
23 changed files with 110 additions and 218 deletions

View file

@ -22,13 +22,13 @@ export default function projectCard({project, index, activeCategory}){
{" "}
{/* Add relative here */}
<Image
src={project.bg.src}
src={project.thumbnail}
alt="Alvalens"
layout="fill"
objectFit="cover"
placeholder="blur"
className="bg-slate-950 opacity-10 group-hover/tes:opacity-100 transition-all ease duration-500"
blurDataURL={project.bg.blurDataURL}
blurDataURL={project.thumbnail}
/>
<div className="absolute top-0 left-0 bg-gray-600 px-4 py-2">
<h4 className="text-white">{project.year}</h4>
@ -37,9 +37,13 @@ export default function projectCard({project, index, activeCategory}){
<h1 className="text-3xl font-bold mb-3">
{project.title}
</h1>
<p>{project.desc}</p>
<p>
{project.desc[0].length > 125
? `${project.desc[0].slice(0, 125)}...`
: project.desc[0]}
</p>
<div className="flex justify-center items-center flex-row mt-5 flex-wrap">
{project.tech.split(",").map((t, index) => (
{project.tech.map((t, index) => (
<span
key={index}
className="m-1 px-4 py-2 bg-gray-600 text-white ">