1
0

books_list + books_panel

This commit is contained in:
2018-01-27 18:13:38 +01:00
parent a84a475008
commit 6db79d9447
29 changed files with 600 additions and 8 deletions

View File

@@ -0,0 +1,34 @@
<?php
require_once(__DIR__ . '/../internals/books.php');
$allbooks = Books::listAllNewestFirst();
?>
<div class="index_pnl_base">
<div class="index_pnl_header">
<a href="/books">Converted books</a>
</div>
<div class="index_pnl_content books_pnl_content">
<?php
for ($i=0; $i<min(6, count($allbooks)); $i++)
{
$book = $allbooks[$i];
$extra = $i>=2 ? 'books_pnl_extra' : '';
echo "<a class='books_pnl_entry $extra' href='" . $book['url'] . "'>";
echo ' <img src="' . $book['preview_url'] . '" alt="' . $book['title'] . ' " />' . "\n";
echo "<div class='books_pnl_caption'>" . htmlspecialchars($book['title_short']) . "</div>";
echo "";
echo "</a>";
}
?>
</div>
</div>