Add size warning when single-page download is larger than 1MB

This commit is contained in:
Alex Cabal 2023-01-13 16:29:52 -06:00
parent e0c75b8ae0
commit 04759aa17b
5 changed files with 37 additions and 9 deletions

View file

@ -281,8 +281,8 @@ catch(Exceptions\InvalidEbookException $ex){
<li property="schema:encoding" typeof="schema:mediaObject">
<meta property="schema:description" content="XHTML"/>
<meta property="schema:encodingFormat" content="application/xhtml+xml"/>
<p>
<a property="schema:contentUrl" href="<?= $ebook->TextSinglePageUrl ?>" class="page">Read on one page</a>
<p<? if($ebook->TextSinglePageSizeNumber >= 3 && $ebook->TextSinglePageSizeUnit == 'M'){ ?> class="has-size"<? } ?>>
<a property="schema:contentUrl" href="<?= $ebook->TextSinglePageUrl ?>" class="page">Read on one page</a><? if($ebook->TextSinglePageSizeNumber >= 3 && $ebook->TextSinglePageSizeUnit == 'M'){ ?><span><?= $ebook->TextSinglePageSizeNumber ?>MB</span><? } ?>
</p>
</li>
<? } ?>