Merge pull request #147 from IshtarStar/patch-1

Wrap blog grid item image in a tag
This commit is contained in:
prototypa
2023-03-18 02:23:29 -04:00
committed by GitHub

View File

@ -19,18 +19,20 @@ const image = await findImage(post.image);
<div class="relative md:h-64 bg-gray-400 dark:bg-slate-700 rounded shadow-lg mb-6">
{
image && (
<Picture
src={image}
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
widths={[400, 900]}
width={400}
height={224}
sizes="(max-width: 900px) 400px, 900px"
alt={post.title}
aspectRatio="16:9"
loading="lazy"
decoding="async"
/>
<a href={getPermalink(post.permalink, 'post')}>
<Picture
src={image}
class="md:object-cover w-full md:w-auto md:h-full rounded shadow-lg bg-gray-400 dark:bg-slate-700"
widths={[400, 900]}
width={400}
height={224}
sizes="(max-width: 900px) 400px, 900px"
alt={post.title}
aspectRatio="16:9"
loading="lazy"
decoding="async"
/>
</a>
)
}
</div>