lazy-loading done
This commit is contained in:
@@ -45,12 +45,15 @@ const metaDescription = (page.excerpt || "").slice(0, 160);
|
||||
</a>
|
||||
</div>
|
||||
{page.featuredImageUrl ? (
|
||||
<img
|
||||
src={page.featuredImageUrl}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
style="width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12);"
|
||||
/>
|
||||
<div class="img-shimmer-wrap" style="width: 100%; max-height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);">
|
||||
<img
|
||||
src={page.featuredImageUrl}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
class="img-loading"
|
||||
style="width: 100%; max-height: 420px; object-fit: cover; display: block;"
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
<div class="prose" set:html={page.contentHtml} />
|
||||
</section>
|
||||
|
||||
@@ -48,12 +48,15 @@ const metaDescription = (post.excerpt || "").slice(0, 160);
|
||||
{new Date(post.publishedAt).toLocaleDateString()}
|
||||
</p>
|
||||
{post.featuredImageUrl ? (
|
||||
<img
|
||||
src={post.featuredImageUrl}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
style="width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12);"
|
||||
/>
|
||||
<div class="img-shimmer-wrap" style="width: 100%; max-height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);">
|
||||
<img
|
||||
src={post.featuredImageUrl}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
class="img-loading"
|
||||
style="width: 100%; max-height: 420px; object-fit: cover; display: block;"
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
<div class="prose" set:html={post.contentHtml} />
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user