@@ -2,38 +2,46 @@ import { Card, CardDescription, CardTitle, CardHeader } from "./ui/card";
22import { Github , ScrollText } from "lucide-react" ;
33import { Badge } from "./ui/badge" ;
44import type { Project } from "@/lib/types" ;
5+ import Link from "next/link" ;
56
67export default function ProjectCard ( {
8+ handle,
79 type,
810 title,
911 description,
1012 tags,
1113} : Partial < Project > ) {
1214 return (
13- < Card className = "group flex w-96 border-transparent transition-colors hover:cursor-pointer hover:border-b-primary/10 hover:bg-secondary hover:dark:border-b-border hover:dark:border-t-primary/10" >
14- < CardHeader className = "w-full gap-1" >
15- < div className = "flex w-full items-center justify-between" >
16- < CardTitle className = "max-w-[16rem] text-left leading-tight" >
17- { title }
18- { /* <span className="mt-0.5 block h-[1px] max-w-0 bg-foreground transition-all duration-500 group-hover:max-w-full"></span> */ }
19- </ CardTitle >
20- { type === "blog" ? < ScrollText width = { 20 } /> : < Github width = { 20 } /> }
21- </ div >
22- < CardDescription className = "text-left" > { description } </ CardDescription >
23- < div className = "flex flex-wrap gap-2" >
24- { tags ?. map ( ( tag , i ) => {
25- return (
26- < Badge
27- key = { tag + i }
28- variant = "secondary"
29- className = "group-hover:border-primary/50"
30- >
31- { tag }
32- </ Badge >
33- ) ;
34- } ) }
35- </ div >
36- </ CardHeader >
37- </ Card >
15+ < Link href = { "/" + handle } className = "no-underline" >
16+ < Card className = "group flex w-96 border-transparent transition-colors hover:cursor-pointer hover:border-b-primary/10 hover:bg-secondary dark:border-l-border hover:dark:border-b-border hover:dark:border-t-primary/10" >
17+ < CardHeader className = "w-full gap-1" >
18+ < div className = "mb-1 flex h-4 w-full items-center justify-between" >
19+ < CardTitle className = "max-w-[16rem] text-left leading-tight" >
20+ { title }
21+ { /* <span className="mt-0.5 block h-[1px] max-w-0 bg-foreground transition-all duration-500 group-hover:max-w-full"></span> */ }
22+ </ CardTitle >
23+ { type === "blog" ? (
24+ < ScrollText width = { 20 } />
25+ ) : (
26+ < Github width = { 20 } />
27+ ) }
28+ </ div >
29+ < CardDescription className = "text-left" > { description } </ CardDescription >
30+ < div className = "flex flex-wrap gap-2" >
31+ { tags ?. map ( ( tag , i ) => {
32+ return (
33+ < Badge
34+ key = { tag + i }
35+ variant = "secondary"
36+ className = "group-hover:border-primary/50"
37+ >
38+ { tag }
39+ </ Badge >
40+ ) ;
41+ } ) }
42+ </ div >
43+ </ CardHeader >
44+ </ Card >
45+ </ Link >
3846 ) ;
3947}
0 commit comments