Specify height and width for thumbnails in the ebook footer carousel to improve CLS

This commit is contained in:
Alex Cabal 2021-06-06 21:24:28 -05:00
parent f59a898d9a
commit 1610449a5f
2 changed files with 3 additions and 2 deletions

View file

@ -953,8 +953,9 @@ article.ebook #more-ebooks img{
height: 200px;
border-radius: .25rem;
border: 1px solid var(--border);
transition: all .2s ease;
transition: transform .2s ease;
box-sizing: border-box;
width: auto;
}
article.ebook #more-ebooks img:hover{

View file

@ -280,7 +280,7 @@ catch(\Exception $ex){
<picture>
<? if($carouselEbook->CoverImage2xAvifUrl !== null){ ?><source srcset="<?= $carouselEbook->CoverImage2xAvifUrl ?> 2x, <?= $carouselEbook->CoverImageAvifUrl ?> 1x" type="image/avif"/><? } ?>
<source srcset="<?= $carouselEbook->CoverImage2xUrl ?> 2x, <?= $carouselEbook->CoverImageUrl ?> 1x" type="image/jpg"/>
<img src="<?= $carouselEbook->CoverImageUrl ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText(strip_tags($carouselEbook->TitleWithCreditsHtml)) ?>"/>
<img src="<?= $carouselEbook->CoverImageUrl ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText(strip_tags($carouselEbook->TitleWithCreditsHtml)) ?>" height="200" width="134"/>
</picture>
</a>
</li>