11import { ProjectItem } from "app/types/Section" ;
22
3- import { Lato } from "next/font/google" ;
3+ import { motion } from "framer-motion" ;
4+
5+ import { Fira_Sans , Roboto_Slab } from "next/font/google" ;
46import Image from "next/image" ;
57import { IoIosLink } from "react-icons/io" ;
68
7- const lato = Lato ( { weight : "400" , subsets : [ "latin" ] } ) ;
9+ const roboto = Roboto_Slab ( { preload : false } ) ;
10+ const fira = Fira_Sans ( { weight : "300" , preload : false } ) ;
811
912export default function ProjectCard ( {
1013 title,
@@ -17,10 +20,16 @@ export default function ProjectCard({
1720 linkIcon : LinkIcon = IoIosLink ,
1821} : ProjectItem ) {
1922 return (
20- < div
21- className = { `flex flex-col gap-5 w-full h-full max-w-md items-center justify-between border-2 rounded-xl p-5 ${
23+ < motion . div
24+ className = { `flex flex-col gap-5 w-full h-full max-w-md items-center justify-between rounded-xl p-5 border border-gray-200 ${
2225 className || ""
23- } `} >
26+ } `}
27+ initial = { { boxShadow : "0 5px 5px rgba(0,0,0,0.10)" } }
28+ whileHover = { {
29+ boxShadow : "0 8px 15px rgba(0,0,0,0.25)" ,
30+ transition : { duration : 0 } ,
31+ } }
32+ transition = { { duration : 0.1 } } >
2433 < div className = "relative flex flex-col h-[200px] w-[300px]" >
2534 < Image
2635 src = { image || "https://dummyimage.com/600x400/000/fff" }
@@ -30,13 +39,14 @@ export default function ProjectCard({
3039 draggable = "false"
3140 className = "w-full h-full select-none object-cover rounded-md"
3241 />
33- < h3 className = "absolute font-bold text-lg z-10 w-full bottom-1 text-center text-(--accent) bg-(--secondary)" >
42+ < h3
43+ className = { `absolute font-bold text-lg z-10 w-full bottom-1 text-center text-(--accent) bg-(--secondary) ${ roboto . className } ` } >
3444 { title || "This is a dummy project name" }
3545 </ h3 >
3646 </ div >
3747
3848 < div
39- className = { `flex flex-col gap-3 w-full max-w-sm justify-between ${ lato . className } ` } >
49+ className = { `flex flex-col gap-3 w-full max-w-sm justify-between ${ fira . className } ` } >
4050 < p className = "text-justify" > { detail } </ p >
4151 < ol className = "list-decimal list-inside flex flex-col gap-1" >
4252 { points . map ( ( point , index ) => (
@@ -66,6 +76,6 @@ export default function ProjectCard({
6676 < LinkIcon className = "mr-1" /> Visit
6777 </ a >
6878 </ div >
69- </ div >
79+ </ motion . div >
7080 ) ;
7181}
0 commit comments