You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
2.7 KiB
42 lines
2.7 KiB
<!-- Content -->
|
|
<div class="flex flex-1 flex-col md:px-6 pt-10" id="content">
|
|
<!-- Title -->
|
|
<div class="px-6 md:px-0 flex justify-between items-center -order-1">
|
|
<div>
|
|
<h2 class="font-normal">热门书籍</h2>
|
|
</div>
|
|
</div>
|
|
<!-- Filter -->
|
|
<div class="px-6 md:px-0 flex items-baseline justify-between border-b-2 border-grey-light mt-6 order-0 lg:order-1"></div>
|
|
<!-- Library -->
|
|
<div class="hidden px-2 pt-2 md:px-0 flex-wrap order-2 pb-8 js-tab-pane active" id="section-library">
|
|
<?php if (isset($books[0]['bid'])) {
|
|
foreach ($books as $book) { ?>
|
|
<div class="flex flex-row sm:flex-col items-center sm:items-start w-full xs:w-1/2 sm:w-1/3 md:w-1/5 p-4 js-book" data-href="/book/<?=$book['bid']?>">
|
|
<img src="<?=$book['cover']?>" class="w-1/3 sm:w-full shadow-md transition-normal hover:brighter hover:translate-y-1 hover:shadow-lg hover:border-indigo">
|
|
<div class="ml-3 sm:ml-0 w-2/3 sm:w-full">
|
|
<p class="text-sm my-2 font-medium sm:font-normal">《<?=$book['name']?>》</p>
|
|
<p class="block text-grey-dark sm:hidden mt-2 mb-3 text-sm leading-medium">
|
|
<?php foreach ($categories as $category) if ($category['cid'] == $book['cid']) echo $category['name']; ?> (<?=$book['author']?>-<?=$book['publish']?>)
|
|
</p>
|
|
<p class="block text-grey sm:hidden mt-2 mb-3 text-sm leading-medium">
|
|
<?=$book['lang']=='zh-cn'?'简体中文':'英文'?> (ISBN: <?=$book['isbn']?>)
|
|
</p>
|
|
<label class="hidden sm:inline-block rounded-full libre-bg-grey text-white px-2 py-1/2 text-xs"><?=$book['author']?></label>
|
|
<label class="hidden sm:inline-block rounded-full libre-bg-grey text-white px-2 py-1/2 text-xs"><?=$book['publish']?></label>
|
|
<label class="hidden sm:inline-block rounded-full libre-bg-grey text-white px-2 py-1/2 text-xs"><?php foreach ($categories as $category) if ($category['cid'] == $book['cid']) echo $category['name']; ?></label>
|
|
<label class="hidden sm:inline-block rounded-full libre-bg-grey text-white px-2 py-1/2 text-xs"><?=$book['lang']=='zh-cn'?'简体中文':'英文'?></label>
|
|
<label class="hidden sm:inline-block rounded-full libre-bg-grey text-white px-2 py-1/2 text-xs">ISBN: <?=$book['isbn']?></label>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
<?php $path = '/'; require(APP_ROOT.'/src/template/defaults/page_switch.php'); ?>
|
|
<?php } else { ?>
|
|
<div class="flex flex-row sm:flex-col items-center sm:items-start w-full xs:w-1/2 sm:w-1/3 md:w-1/5 p-4">
|
|
<p class="text-2xl my-2 font-bold sm:font-bold">暂无热门数据</p>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
if (isset($_SESSION['user'])) require(APP_ROOT.'/src/template/defaults/user_profile.php');
|
|
|