Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
postbird committed Jul 15, 2018
1 parent d021e56 commit a33be7b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 50 deletions.
96 changes: 48 additions & 48 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,54 @@
<div class="row">
<div class="col-md-12">
<div id="comments" class=" comments-wrapper">
<?php function threadedComments($comments, $options) {
$commentClass = '';
if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
$commentClass .= ' comment-by-author';
} else {
$commentClass .= ' comment-by-user';
}
}
$commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent';
?>
<li id="li-<?php $comments->theId(); ?>" class="comment-body<?php
if ($comments->levels > 0) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
} else {
echo ' comment-parent';
}
$comments->alt(' comment-odd', ' comment-even');
echo $commentClass;
?>">
<div id="<?php $comments->theId(); ?>" class="comment-item">
<div class="comment-author">
<?php $comments->gravatar('40', ''); ?>
<span class="fn">
<?php $comments->author(); ?>
<?php if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
echo "<span class='author-after-text'>[作者]</span>";
}?>
<?php }?>
</span>
</div>
<div class="comment-meta">
<a href="<?php $comments->permalink(); ?>"><?php $comments->date('Y-m-d H:i'); ?></a>
</div>
<span class="comment-reply"><?php $comments->reply(); ?></span>
<div class="comment-content">
<?php $comments->content(); ?>
</div>
</div>
<?php if ($comments->children) { ?>
<div class="comment-children">
<?php $comments->threadedComments($options); ?>
</div>
<?php } ?>
</li>
<?php } ?>
<?php function threadedComments($comments, $options) {
$commentClass = '';
if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
$commentClass .= ' comment-by-author';
} else {
$commentClass .= ' comment-by-user';
}
}
$commentLevelClass = $comments->levels > 0 ? ' comment-child' : ' comment-parent';
?>
<li id="li-<?php $comments->theId(); ?>" class="comment-body<?php
if ($comments->levels > 0) {
echo ' comment-child';
$comments->levelsAlt(' comment-level-odd', ' comment-level-even');
} else {
echo ' comment-parent';
}
$comments->alt(' comment-odd', ' comment-even');
echo $commentClass;
?>">
<div id="<?php $comments->theId(); ?>" class="comment-item">
<div class="comment-author">
<?php $comments->gravatar('40', ''); ?>
<span class="fn">
<?php $comments->author(); ?>
<?php if ($comments->authorId) {
if ($comments->authorId == $comments->ownerId) {
echo "<span class='author-after-text'>[作者]</span>";
}?>
<?php }?>
</span>
</div>
<div class="comment-meta">
<a href="<?php $comments->permalink(); ?>"><?php $comments->date('Y-m-d H:i'); ?></a>
</div>
<span class="comment-reply"><?php $comments->reply(); ?></span>
<div class="comment-content">
<?php $comments->content(); ?>
</div>
</div>
<?php if ($comments->children) { ?>
<div class="comment-children">
<?php $comments->threadedComments($options); ?>
</div>
<?php } ?>
</li>
<?php } ?>
<?php $this->comments()->to($comments); ?>
<?php if ($comments->have()): ?>
<p><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></p>
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<article class="post-wrapper" itemscope itemtype="http://schema.org/BlogPosting">
<div class="row">
<div class="col-md-12">
<h3><a class="title-link" itemprop="url" title="<?php $this->title() ?>" href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h3>
<h3><a class="title-link" itemprop="url" title="<?php $this->title() ?>" href="<?php $this->permalink() ?>"><?php $this->sticky(); $this->title(); ?></a></h3>
</div>
<div class="col-md-4 ">
<?php if(get_postthumb($this)) {?>
Expand Down Expand Up @@ -55,7 +55,7 @@
</article>
<?php endwhile; ?>
<nav aria-label="Page navigation ">
<?php $this->pageNav('«', '»', 1, '...', array('wrapTag' => 'ul', 'wrapClass' => 'pagination', 'itemTag' => 'li', 'itemClass'=>'page-item', 'textTag' => 'span', 'currentClass' => 'active', 'prevClass' => 'prev', 'nextClass' => 'next',)); ?>
<?php $this->pageNav('«', '»', 1, '...', array('wrapTag' => 'ul', 'wrapClass' => 'pagination', 'itemTag' => 'li', 'itemClass'=>'page-item', 'textTag' => 'a', 'currentClass' => 'active', 'prevClass' => 'prev', 'nextClass' => 'next',)); ?>
</nav>

</div><!-- end #main-->
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

### 2、更新记录

2018-07-15:

- 修复分页 `...` 显示问题


## 二、主题安装
Expand Down

0 comments on commit a33be7b

Please sign in to comment.