mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Add wrapping <div> around authors in list view, to correctly align with CSS grid
This commit is contained in:
parent
06f55d5af9
commit
9de1a41f91
1 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,9 @@
|
||||||
<?
|
<?
|
||||||
|
|
||||||
|
if($view == ''){
|
||||||
|
$view = VIEW_GRID;
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($ebooks)){
|
if(!isset($ebooks)){
|
||||||
$ebooks = [];
|
$ebooks = [];
|
||||||
}
|
}
|
||||||
|
@ -14,13 +19,21 @@ if(!isset($ebooks)){
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>
|
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>
|
||||||
|
<? if($view == VIEW_GRID){ ?>
|
||||||
<? foreach($ebook->Authors as $author){ ?>
|
<? foreach($ebook->Authors as $author){ ?>
|
||||||
<p class="author"><? if($author->Name != 'Anonymous'){ ?><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a><? } ?></p>
|
<p class="author"><? if($author->Name != 'Anonymous'){ ?><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a><? } ?></p>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? if($view == VIEW_LIST){ ?>
|
<? }else{ ?>
|
||||||
|
<div>
|
||||||
|
<? foreach($ebook->Authors as $author){ ?>
|
||||||
|
<p class="author"><? if($author->Name != 'Anonymous'){ ?><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a><? } ?></p>
|
||||||
|
<? } ?>
|
||||||
|
</div>
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<? if($ebook->ContributorsHtml !== null){ ?>
|
<? if($ebook->ContributorsHtml !== null){ ?>
|
||||||
|
<div>
|
||||||
<p><?= rtrim($ebook->ContributorsHtml, '.') ?></p>
|
<p><?= rtrim($ebook->ContributorsHtml, '.') ?></p>
|
||||||
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<p><?= number_format($ebook->WordCount) ?> words • <?= $ebook->ReadingEase ?> reading ease</p>
|
<p><?= number_format($ebook->WordCount) ?> words • <?= $ebook->ReadingEase ?> reading ease</p>
|
||||||
<ul class="tags"><? foreach($ebook->Tags as $tag){ ?><li><a href="<?= $tag->Url ?>"><?= Formatter::ToPlainText($tag->Name) ?></a></li><? } ?></ul>
|
<ul class="tags"><? foreach($ebook->Tags as $tag){ ?><li><a href="<?= $tag->Url ?>"><?= Formatter::ToPlainText($tag->Name) ?></a></li><? } ?></ul>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue