mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 20:36:38 -04:00
Add size warning when single-page download is larger than 1MB
This commit is contained in:
parent
e0c75b8ae0
commit
04759aa17b
5 changed files with 37 additions and 9 deletions
|
@ -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>
|
||||
<? } ?>
|
||||
|
|
|
@ -56,7 +56,6 @@ try{
|
|||
// Are we looking at a collection?
|
||||
if($collection !== null){
|
||||
$ebooks = Library::GetEbooksByCollection($collection);
|
||||
|
||||
// Get the *actual* name of the collection, in case there are accent marks (like "Arsène Lupin")
|
||||
if(sizeof($ebooks) > 0){
|
||||
foreach($ebooks[0]->Collections as $c){
|
||||
|
@ -86,7 +85,6 @@ try{
|
|||
$ebooks = array_slice($ebooks, ($page - 1) * $perPage, $perPage);
|
||||
}
|
||||
|
||||
|
||||
if($page > 1){
|
||||
$pageTitle .= ', page ' . $page;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue