Skip to content

Commit

Permalink
Do not use Image to avoid fails on build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans5958 committed May 5, 2024
1 parent b613b85 commit 081068e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const feed = await parser.parseURL('https://hans5958.github.io/blog/rss.xml');
<div class="grid sm:grid-cols-2 gap-4">
{ feed.items.splice(0, 4).map(item =>
<a class="block rounded flex-grow outline-none text-black border border-gray-300 hover:bg-gray-100 focus:bg-gray-100 active:bg-gray-200 focus:ring focus:ring-blue-500 focus:outline-none active:outline-none" href={ item.link }>
{ item['media:thumbnail'] && <Image src={ "https://hans5958.github.io" + getMediaThumbnail(item) } alt="" inferSize={true} class="rounded-t h-36 w-full object-cover object-top" /> }
{ item['media:thumbnail'] && <img src={ "https://hans5958.github.io" + getMediaThumbnail(item) } class="rounded-t h-36 w-full object-cover object-top" aria-hidden="true" /> }
<div class="p-4">
<h3 class="text-2xl font-bold mb-2">{ item.title }</h3>
<p class="text-gray-500 mb-2">
Expand Down

0 comments on commit 081068e

Please sign in to comment.