feat: add title and image as link

This commit is contained in:
Timothy Lin 2021-02-14 18:24:28 +08:00
parent 9e6d435903
commit 8b3d38cba6

View File

@ -26,15 +26,21 @@ export default function Projects() {
{projectsData.map((d) => (
<div className="p-4 md:w-1/2" key={d.title}>
<div className="h-full border-2 border-gray-200 border-opacity-60 dark:border-gray-700 rounded-md overflow-hidden">
<Image
alt={d.title}
src={d.imgSrc}
className="lg:h-48 md:h-36 object-cover object-center"
width={721}
height={401}
/>
<Link href={d.href} aria-label={`Link to ${d.title}`}>
<Image
alt={d.title}
src={d.imgSrc}
className="lg:h-48 md:h-36 object-cover object-center"
width={721}
height={401}
/>
</Link>
<div className="p-6">
<h2 className="text-2xl font-bold leading-8 tracking-tight mb-3">{d.title}</h2>
<h2 className="text-2xl font-bold leading-8 tracking-tight mb-3">
<Link href={d.href} aria-label={`Link to ${d.title}`}>
{d.title}
</Link>
</h2>
<p className="prose text-gray-500 max-w-none dark:text-gray-400 mb-3">
{d.description}
</p>