mirror of
https://github.com/jkjoy/typecho-theme-farallon.git
synced 2026-06-27 20:34:30 +00:00
0.7.1
修复了一个<div>未闭合的bug 优化分页和加载更多逻辑
This commit is contained in:
@@ -91,40 +91,11 @@ foreach ($normalPosts as $normalPost) {
|
||||
$this->push($normalPost);
|
||||
}
|
||||
?>
|
||||
<?php $this->need('module/header.php');?>
|
||||
<?php $this->need('header.php');?>
|
||||
<main class="site--main">
|
||||
<div class="articleList">
|
||||
<?php $this->need('module/postlist.php'); ?>
|
||||
<?php if ($this->options->loadmore): ?>
|
||||
<?php
|
||||
$this->pageNav(
|
||||
' ',
|
||||
' ',
|
||||
1,
|
||||
'...',
|
||||
array(
|
||||
'wrapTag' => 'nav',
|
||||
'wrapClass' => 'nav-links nav-links__comment',
|
||||
'itemTag' => '',
|
||||
'textTag' => 'span',
|
||||
'itemClass' => 'page-numbers',
|
||||
'currentClass' => 'page-numbers current',
|
||||
'prevClass' => 'hidden',
|
||||
'nextClass' => 'hidden'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$nextPage = $this->_currentPage + 1;
|
||||
$totalPages = ceil($this->getTotal() / $this->parameter->pageSize);
|
||||
if ($this->_currentPage < $totalPages): ?>
|
||||
<div class="nav-links">
|
||||
<span class="loadmore"><?php $this->pageLink('加载更多', 'next'); ?></span>
|
||||
<div class="articleList">
|
||||
<?php $this->need('module/postlist.php'); ?>
|
||||
<?php $this->need('module/paging.php'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<script src="<?php $this->options->themeUrl('assets/js/loadmore.js'); ?>"></script>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</main>
|
||||
<?php $this->need('module/footer.php'); ?>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
Reference in New Issue
Block a user