314 lines
21 KiB
PHP
314 lines
21 KiB
PHP
<?php
|
||
$this->need('base/header.php');
|
||
$this->need('base/article.style.php');
|
||
?>
|
||
<div class="bg-cover pd-header post-cover" style="background-image:url(<?php echo get_postthumb($this); ?>)">
|
||
<div class="container" style="right:0;left:0">
|
||
<div class="row">
|
||
<div class="col s12 m12 l12">
|
||
<div class="brand">
|
||
<div class="description center-align post-title"><?php $this->title() ?></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<main class="post-container content">
|
||
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/tocbot/tocbot.css'); ?>">
|
||
<div class="row">
|
||
<div id="main-content" class="col s12 m12 l9">
|
||
<div id="artDetail">
|
||
<div class="card">
|
||
<div class="card-content article-info">
|
||
<div class="row tag-cate">
|
||
<div class="col s7">
|
||
<div class="article-tag">
|
||
<?php $this->tags(' ', true, '暂无标签'); ?>
|
||
</div>
|
||
</div>
|
||
<div class="col s5 right-align">
|
||
<div class="post-cate"><i class="fas fa-bookmark fa-fw icon-category"></i>
|
||
<?php $this->category(','); ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="post-info">
|
||
<div class="post-date info-break-policy"><i class="far fa-calendar-minus fa-fw"></i>发布日期:
|
||
<?php $this->date(); ?>
|
||
</div>
|
||
<div class="post-date info-break-policy"><i class="far fa-calendar-check fa-fw"></i>更新日期:
|
||
<?php _e(date('Y-m-d', $this->modified)) ;?>
|
||
</div>
|
||
<div class="info-break-policy"><i class="far fa-file-word fa-fw"></i>文章字数:
|
||
75
|
||
</div>
|
||
<div class="info-break-policy"><i class="far fa-clock fa-fw"></i>阅读时长: 1 分
|
||
</div>
|
||
<div id="busuanzi_container_page_pv" class="info-break-policy"><i
|
||
class="far fa-eye fa-fw"></i>阅读次数: <span
|
||
id="busuanzi_value_page_pv"></span></div>
|
||
</div>
|
||
</div>
|
||
<hr class="clearfix">
|
||
<div class="card-content article-card-content">
|
||
<div id="articleContent">
|
||
<?php $this->content() ?>
|
||
</div>
|
||
<hr>
|
||
<div class="reprint" id="reprint-statement">
|
||
<div class="reprint__author"><span class="reprint-meta" style="font-weight:700"><i
|
||
class="fas fa-user">文章作者: </i></span><span class="reprint-info"><a
|
||
href="<?php $this->author->permalink(); ?>"
|
||
rel="external nofollow noreferrer"><?php $this->author(); ?></a></span></div>
|
||
<div class="reprint__type"><span class="reprint-meta" style="font-weight:700"><i
|
||
class="fas fa-link">文章链接: </i></span><span class="reprint-info"><a
|
||
href="<?php $this->permalink() ?>"><?php $this->permalink() ?></a></span>
|
||
</div>
|
||
<div class="reprint__notice"><span class="reprint-meta" style="font-weight:700"><i
|
||
class="fas fa-copyright">版权声明: </i></span><span class="reprint-info">本博客所有文章除特別声明外,均采用 <a
|
||
href="https://creativecommons.org/licenses/by/4.0/deed.zh"
|
||
rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a> 许可协议。转载请注明来源 !</span></div>
|
||
</div>
|
||
<script async defer>document.addEventListener("copy", function (e) {
|
||
let toastHTML = '<span>复制成功,请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
|
||
M.toast({html: toastHTML})
|
||
});
|
||
|
||
function navToReprintStatement() {
|
||
$("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
|
||
}</script>
|
||
<div class="tag_share" style="display:block">
|
||
<div class="post-meta__tag-list" style="display:inline-block">
|
||
<div class="article-tag"><a href="/tags/%E5%91%8A%E7%A4%BA/"><span
|
||
class="chip bg-color">告示</span></a></div>
|
||
</div>
|
||
<div class="post_share"
|
||
style="zoom:80%;width:fit-content;display:inline-block;float:right;margin:-.15rem 0">
|
||
<link rel="stylesheet" type="text/css" href="<?php $this->options->themeUrl('static/share/css/share.min.css'); ?>">
|
||
<div id="article-share">
|
||
<div class="social-share"
|
||
data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin"
|
||
data-wechat-qrcode-helper="<p>微信扫一扫即可分享!</p>"></div>
|
||
<script src="<?php $this->options->themeUrl('static/share/js/social-share.min.js'); ?>"></script>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="reward"><a href="#rewardModal"
|
||
class="reward-link modal-trigger btn-floating btn-large waves-effect waves-light red">赏</a>
|
||
<div id="rewardModal" class="modal">
|
||
<div class="modal-content"><a class="close modal-close"><i class="fa fa-close"></i></a>
|
||
<h4 class="reward-title">请我喝罐冰阔乐!</h4>
|
||
<div class="reward-content">
|
||
<div class="reward-tabs">
|
||
<ul class="tabs row">
|
||
<li class="tab col s6 alipay-tab waves-effect waves-light"><a
|
||
href="#alipay">支付宝</a></li>
|
||
<li class="tab col s6 wechat-tab waves-effect waves-light"><a
|
||
href="#wechat">微 信</a></li>
|
||
</ul>
|
||
<div id="alipay"><img
|
||
src="https://wang_lianjie.gitee.io/mobai_images.gitee.io/img/zf/alipay.jpg"
|
||
class="reward-img" alt="支付宝打赏二维码"></div>
|
||
<div id="wechat"><img
|
||
src="https://wang_lianjie.gitee.io/mobai_images.gitee.io/img/zf/wechat.jpg"
|
||
class="reward-img" alt="微信打赏二维码"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>$(function () {
|
||
$(".tabs").tabs()
|
||
})</script>
|
||
</div>
|
||
</div>
|
||
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/gitalk/gitalk.css'); ?>">
|
||
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/css/my-gitalk.css'); ?>">
|
||
<div class="card gitalk-card" data-aos="fade-up">
|
||
<div class="comment_headling"
|
||
style="font-size:20px;font-weight:700;position:relative;left:20px;top:15px;padding-bottom:5px">
|
||
<i class="fas fa-comments fa-fw" aria-hidden="true"></i> <span>评论</span></div>
|
||
<div id="gitalk-container" class="card-content"></div>
|
||
</div>
|
||
<script src="<?php $this->options->themeUrl('static/gitalk/gitalk.min.js'); ?>"></script>
|
||
<script>let gitalk = new Gitalk({
|
||
clientID: '',
|
||
clientSecret: '',
|
||
repo: '',
|
||
owner: 'mobaijun',
|
||
admin: ["mobaijun"],
|
||
id: '2020-04-23T09-46-47',
|
||
distractionFreeMode: false // Facebook-like distraction free mode
|
||
});
|
||
|
||
gitalk.render('gitalk-container');</script>
|
||
<div class="card valine-card" data-aos="fade-up">
|
||
<div id="vcomments" class="card-content" style="display:grid"></div>
|
||
</div>
|
||
<script src="<?php $this->options->themeUrl('static/valine/av-min.js'); ?>"></script>
|
||
<script src="<?php $this->options->themeUrl('static/valine/Valine.min.js'); ?>"></script>
|
||
<script>new Valine({
|
||
el: "#vcomments",
|
||
appId: "",
|
||
appKey: "",
|
||
notify: !1,
|
||
verify: !1,
|
||
visitor: !0,
|
||
avatar: "monsterid",
|
||
pageSize: "10",
|
||
lang: "zh-cn",
|
||
placeholder: "ヾノ≧∀≦)o来啊,快活啊!"
|
||
})</script>
|
||
<article id="prenext-posts" class="prev-next articles">
|
||
<div class="row article-row">
|
||
<div class="article col s12 m6" data-aos="fade-up" data-aos="fade-up">
|
||
<div class="article-badge left-badge text-color"><i class="far fa-dot-circle"></i> 本篇
|
||
</div>
|
||
<div class="card"><a href="/posts/3274106043.html">
|
||
<div class="card-image"><img src="/medias/featureimages/5.jpg"
|
||
class="responsive-img"
|
||
alt="博客地址更换为https://www.mobaijun.com"> <span
|
||
class="card-title">博客地址更换为https://www.mobaijun.com</span></div>
|
||
</a>
|
||
<div class="card-content article-content">
|
||
<div class="summary block-with-text">
|
||
博客地址已经更换,请大家奔走相告新地址为:https://www.mobaijun.com
|
||
document.querySelectorAll('.github-emoji') .forEach(el
|
||
</div>
|
||
<div class="publish-info"><span class="publish-date"><i
|
||
class="far fa-clock fa-fw icon-date"></i>2020-04-23 </span><span
|
||
class="publish-author"><i
|
||
class="fas fa-bookmark fa-fw icon-category"></i> <a
|
||
href="/categories/%E5%8D%9A%E5%AE%A2/"
|
||
class="post-category">博客</a></span>
|
||
</div>
|
||
</div>
|
||
<div class="card-action article-tags"><a href="/tags/%E5%91%8A%E7%A4%BA/"><span
|
||
class="chip bg-color">告示</span></a></div>
|
||
</div>
|
||
</div>
|
||
<div class="article col s12 m6" data-aos="fade-up">
|
||
<div class="article-badge right-badge text-color">下一篇 <i
|
||
class="fas fa-chevron-right"></i></div>
|
||
<div class="card"><a href="/posts/hello-world.html">
|
||
<div class="card-image"><img src="/medias/featureimages/7.jpg"
|
||
class="responsive-img"
|
||
alt="Hello World"> <span
|
||
class="card-title">Hello World</span></div>
|
||
</a>
|
||
<div class="card-content article-content">
|
||
<div class="summary block-with-text">
|
||
生活就是,只有勇于攀登才能创造辉煌;生活就是创新,只有与时俱进才能跟上时代;生活就是付出,只有吃苦流汗才能实现理想;生活就是享受,只有品尝人生才能感知生活的快乐。
|
||
</div>
|
||
<div class="publish-info"><span class="publish-date"><i
|
||
class="far fa-clock fa-fw icon-date"></i>2019-12-06 </span><span
|
||
class="publish-author"><i
|
||
class="fas fa-bookmark fa-fw icon-category"></i> <a
|
||
href="/categories/%E9%9A%8F%E7%AC%94/"
|
||
class="post-category">随笔</a></span>
|
||
</div>
|
||
</div>
|
||
<div class="card-action article-tags"><a href="/tags/%E5%85%B6%E4%BB%96/"><span
|
||
class="chip bg-color">其他</span></a></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</article>
|
||
</div>
|
||
<script>$("#articleContent").on("copy", function (e) {
|
||
var n, t, o, i;
|
||
void 0 !== window.getSelection && (("" + (n = window.getSelection())).length < Number.parseInt("120") || (t = document.getElementsByTagName("body")[0], (o = document.createElement("div")).style.position = "absolute", o.style.left = "-99999px", t.appendChild(o), o.appendChild(n.getRangeAt(0).cloneContents()), "PRE" === n.getRangeAt(0).commonAncestorContainer.nodeName && (o.innerHTML = "<pre>" + o.innerHTML + "</pre>"), i = document.location.href, o.innerHTML += '<br />来源: 框架师<br />文章作者: 墨白<br />文章链接: <a href="' + i + '">' + i + "</a><br />本文章著作权归墨白所有,任何形式的转载都请注明出处。", n.selectAllChildren(o), window.setTimeout(function () {
|
||
t.removeChild(o)
|
||
}, 200)))
|
||
})</script>
|
||
<script type="text/javascript" src="<?php $this->options->themeUrl('static/codeBlock/codeBlockFuction.js'); ?>"></script>
|
||
<script type="text/javascript" src="<?php $this->options->themeUrl('static/codeBlock/codeLang.js'); ?>"></script>
|
||
<script type="text/javascript" src="<?php $this->options->themeUrl('static/codeBlock/codeCopy.js'); ?>"></script>
|
||
<script type="text/javascript" src="<?php $this->options->themeUrl('static/codeBlock/codeShrink.js'); ?>"></script>
|
||
</div>
|
||
<div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
|
||
<div class="toc-widget">
|
||
<div class="toc-title"><i class="far fa-list-alt"></i> 目录</div>
|
||
<div id="toc-content"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="floating-toc-btn" class="hide-on-med-and-down"><a class="btn-floating btn-large bg-color"><i
|
||
class="fas fa-list-ul"></i></a></div>
|
||
<script src="<?php $this->options->themeUrl('static/tocbot/tocbot.min.js'); ?>"></script>
|
||
<script>$(function () {
|
||
tocbot.init({
|
||
tocSelector: '#toc-content',
|
||
contentSelector: '#articleContent',
|
||
headingsOffset: -($(window).height() * 0.4 - 45),
|
||
collapseDepth: Number('0'),
|
||
headingSelector: 'h1, h2, h3, h4, h5'
|
||
});
|
||
|
||
// modify the toc link href to support Chinese.
|
||
let i = 0;
|
||
let tocHeading = 'toc-heading-';
|
||
$('#toc-content a').each(function () {
|
||
$(this).attr('href', '#' + tocHeading + (++i));
|
||
});
|
||
|
||
// modify the heading title id to support Chinese.
|
||
i = 0;
|
||
$('#articleContent').children('h1, h2, h3, h4, h5').each(function () {
|
||
$(this).attr('id', tocHeading + (++i));
|
||
});
|
||
|
||
// Set scroll toc fixed.
|
||
let tocHeight = parseInt($(window).height() * 0.4 - 64);
|
||
let $tocWidget = $('.toc-widget');
|
||
$(window).scroll(function () {
|
||
let scroll = $(window).scrollTop();
|
||
/* add post toc fixed. */
|
||
if (scroll > tocHeight) {
|
||
$tocWidget.addClass('toc-fixed');
|
||
} else {
|
||
$tocWidget.removeClass('toc-fixed');
|
||
}
|
||
});
|
||
|
||
|
||
/* 修复文章卡片 div 的宽度. */
|
||
let fixPostCardWidth = function (srcId, targetId) {
|
||
let srcDiv = $('#' + srcId);
|
||
if (srcDiv.length === 0) {
|
||
return;
|
||
}
|
||
let w = srcDiv.width();
|
||
if (w >= 450) {
|
||
w = w + 21;
|
||
} else if (w >= 350 && w < 450) {
|
||
w = w + 18;
|
||
} else if (w >= 300 && w < 350) {
|
||
w = w + 16;
|
||
} else {
|
||
w = w + 14;
|
||
}
|
||
$('#' + targetId).width(w);
|
||
};
|
||
|
||
// 切换TOC目录展开收缩的相关操作.
|
||
const expandedClass = 'expanded';
|
||
let $tocAside = $('#toc-aside');
|
||
let $mainContent = $('#main-content');
|
||
$('#floating-toc-btn .btn-floating').click(function () {
|
||
if ($tocAside.hasClass(expandedClass)) {
|
||
$tocAside.removeClass(expandedClass).slideUp(500);
|
||
$mainContent.removeClass('l9');
|
||
} else {
|
||
$tocAside.addClass(expandedClass).slideDown(500);
|
||
$mainContent.addClass('l9');
|
||
}
|
||
fixPostCardWidth('artDetail', 'prenext-posts');
|
||
});
|
||
|
||
});</script>
|
||
</main>
|
||
|
||
<?php
|
||
$this->need('base/footer.php');
|
||
?>
|