关于评论的判断
This commit is contained in:
parent
46f50de81b
commit
965dd0fc7f
4
404.php
4
404.php
|
@ -28,7 +28,3 @@
|
|||
</section>
|
||||
</main>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
<script src="https://cdnjs.sgcd.net/code-highlight/js/prism.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.sgcd.net/code-highlight/css/prism.css" />
|
||||
<script src="<?php $this->options->themeUrl('/dist/js/bundle.js'); ?>"></script>
|
||||
<script>Prism.highlightAll()</script>
|
|
@ -8,4 +8,4 @@ https://github.com/bigfa/hugo-theme-farallon
|
|||
70%
|
||||
|
||||
## 待实现
|
||||
-[]豆瓣观影
|
||||
-[] 豆瓣观影
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<header class="archive-header archive-header__search">
|
||||
<div class="pagination">
|
||||
<h2>Sorry</h2>
|
||||
<p>很遗憾,未找到您想看的内容</p>
|
||||
<p>很遗憾,未找到您期待的内容</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php $this->pageNav('« 前一页', '后一页 »'); ?>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<?php else: ?>
|
||||
<?php _e(''); ?>
|
||||
<?php endif; ?>
|
||||
<?php $this->options->twikoo(); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
|
@ -24,7 +24,9 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<?php $this->need('comments.php'); ?>
|
||||
<?php if ($this->allow('comment')): ?>
|
||||
<?php $this->need('comments.php'); ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
7
page.php
7
page.php
|
@ -9,7 +9,12 @@
|
|||
<?php $this->content(); ?>
|
||||
</div>
|
||||
</article>
|
||||
<?php $this->need('comments.php'); ?>
|
||||
<!-- 判断如果禁止评论则不显示评论的div -->
|
||||
<?php if ($this->allow('comment')): ?>
|
||||
<?php $this->need('comments.php'); ?>
|
||||
<?php endif; ?>
|
||||
<!-- 可以使用第三方评论-->
|
||||
<?php $this->options->twikoo(); ?>
|
||||
</section>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
|
9
post.php
9
post.php
|
@ -78,8 +78,11 @@
|
|||
</nav>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<?php $this->need('comments.php'); ?>
|
||||
|
||||
<!-- 判断如果禁止评论则不显示评论的div -->
|
||||
<?php if ($this->allow('comment')): ?>
|
||||
<?php $this->need('comments.php'); ?>
|
||||
<?php endif; ?>
|
||||
<!-- 可以使用第三方评论-->
|
||||
<?php $this->options->twikoo(); ?>
|
||||
</main>
|
||||
<?php $this->need('footer.php'); ?>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
</a>
|
||||
</h2>
|
||||
<div class="description" itemprop="about">
|
||||
<?php
|
||||
<!-- 本功能实现 借助插件实现 -->
|
||||
<?php
|
||||
// 判断是否存在自定义字段summary并输出,否则输出自动生成的摘要
|
||||
if($this->fields->summary){
|
||||
echo $this->fields->summary;
|
||||
} else {
|
||||
$this->excerpt(180);
|
||||
}
|
||||
?>
|
||||
}?>
|
||||
</div>
|
||||
<div class="meta">
|
||||
<svg class="icon" viewBox="0 0 1024 1024" width="16" height="16">
|
||||
|
|
Loading…
Reference in New Issue