summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorEltrac <45323514+BigCoke233@users.noreply.github.com>2019-10-04 13:33:46 +0800
committerGitHub <noreply@github.com>2019-10-04 13:33:46 +0800
commitba2c1fab5e4ba32a9023e7888b37f3f37a772198 (patch)
treecf83499f70eb66acdd89e4fb7da814acd02f99cc /index.php
parent6beaf28e84b3ce4aed90c207ffa8194d2514baf3 (diff)
🔖 Fix: 移动端不显示自定义摘要 #4
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/index.php b/index.php
index f37a65a..b8c4a25 100644
--- a/index.php
+++ b/index.php
@@ -1,11 +1,11 @@
<?php
/**
* You're the miracles. 你即是奇迹
- * 作者:<a href="https://guhub.cn">Eltrac</a> | 帮助文档:<a href="https://github.com/BigCoke233/miracles/wiki">GitHub Wiki</a>><br><span style="color:red">你现在是用的是 Miracles 主题开发版,强烈建议你更换为<a href="https://github.com/BigCoke233/miracles/releases">发行版</a></span>
+ * 作者:<a href="https://guhub.cn">Eltrac</a> | 帮助文档:<a href="https://github.com/BigCoke233/miracles/wiki">GitHub Wiki</a><br><span style="color:red"> 你现在是用的是 Miracles 主题开发版,强烈建议你更换为 < a href="https://github.com/BigCoke233/miracles/releases"> 发行版 </a></span>
*
* @package Miracles
* @author Eltrac
- * @version development
+ * @version 1.3.0
* @link https://guhub.cn
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
@@ -55,7 +55,13 @@ $this->need('includes/header.php');
<a href="<?php $this->permalink(); ?>" class="post-link">
<h1 class="post-title-ss"><?php $this->sticky(); ?><?php $this->title(); ?></h1>
</a>
- <p class="post-excerpt"><?php $this->excerpt(); ?></p>
+ <p class="post-excerpt">
+ <?php if($this->fields->excerpt && $this->fields->excerpt!='') {
+ echo $this->fields->excerpt;
+ }else{
+ echo $this->excerpt(130);
+ }
+ ?></p>
<p class="post-meta"><i class="iconfont icon-block"></i> <?php $this->category(','); ?>&emsp;<i class="iconfont icon-comments"></i> <?php $this->commentsNum('None', 'Only 1', '%d'); ?>&emsp;<i class="iconfont icon-clock"></i> <?php $this->date(); ?></p>
</div>
</div>
@@ -71,4 +77,4 @@ $this->need('includes/header.php');
<!-- 防止找不到 owo 容器而报错 -->
<div style="display:none" class="OwO"></div>
-<?php $this->need('includes/footer.php'); ?>
+<?php $this->need('includes/footer.php'); ?> \ No newline at end of file