Update website structure and styles

This commit is contained in:
Hazem Krimi
2022-02-13 19:11:46 +01:00
parent b6d7feccc1
commit 04cc13815d
20 changed files with 93 additions and 149 deletions
+5 -5
View File
@@ -17,7 +17,7 @@ const Card: FC<Props> = ({ title, description, image, tags, href, target, onClic
return (
<Link href={href} passHref>
<StyledCard as='a' target={target} onClick={onClick} image={!!image}>
<div>
<div className='card-content'>
<h3>{title}</h3>
<p>{description}</p>
{tags && (
@@ -28,10 +28,10 @@ const Card: FC<Props> = ({ title, description, image, tags, href, target, onClic
</div>
)}
</div>
{image ? (
<Image src={image} width='100%' height='100%' layout='responsive' />
) : (
<Image src='/no-image.png' width='100%' height='100%' layout='responsive' />
{image && (
<div className='card-image'>
<Image src={image} layout='fill' objectFit='cover' />
</div>
)}
</StyledCard>
</Link>