diff options
| author | Eltrac <45323514+BigCoke233@users.noreply.github.com> | 2019-12-14 17:20:39 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-14 17:20:39 +0800 |
| commit | 1724e2d76230d729e88c1e53f3b1dec94b880db1 (patch) | |
| tree | 2b45bfe8bb730c420cd173b02f82fa09b251f19d | |
| parent | ea9f6ff3e2bbe323528e8ea169de231dc9ca0ba5 (diff) | |
🎁 Add: 文章分享功能
| -rw-r--r-- | includes/head.php | 2 | ||||
| -rw-r--r-- | post.php | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/includes/head.php b/includes/head.php index db3cb6d..cf25c22 100644 --- a/includes/head.php +++ b/includes/head.php @@ -52,7 +52,7 @@ <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/main/miracles.min.css'); ?>" /> <?php endif; ?> <!-- icon font --> - <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_zqarkyagpn9.css" /> + <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_t5sh6mq8n6i.css" /> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300|Noto+Serif+SC:300&display=swap" rel="stylesheet"> <style>.body-dark .pio-action .pio-home{background-image: url(<?php Utils::indexTheme('images/icons/home.png'); ?>);}.body-dark .pio-action .pio-close{background-image: url(<?php Utils::indexTheme('images/icons/remove.png'); ?>);}.body-dark .pio-action .pio-skin{background-image: url(<?php Utils::indexTheme('images/icons/skin.png'); ?>);}.body-dark .pio-action .pio-info{background-image: url(<?php Utils::indexTheme('images/icons/info.png'); ?>);}.body-dark .pio-action .pio-night{background-image: url(<?php Utils::indexTheme('images/icons/night.png'); ?>);}@media (min-width:992px) {.search{background-image:url(<?php Utils::indexTheme('images/search.png'); ?>);}.login{background-image:url(<?php Utils::indexTheme('images/login.png'); ?>)}}.search {background-position: bottom right;background-repeat: no-repeat}.login {background-position: bottom left;background-repeat:no-repeat}<?php $this->options->cssEcho(); ?></style> @@ -6,23 +6,31 @@ $this->need('includes/header.php'); <div class="post-body"> <div class="post-content" id="post-content"><!-- 文章内容 --> <?php $postCheck = Utils::isOutdated($this); if($postCheck["is"] && $this->is('post')): ?> - <div class="tip red"> + <div class="tip red" id="out-date-alert"> <div class="container-fluid"><div class="row"> <div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div> <div class="col-11 tip-content">本文编写于 <?php echo $postCheck["created"]; ?> 天前,最后修改于 <?php echo $postCheck["updated"]; ?> 天前,其中某些信息可能已经过时。</div> </div></div> </div> - <div class="tip blue"> - <div class="container-fluid"> - <div class="row"> - <div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div> - <div class="col-11 tip-content" id="readTip"></div></div></div> - </div> <?php endif; ?> + <?php if($this->options->ifShowRTA==1): ?> + <div class="tip blue" id="reading-time-alert"> + <div class="container-fluid"> + <div class="row"> + <div class="col-1 tip-icon"><i class="iconfont icon-info"></i></div> + <div class="col-11 tip-content" id="readTip"></div> + </div></div> + </div> + <?php endif;?> <?php $this->content(); ?> - <br /> </div> <div class="post-footer"><!-- 文章页脚 --> + <div class="post-share">分享至: + <a class="social-share qq" target="_blank" href="https://connect.qq.com/widget/shareqq/index.html?url=<?php $this->permalink() ?>&title=<?php $this->title() ?>&summary=<?php $this->excerpt(100); ?>" title="分享至 QQ 好友"><i class="iconfont icon-qq1-copy"></i></a> + <a class="social-share weibo" target="_blank" href="http://service.weibo.com/share/share.php?url=<?php $this->permalink() ?>/&appkey=<?php $this->options->title(); ?>/&title=<?php $this->title() ?>" title="分享至新浪微博"><i class="iconfont icon-weibo-copy"></i></a> + <a class="social-share twitter" target="_blank" href="https://twitter.com/intent/tweet?text=<?php $this->excerpt(100); ?>&url=<?php $this->permalink() ?>"><i class="iconfont icon-twitter-copy" title="分享至 Twitter"></i></a> + <a class="social-share copyright" onclick="alertSend('文章未声明即为原创,转载请注明原作者',true)"><i class="iconfont icon-info1"></i></a> + </div> <span class="post-tags"><i class="iconfont icon-tags"></i> <?php $this->tags(' ', true, '这人还没有写标签哦~'); ?></span> </div> </div> |
