Using after: utility classes to expand <a> to fill entire card.

This was a suggestion adapted from Gemini.
This commit is contained in:
Benjamin A. Shelton 2026-11-25 21:21:37 -07:00
commit 28982b1f81
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
2 changed files with 9 additions and 7 deletions

View file

@ -44,7 +44,7 @@ const { notes } = Astro.props;
<div id="notes-list">
<ul>{notes.map((note: CollectionEntry<'notes'>) => (
<li class="flex"><a href={new URL(`${base}notes/${note.id}/`, Astro.url).pathname}>
<li class="flex">
<div class="header-image">
<img src={urlfrag(base, note.data.post_image)} class="rounded-md" />
</div>
@ -60,10 +60,10 @@ const { notes } = Astro.props;
</ul>
</div>
<hgroup>
<h2>{note.data.title}</h2>
<h2><a href={new URL(`${base}notes/${note.id}/`, Astro.url).pathname}>{note.data.title}</a></h2>
<h3>{note.data.sub_heading}</h3>
</hgroup>
<time>{dateFormat(note.data.date)}</time>
</a></li>
</li>
))}</ul>
</div>