提交 bffd2b5e 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

style: Format js in pug

上级 57ef4c31
-
var footer = theme.footer
var nowYear = new Date().getFullYear()
var startYear = copyright ? footer.copyright.since || nowYear : nowYear
var endYear = copyright ? footer.copyright.end || nowYear : nowYear
var fa_prefix = theme.fa_prefix || 'fa'
var footer = theme.footer;
var nowYear = new Date().getFullYear();
var startYear = copyright ? footer.copyright.since || nowYear : nowYear;
var endYear = copyright ? footer.copyright.end || nowYear : nowYear;
var fa_prefix = theme.fa_prefix || 'fa';
- var footerCopyright = footer.copyright.enable
- var footerBeian = footer.beian.enable
......
-
var themeCC = theme.creative_commons
var ccLicense = themeCC.license && themeCC.license.toLowerCase()
var ccLanguage = (themeCC.language && themeCC.language.toLowerCase()) || "en"
var ccURL = `https://creativecommons.org/licenses/${ccLicense}/4.0/deed.${ccLanguage}`
var themeCC = theme.creative_commons;
var ccLicense = themeCC.license && themeCC.license.toLowerCase();
var ccLanguage = (themeCC.language && themeCC.language.toLowerCase()) || "en";
var ccURL = `https://creativecommons.org/licenses/${ccLicense}/4.0/deed.${ccLanguage}`;
div.post-copyright
div.post-copyright-author
......
-
var gitalk_js = "https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js"
var gitalk_md5 = "https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js"
var gitalk_js = "https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js";
var gitalk_md5 = "https://cdn.jsdelivr.net/npm/js-md5@latest/src/md5.min.js";
if (theme.cdn.gitalk_js) gitalk_js = theme.cdn.gitalk_js
if (theme.cdn.gitalk_md5) gitalk_md5 = theme.cdn.gitalk_md5
if (theme.cdn.gitalk_js) {
gitalk_js = theme.cdn.gitalk_js;
}
if (theme.cdn.gitalk_md5) {
gitalk_md5 = theme.cdn.gitalk_md5;
}
script(src=gitalk_js)&attributes(dataPjax)
script(src=gitalk_md5)&attributes(dataPjax)
......
-
var leancloud_storage_js = "https://cdn.jsdelivr.net/npm/leancloud-storage@latest/dist/av-min.js"
var valine_js = "https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js"
var leancloud_storage_js = "https://cdn.jsdelivr.net/npm/leancloud-storage@latest/dist/av-min.js";
var valine_js = "https://cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js";
if (theme.cdn.leancloud_storage) leancloud_storage_js = theme.cdn.leancloud_storage
if (theme.cdn.valine) valine_js = theme.cdn.valine
if (theme.cdn.leancloud_storage) {
leancloud_storage_js = theme.cdn.leancloud_storage;
}
if (theme.cdn.valine) {
valine_js = theme.cdn.valine;
}
script(src=leancloud_storage_js)
script(src=valine_js)
......
......@@ -23,12 +23,15 @@
if (theme.pjax.elements) {
pjaxArgs.elements.push(theme.pjax.elements);
}
if (theme.pjax.selectors) {
pjaxArgs.selectors.push(theme.pjax.selectors);
}
if (theme.pjax.selectors) {
pjaxArgs.switches = theme.pjax.selectors;
}
if (theme.pjax.selectors) {
pjaxArgs.switchesOptions = theme.pjax.selectors;
}
......
if theme.quicklink.enable
-
var quicklink_js = "https://cdn.jsdelivr.net/npm/quicklink@1.0.1/dist/quicklink.umd.js"
if (theme.cdn.quicklink) quicklink_js = theme.cdn.quicklink
var loadQuicklink = false
var loadQuicklink = false;
var quicklink_js = "https://cdn.jsdelivr.net/npm/quicklink@1.0.1/dist/quicklink.umd.js";
if (theme.cdn.quicklink) {
quicklink_js = theme.cdn.quicklink;
}
if is_home() && theme.quicklink.home
- loadQuicklink = true
......
-
var instantsearch_js = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js"
if (theme.cdn.instantsearch_js) instantsearch_js = theme.cdn.instantsearch_js
var instantsearch_js = "https://cdn.jsdelivr.net/npm/instantsearch.js@2.1.1/dist/instantsearch.min.js";
if (theme.cdn.instantsearch_js) {
instantsearch_js = theme.cdn.instantsearch_js;
}
script(src=instantsearch_js defer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册