summaryrefslogtreecommitdiff
path: root/includes
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 /includes
parent43156f86f3e167f066e1a655baee71eaebbdad4b (diff)
修复无法评论问题,现在具有data-pjax特性的元素才能使pjax响应
Diffstat (limited to 'includes')
-rw-r--r--includes/footer.php4
-rw-r--r--includes/head.php7
-rw-r--r--includes/header.php4
-rw-r--r--includes/sidebar.php6
4 files changed, 13 insertions, 8 deletions
diff --git a/includes/footer.php b/includes/footer.php
index eedc7a0..74c3c29 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -8,7 +8,7 @@
<div class="newest-comment">
<?php $this->widget('Widget_Comments_Recent','ignoreAuthor=true')->to($comments); ?>
<?php while($comments->next()): ?>
- <a href="<?php $comments->permalink(); ?>"><?php $comments->gravatar(200); ?></a>
+ <a href="<?php $comments->permalink(); ?>" data-pjax><?php $comments->gravatar(200); ?></a>
<?php endwhile; ?>
</div>
</div>
@@ -44,7 +44,7 @@
<script>
//pjax load
$(document).pjax(
- 'body a',
+ '[data-pjax]',
'#pjax-container',
{
timeout:8000,
diff --git a/includes/head.php b/includes/head.php
index c99961e..796f34c 100644
--- a/includes/head.php
+++ b/includes/head.php
@@ -65,8 +65,13 @@
#nav{
padding:0!important;
}
+ .nav-content{
+ display:block;
+ text-align:Center;
+ margin:0 auto!important;
+ }
.nav-content,.nav-content ul>li{
- float:left!important
+ float:left;
}
.nav-content{
font-size:12px;
diff --git a/includes/header.php b/includes/header.php
index 03837f3..f8fdedc 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -18,8 +18,8 @@
<?php $this->options->custom_nav() ?>
<?php else: ?>
<?php $this->widget('Widget_Contents_Page_List')
- ->parse('<li><a href="{permalink}"><i class="fa fa-paper-plane" aria-hidden="true"></i> {title}</a></li>'); ?>
- <li><a href="<?php $this->options->SiteUrl(); ?>"><i class="fa fa-home" aria-hidden="true"></i> 首页</a></li>
+ ->parse('<li><a href="{permalink}" data-pjax><i class="fa fa-paper-plane" aria-hidden="true"></i> {title}</a></li>'); ?>
+ <li><a data-pjax href="<?php $this->options->SiteUrl(); ?>"><i class="fa fa-home" aria-hidden="true"></i> 首页</a></li>
<?php endif; ?>
</ul>
</div>
diff --git a/includes/sidebar.php b/includes/sidebar.php
index 0c07b6f..c9dfa2f 100644
--- a/includes/sidebar.php
+++ b/includes/sidebar.php
@@ -28,7 +28,7 @@
<div class="input-group">
<input type="text" name="s" class="form-control" placeholder="搜点什么吧~">
<span class="input-group-btn">
- <button class="btn btn-default sumbit" type="sumbit"><i class="fa fa-search"></i></button>
+ <button class="btn btn-default sumbit" type="sumbit" data-pjax><i class="fa fa-search"></i></button>
</span>
</div>
</form>
@@ -67,7 +67,7 @@
<hr />
<ul class="sidebar-category list-group">
<?php $this->widget('Widget_Metas_Category_List')
- ->parse('<li class="list-group-item"><a href="{permalink}">{name}</a><span class="badge">{count}</span></li>'); ?>
+ ->parse('<li class="list-group-item"><a href="{permalink}" data-pjax>{name}</a><span class="badge">{count}</span></li>'); ?>
</ul>
</div>
@@ -89,7 +89,7 @@
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=mid&ignoreZeroCount=1&desc=0&limit=30')->to($tags); ?>
<?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
- <a href="<?php $tags->permalink(); ?>" title="该标签下有 <?php $tags->count(); ?> 篇文章"><?php $tags->name(); ?></a>
+ <a href="<?php $tags->permalink(); ?>" title="该标签下有 <?php $tags->count(); ?> 篇文章" data-pjax><?php $tags->name(); ?></a>
<?php endwhile; ?>
<?php else: ?>
还没有任何标签哦~