feat: update project categories to arrays and remove unused project image
This commit is contained in:
parent
bf6aa7fd2a
commit
481bc8324e
13 changed files with 74 additions and 19 deletions
|
|
@ -2,9 +2,11 @@ import Link from "next/link";
|
|||
import { motion } from "framer-motion";
|
||||
import Image from "next/image";
|
||||
export default function projectCard({project, index, activeCategory}){
|
||||
console.log(project.category[0], activeCategory);
|
||||
console.log(project.category.includes(activeCategory));
|
||||
return (
|
||||
<>
|
||||
{activeCategory == project.category && (
|
||||
{project.category.includes(parseInt(activeCategory)) && (
|
||||
<Link href={"projects/" + project.slug} key={index}>
|
||||
<motion.div
|
||||
className="z-10 relative flex justify-center items-start flex-col mb-5 md:px-10 w-full h-auto bg-gray-400 group/tes py-20 px-5 md:py-2 aspect-video "
|
||||
|
|
@ -19,8 +21,6 @@ export default function projectCard({project, index, activeCategory}){
|
|||
transition={{
|
||||
type: "spring",
|
||||
}}>
|
||||
{" "}
|
||||
{/* Add relative here */}
|
||||
<Image
|
||||
src={project.thumbnail}
|
||||
alt="Alvalens"
|
||||
|
|
@ -34,9 +34,7 @@ export default function projectCard({project, index, activeCategory}){
|
|||
<h4 className="text-white">{project.year}</h4>
|
||||
</div>
|
||||
<div className="transition-all ease duration-500 opacity-100 content text-center group-hover/tes:opacity-0 z-10">
|
||||
<h1 className="text-3xl font-bold mb-3">
|
||||
{project.title}
|
||||
</h1>
|
||||
<h1 className="text-3xl font-bold mb-3">{project.title}</h1>
|
||||
<p>
|
||||
{project.desc[0].length > 125
|
||||
? `${project.desc[0].slice(0, 125)}...`
|
||||
|
|
@ -56,5 +54,5 @@ export default function projectCard({project, index, activeCategory}){
|
|||
</Link>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue