summaryrefslogtreecommitdiff
path: root/post/post-item.php
diff options
context:
space:
mode:
author阔落 <45323514+BigCoke233@users.noreply.github.com>2019-04-06 16:48:17 +0800
committerGitHub <noreply@github.com>2019-04-06 16:48:17 +0800
commitbf183e944f0cbb924b73c84d2c8cdb7b59d35eb1 (patch)
treef6530294df83ec1991b92c5c8dfa64b224b34e34 /post/post-item.php
parent43156f86f3e167f066e1a655baee71eaebbdad4b (diff)
修复无法评论问题,现在具有data-pjax特性的元素才能使pjax响应
Diffstat (limited to 'post/post-item.php')
-rw-r--r--post/post-item.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/post/post-item.php b/post/post-item.php
index 5452f45..262632f 100644
--- a/post/post-item.php
+++ b/post/post-item.php
@@ -12,10 +12,10 @@
<?php $this->author->gravatar(50) ?>
</div>
<div class="col-md-11 col-xs-10">
- <h4 class="saying-title"><a href="<?php $this->permalink() ?>"><?php $this->title(); ?></a></h4>
+ <h4 class="saying-title"><a href="<?php $this->permalink() ?>" data-pjax><?php $this->title(); ?></a></h4>
<div class="saying-info"><?php $this->date('F j, Y'); ?></div>
- <a href="<?php $this->permalink() ?>" class="read-more pull-right btn btn-default">前往吐槽</a>
+ <a href="<?php $this->permalink() ?>" class="read-more pull-right btn btn-default" data-pjax>前往吐槽</a>
</div>
</div>
</div>
@@ -24,7 +24,7 @@
<?php endif; ?>
<!-- 小板式文章 -->
<?php elseif($this->fields->type=='2'): ?>
- <a href="<?php $this->permalink() ?>" class="post-link">
+ <a href="<?php $this->permalink() ?>" class="post-link" data-pjax>
<div class="item post-item">
<div class="row">
<div style="height:160px;background:url('<?php $this->fields->banner(); ?>');background-repeat:no-repeat;background-size:cover" class="col-md-3 col-xs-5 post-banner-sm"></div>
@@ -45,7 +45,7 @@
<br />
<?php else: ?>
<!-- 普通文章 -->
- <a href="<?php $this->permalink() ?>" class="post-link">
+ <a href="<?php $this->permalink() ?>" class="post-link" data-pjax>
<div class="item post-item">
<?php if ($this->is('index')): ?>
<div class="post-banner">
@@ -58,6 +58,11 @@
<h2 class="index-post-header"><?php $this->sticky(); $this->title() ?></h4>
<p class="excerpt">
+ <?php if($this->fields->topic && $this->fields->topic!='') :?>
+ <blockquote class="post-topic">
+ <p><?php $this->fields->topic(); ?></p>
+ </blockquote>
+ <?php endif; ?>
<?php $this->need('post/post-excerpt.php'); ?>
<?php echo $this->excerpt(100); ?>
</p>