Files
iblog2/views/blog/article.pug
eshengsky f7a9940286 up https
2019-06-20 14:33:20 +08:00

111 lines
6.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
extends ../shared/layout
block content
link(href=`${staticPrefix}/css/animate-custom.css`, rel='stylesheet')
link(href='https://cdn.bootcss.com/highlight.js/9.12.0/styles/github.min.css', rel='stylesheet')
link(href='/nodeModules/lightbox2/dist/css/lightbox.min.css', rel='stylesheet')
link(href=`${staticPrefix}/css/posts_style_custom.css`, rel='stylesheet')
if (post.ContentType === 'markdown')
link(href=`${staticPrefix}/css/github-markdown.css`, rel='stylesheet')
if (settings.CodeTheme === 'Monokai')
link(href=`${staticPrefix}/css/monokai-sublime.css`, rel='stylesheet')
link(href=`${staticPrefix}/css/dark_theme_code.css`, rel='stylesheet')
.detail-container
.container
.row
article.col-sm-12.col-xs-12.detail-wrap.post-content.animated.fadeIn(class=`${settings.ExpandMenu === "true" ? "col-md-9" : "col-md-12"}`)
button.btn.btn-white.btn-menu(title=__("blog.article.table_of_content"))
i.fa.fa-align-justify
.font-controller.hidden-sm.hidden-xs
.btn-font.btn-font-minus(title="缩小字体") A-
.btn-font.btn-font-plus(title="增大字体") A+
.hidden-sm.hidden-xs
.text-muted.pull-left
span(title=__("blog.article.category"))
i.fa.fa-map-signs
=' '
a.black-link(href='/blog/' + post.CategoryAlias,target='_blank')=post.CateName
.text-muted.pull-right
each label in post.LabelList
span.post-label(title=label)=label
=' '
.clearfix
header.text-center.post-title
span.text-muted(title=__("blog.article.post_date"))
i.fa.fa-clock-o
=' ' + post.CreateTimeStr
h1=post.Title
#main-context
blockquote
h2=__("blog.article.brief")
span='' + post.Summary
div(class=`${post.ContentType === 'markdown' ? 'markdown-body' : 'normal-body'}`)
!=resultContent
.copyright(style=`${settings.ShowArticleSign === "true" ? "display: block;" : "display: none;"}`)
.clearfix
include ../shared/artical_footer
if(settings.ShowComments === 'true')
hr.hr-article
#SOHUCS(sid=post.UniqueId)
script.
(function () {
var appid = '#{settings.ChangyanId}';
var conf = '#{settings.ChangyanConf}';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width < 960) {
window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>');
} else {
var loadJs = function (d, a) {
var c = document.getElementsByTagName("head")[0] || document.head || document.documentElement;
var b = document.createElement("script");
b.setAttribute("type", "text/javascript");
b.setAttribute("charset", "UTF-8");
b.setAttribute("src", d);
if (typeof a === "function") {
if (window.attachEvent) {
b.onreadystatechange = function () {
var e = b.readyState;
if (e === "loaded" || e === "complete") {
b.onreadystatechange = null;
a()
}
}
} else {
b.onload = a
}
}
c.appendChild(b)
};
loadJs("https://changyan.sohu.com/upload/changyan.js", function () {
window.changyan.api.config({
appid: appid, conf: conf
})
});
}
})();
#control-wrap.col-md-3.hidden-sm.hidden-xs(style=`${settings.ExpandMenu === "true" ? "display: block;" : "display: none;"}`)
a.close-menu(title=__("blog.article.hide"))
i.fa.fa-times
include ../shared/footer
include ../shared/top
script(type='text/javascript', src='/nodeModules/jquery/dist/jquery.min.js', charset='utf-8')
script(type='text/javascript', src='/nodeModules/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
script(type='text/javascript', src='/nodeModules/lightbox2/dist/js/lightbox.min.js', charset='utf-8')
script(type='text/javascript', src='/nodeModules/scrollnav/dist/jquery.scrollNav.min.js', charset='utf-8')
script(type='text/javascript', src='https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js', charset='utf-8')
script(type='text/javascript', src=`${staticPrefix}/js/article.js`, charset='utf-8')
script(type='text/javascript', src=`${staticPrefix}/js/highlight_line_number.js`, charset='utf-8')
script.
var expandMenu = '#{settings.ExpandMenu}';
var logoPath = "#{settings.LogoPath}";
var contentType = '#{post.ContentType}';
var jiathis_config = {
data_track_clickback: true,
url: window.location.href,
summary: "#{post.Summary}",
title: "#{post.Title}"
};
script(type = 'text/javascript', src = `http://v3.jiathis.com/code/jia.js?uid=${settings.JiaThisId}`, charset = 'utf-8')
script(type='text/javascript', src='/nodeModules/jquery-qrcode/dist/jquery-qrcode.min.js', charset='utf-8')
script(type = 'text/javascript', src = `${staticPrefix}/js/top.js`, charset = 'utf-8')