mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Add support for AVIF covers, and multiple image source sets in covers
This commit is contained in:
parent
958b047f64
commit
1ab7c8c0fe
8 changed files with 56 additions and 12 deletions
|
@ -6,7 +6,13 @@ if(!isset($ebooks)){
|
|||
<ol>
|
||||
<? foreach($ebooks as $ebook){ ?>
|
||||
<li>
|
||||
<a href="<?= $ebook->Url ?>"><img src="<?= $ebook->CoverImage2xUrl ?>" title="<?= Formatter::ToPlainText($ebook->Title) ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText($ebook->Title) ?>" /></a>
|
||||
<a href="<?= $ebook->Url ?>">
|
||||
<picture>
|
||||
<source srcset="<?= $ebook->CoverImage2xAvifUrl ?> 2x, <?= $ebook->CoverImageAvifUrl ?> 1x" type="image/avif">
|
||||
<source srcset="<?= $ebook->CoverImage2xUrl ?> 2x, <?= $ebook->CoverImageUrl ?> 1x" type="image/jpg">
|
||||
<img src="<?= $ebook->CoverImage2xUrl ?>" title="<?= Formatter::ToPlainText($ebook->Title) ?>" alt="The cover for the Standard Ebooks edition of <?= Formatter::ToPlainText(strip_tags($ebook->TitleWithCreditsHtml)) ?>" />
|
||||
</picture>
|
||||
</a>
|
||||
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>
|
||||
<? foreach($ebook->Authors as $author){ ?>
|
||||
<p class="author"><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue