mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 12:54:48 -04:00
Completely type hint template functions and switch to named arguments
This commit is contained in:
parent
6108b5e53d
commit
124e8343fc
125 changed files with 542 additions and 450 deletions
|
@ -16,7 +16,7 @@ try{
|
|||
catch(Exceptions\CollectionNotFoundException){
|
||||
Template::ExitWithCode(Enums\HttpCode::NotFound);
|
||||
}
|
||||
?><?= Template::Header(['title' => $pageTitle, 'feedUrl' => $feedUrl, 'feedTitle' => $feedTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>
|
||||
?><?= Template::Header(title: $pageTitle, feedUrl: $feedUrl, feedTitle: $feedTitle, highlight: 'ebooks', description: $pageDescription) ?>
|
||||
<main class="ebooks">
|
||||
<h1 class="is-collection"><?= $pageHeader ?></h1>
|
||||
<?= Template::DonationCounter() ?>
|
||||
|
@ -32,7 +32,7 @@ catch(Exceptions\CollectionNotFoundException){
|
|||
<? if(sizeof($collection->Ebooks) == 0){ ?>
|
||||
<p class="no-results">No ebooks matched your filters. You can try different filters, or <a href="/ebooks">browse all of our ebooks</a>.</p>
|
||||
<? }else{ ?>
|
||||
<?= Template::EbookGrid(['ebooks' => $collection->Ebooks, 'view' => Enums\ViewType::Grid, 'collection' => $collection]) ?>
|
||||
<?= Template::EbookGrid(ebooks: $collection->Ebooks, view: Enums\ViewType::Grid, collection: $collection) ?>
|
||||
<? } ?>
|
||||
|
||||
<? if(Session::$User?->Benefits->CanEditCollections){ ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?
|
||||
$collections = Collection::GetAll();
|
||||
|
||||
?><?= Template::Header(['title' => 'Ebook Collections', 'highlight' => '', 'description' => 'Browse collections of Standard Ebooks.']) ?>
|
||||
?><?= Template::Header(title: 'Ebook Collections', description: 'Browse collections of Standard Ebooks.') ?>
|
||||
<main>
|
||||
<section class="narrow has-hero">
|
||||
<h1>Ebook Collections</h1>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue