hexo-theme-volantis 4.2.0 → 5.0.0-alpha.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/_config.yml +651 -234
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +13 -2
- package/languages/zh-TW.yml +7 -0
- package/layout/404.ejs +1 -2
- package/layout/_meta/author.ejs +4 -4
- package/layout/_meta/category.ejs +11 -8
- package/layout/_meta/counter.ejs +51 -2
- package/layout/_meta/date.ejs +1 -1
- package/layout/_meta/music.ejs +1 -1
- package/layout/_meta/share.ejs +1 -1
- package/layout/_meta/tags.ejs +3 -0
- package/layout/_meta/thumbnail.ejs +3 -1
- package/layout/_meta/updated.ejs +1 -1
- package/layout/_meta/{valinecount.ejs → walinecount.ejs} +16 -15
- package/layout/{_cover → _partial/_cover}/blank.ejs +0 -0
- package/layout/{_cover → _partial/_cover}/dock.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/featured.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/focus.ejs +1 -1
- package/layout/_partial/_cover/layout.ejs +8 -0
- package/layout/{_cover → _partial/_cover}/search.ejs +2 -2
- package/layout/_partial/archive.ejs +2 -2
- package/layout/_partial/article.ejs +21 -13
- package/layout/_partial/categories.ejs +1 -1
- package/layout/_partial/cover.ejs +10 -30
- package/layout/_partial/footer.ejs +19 -11
- package/layout/_partial/head.ejs +70 -110
- package/layout/_partial/header.ejs +17 -11
- package/layout/_partial/meta.ejs +18 -4
- package/layout/_partial/post.ejs +35 -9
- package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +126 -0
- package/layout/_partial/scripts/{coverCtrl.ejs → _ctrl/coverCtrl.ejs} +22 -26
- package/layout/_partial/scripts/_ctrl.ejs +2 -0
- package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +88 -0
- package/layout/_partial/scripts/global.ejs +423 -0
- package/layout/_partial/scripts/index.ejs +89 -73
- package/layout/_partial/scripts/toc.ejs +98 -68
- package/layout/_partial/side.ejs +4 -1
- package/layout/_plugins/_page_plugins/artitalk/index.ejs +15 -0
- package/layout/_plugins/_page_plugins/bbtalk/index.ejs +10 -0
- package/layout/_plugins/_page_plugins/fcircle/index.ejs +12 -0
- package/layout/_plugins/_page_plugins/gitter/index.ejs +14 -0
- package/layout/_plugins/_page_plugins/indent/index.ejs +16 -0
- package/layout/_plugins/_page_plugins/index.ejs +27 -0
- package/layout/_plugins/_page_plugins/katex/index.ejs +13 -0
- package/layout/{_third-party/math/mathjax/script.ejs → _plugins/_page_plugins/mathjax/index.ejs} +2 -2
- package/layout/_plugins/_page_plugins/snackbar/index.ejs +55 -0
- package/layout/{_partial/scripts/counter.ejs → _plugins/analytics/LCCounter.ejs} +0 -0
- package/layout/_plugins/analytics/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/aplayer/layout.ejs +0 -0
- package/layout/_plugins/aplayer/script.ejs +74 -0
- package/layout/_plugins/chat/gitter/script.ejs +17 -0
- package/layout/_plugins/chat/index.ejs +1 -0
- package/layout/_plugins/chat/tidio/script.ejs +1 -0
- package/layout/_plugins/comments/artalk/script.ejs +59 -0
- package/layout/_plugins/comments/beaudar/script.ejs +61 -0
- package/layout/_plugins/comments/discuss/script.ejs +30 -0
- package/layout/_plugins/comments/disqus/script.ejs +98 -0
- package/layout/_plugins/comments/disqusjs/script.ejs +35 -0
- package/layout/_plugins/comments/giscus/script.ejs +47 -0
- package/layout/_plugins/comments/gitalk/script.ejs +24 -0
- package/layout/_plugins/comments/hashover/script.ejs +5 -0
- package/layout/{_third-party → _plugins}/comments/index.ejs +10 -3
- package/layout/_plugins/comments/isso/script.ejs +27 -0
- package/layout/_plugins/comments/livere/script.ejs +15 -0
- package/layout/_plugins/comments/twikoo/script.ejs +40 -0
- package/layout/_plugins/comments/utterances/script.ejs +43 -0
- package/layout/_plugins/comments/vssue/script.ejs +37 -0
- package/layout/_plugins/comments/waline/script.ejs +62 -0
- package/layout/_plugins/comments/z-custom/script.ejs +1 -0
- package/layout/_plugins/darkmode/script.ejs +114 -0
- package/layout/_plugins/end-of-support/script.ejs +62 -0
- package/layout/_plugins/github-api/script.ejs +27 -0
- package/layout/_plugins/highlight/highlightjs/script.ejs +26 -0
- package/layout/_plugins/highlight/prismjs/script.ejs +25 -0
- package/layout/_plugins/highlight/script.ejs +1 -0
- package/layout/{_third-party → _plugins}/lazyload/script.ejs +1 -1
- package/layout/_plugins/nodewaves/script.ejs +12 -0
- package/layout/_plugins/parallax/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/pjax/animate.ejs +31 -26
- package/layout/_plugins/pjax/index.ejs +73 -0
- package/layout/_plugins/pjax/pdata.ejs +56 -0
- package/layout/_plugins/preload/script.ejs +14 -0
- package/layout/_plugins/rightmenu/layout.ejs +119 -0
- package/layout/_plugins/rightmenus/layout.ejs +137 -0
- package/layout/_plugins/scrollreveal/script.ejs +25 -0
- package/layout/_plugins/search/script.ejs +50 -0
- package/layout/{_third-party → _plugins}/share/layout.ejs +0 -0
- package/layout/_plugins/swiper/script.ejs +37 -0
- package/layout/_pre.ejs +2 -2
- package/layout/_widget/_pre.ejs +5 -0
- package/layout/_widget/blogger.ejs +1 -1
- package/layout/_widget/category.ejs +2 -2
- package/layout/_widget/copyright.ejs +1 -1
- package/layout/_widget/grid.ejs +3 -3
- package/layout/_widget/lastupdate.ejs +27 -0
- package/layout/_widget/list.ejs +2 -2
- package/layout/_widget/load.ejs +18 -0
- package/layout/_widget/music.ejs +3 -2
- package/layout/_widget/page.ejs +1 -1
- package/layout/_widget/qrcode.ejs +1 -1
- package/layout/_widget/related_posts.ejs +1 -1
- package/layout/_widget/tagcloud.ejs +1 -1
- package/layout/_widget/text.ejs +1 -1
- package/layout/_widget/toc.ejs +6 -2
- package/layout/_widget/webinfo.ejs +13 -76
- package/layout/archive.ejs +4 -4
- package/layout/category.ejs +9 -4
- package/layout/docs.ejs +1 -1
- package/layout/friends.ejs +6 -25
- package/layout/index.ejs +1 -1
- package/layout/layout.ejs +40 -24
- package/layout/list.ejs +1 -1
- package/layout/page.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/tag.ejs +8 -3
- package/package.json +6 -2
- package/scripts/events/index.js +13 -0
- package/scripts/events/lib/check-configuration.js +43 -0
- package/scripts/events/lib/check-environment.js +74 -0
- package/scripts/events/lib/config.js +35 -10
- package/scripts/events/lib/render-stylus.js +78 -0
- package/scripts/events/lib/stellar-tag-utils.js +76 -0
- package/scripts/filters/content-visibility.js +25 -0
- package/scripts/{render → filters}/img.js +1 -1
- package/scripts/filters/replace.js +15 -0
- package/scripts/{z-lazyload/lib/process.js → filters/z-lazyload.js} +18 -15
- package/scripts/helpers/custom-files.js +165 -0
- package/scripts/helpers/first-style.js +19 -0
- package/scripts/helpers/head/autoCanonical.js +15 -0
- package/scripts/helpers/head/generate_preload_fontfamily.js +22 -0
- package/scripts/helpers/head/generate_seo.js +24 -0
- package/scripts/helpers/head/generate_title__keywords__description.js +101 -0
- package/scripts/{related_posts/index.js → helpers/related-posts.js} +9 -9
- package/scripts/helpers/revisioned.js +158 -0
- package/scripts/helpers/structured-data/index.js +2 -0
- package/scripts/helpers/structured-data/lib/blogposting.js +77 -0
- package/scripts/helpers/structured-data/lib/breadcrumblist.js +152 -0
- package/scripts/helpers/structured-data/lib/config.js +31 -0
- package/scripts/helpers/structured-data/lib/index.js +30 -0
- package/scripts/helpers/structured-data/lib/organization.js +15 -0
- package/scripts/helpers/structured-data/lib/person.js +16 -0
- package/scripts/helpers/structured-data/lib/website.js +42 -0
- package/scripts/tags/btn.js +31 -26
- package/scripts/tags/btns.js +18 -13
- package/scripts/tags/checkbox.js +32 -22
- package/scripts/tags/contributors.js +100 -0
- package/scripts/tags/dropmenu.js +50 -35
- package/scripts/tags/fancybox.js +44 -10
- package/scripts/tags/folding.js +14 -9
- package/scripts/tags/frame.js +8 -3
- package/scripts/tags/friends.js +99 -0
- package/scripts/tags/ghcard.js +11 -6
- package/scripts/tags/image.js +18 -6
- package/scripts/tags/link.js +15 -10
- package/scripts/tags/md.js +59 -0
- package/scripts/tags/media.js +32 -8
- package/scripts/tags/note.js +41 -8
- package/scripts/tags/site.js +87 -51
- package/scripts/tags/span.js +16 -6
- package/scripts/tags/swiper.js +38 -0
- package/scripts/tags/table.js +1 -1
- package/scripts/tags/tabs.js +33 -3
- package/scripts/tags/timeline.js +9 -4
- package/source/css/Readme.md +28 -0
- package/source/css/_defines/AutoPrefixCSS.styl +347 -0
- package/source/css/_defines/Readme.md +3 -0
- package/source/css/_defines/color.styl +41 -1
- package/source/css/_defines/effect.styl +0 -13
- package/source/css/_defines/fonts.styl +17 -18
- package/source/css/_defines/func.styl +12 -30
- package/source/css/_first/base_first.styl +118 -0
- package/source/css/_first/{cover.styl → cover_first.styl} +113 -87
- package/source/css/_first/dark_first.styl +76 -0
- package/source/css/_first/fontfamily_first.styl +17 -0
- package/source/css/_first/{navbar.styl → navbar_first.styl} +4 -10
- package/source/css/_first/search_first.styl +12 -0
- package/source/css/{_base/index.styl → _style/_base/base.styl} +9 -93
- package/source/css/_style/_base/fontfamily_async.styl +8 -0
- package/source/css/{_layout → _style/_layout}/archive.styl +0 -0
- package/source/css/{_layout → _style/_layout}/article.styl +3 -30
- package/source/css/{_layout → _style/_layout}/footer.styl +0 -0
- package/source/css/_style/_layout/friends-simpleuser.styl +23 -0
- package/source/css/_style/_layout/friends-traditional.styl +81 -0
- package/source/css/{_layout → _style/_layout}/img.styl +0 -0
- package/source/css/_style/_layout/loading.styl +14 -0
- package/source/css/{_layout → _style/_layout}/main.styl +20 -7
- package/source/css/{_layout → _style/_layout}/md.styl +0 -0
- package/source/css/{_layout → _style/_layout}/pagination.styl +1 -1
- package/source/css/{_layout → _style/_layout}/posts.styl +2 -0
- package/source/css/{_first → _style/_layout}/search.styl +0 -103
- package/source/css/{_layout → _style/_layout}/sidebar.styl +23 -3
- package/source/css/{_layout → _style/_layout}/snackbar.styl +2 -1
- package/source/css/{_layout → _style/_layout}/toc.styl +3 -3
- package/source/css/{_layout → _style/_layout}/video.styl +0 -0
- package/source/css/_style/_plugins/_dark/dark_async.styl +41 -0
- package/source/css/_style/_plugins/_dark/dark_plugins.styl +136 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +36 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/color.styl +96 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/index.styl +102 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/language.styl +63 -0
- package/source/css/_style/_plugins/_highlight/index.styl +1 -0
- package/source/css/_style/_plugins/_highlight/prismjs/clipboard.styl +33 -0
- package/source/css/_style/_plugins/_highlight/prismjs/index.styl +8 -0
- package/source/css/_style/_plugins/_highlight/prismjs/language.styl +63 -0
- package/source/css/_style/_plugins/_rightmenu/reading.styl +56 -0
- package/source/css/{_plugins → _style/_plugins/_rightmenu}/rightmenu.styl +22 -2
- package/source/css/{_plugins → _style/_plugins}/aplayer.styl +11 -0
- package/source/css/{_plugins → _style/_plugins}/cursor.styl +49 -19
- package/source/css/_style/_plugins/fontcolor.styl +84 -0
- package/source/css/{_plugins → _style/_plugins}/gitalk.styl +0 -0
- package/source/css/_style/_plugins/index.styl +24 -0
- package/source/css/{_plugins → _style/_plugins}/mathjax.styl +0 -0
- package/source/css/_style/_plugins/message.styl +14 -0
- package/source/css/{_plugins → _style/_plugins}/pjaxanimate.styl +0 -0
- package/source/css/_style/_tag-plugins/Readme.md +6 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/btns.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/checkbox.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/dropmenu.styl +0 -0
- package/source/css/{_plugins → _style/_tag-plugins}/fancybox.styl +8 -9
- package/source/css/{_tag-plugins → _style/_tag-plugins}/folding.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/frame.styl +0 -0
- package/source/css/_style/_tag-plugins/friends.styl +72 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/ghcard.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/image.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/link.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/media.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/note.styl +0 -0
- package/source/css/_style/_tag-plugins/sites.styl +87 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/span.styl +0 -0
- package/source/css/_style/_tag-plugins/swiper.styl +44 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/table.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/tabs.styl +0 -0
- package/source/css/_style/_tag-plugins/tag.json +35 -0
- package/source/css/_style/_tag-plugins/text.styl +31 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/timeline.styl +0 -0
- package/source/css/_style/index.styl +8 -0
- package/source/css/first.styl +17 -6
- package/source/css/style.styl +9 -7
- package/source/js/app.js +1128 -359
- package/source/js/plugins/aplayer.js +186 -0
- package/source/js/plugins/parallax.js +191 -0
- package/source/js/plugins/rightMenu.js +577 -0
- package/source/js/plugins/rightMenus.js +616 -0
- package/source/js/plugins/tags/contributors.js +92 -0
- package/source/js/plugins/tags/friends.js +93 -0
- package/source/js/plugins/tags/sites.js +96 -0
- package/source/js/search/hexo.js +180 -378
- package/layout/_partial/rightmenu.ejs +0 -204
- package/layout/_partial/scripts/cover.ejs +0 -45
- package/layout/_partial/scripts/darkmode.ejs +0 -96
- package/layout/_partial/scripts/import.ejs +0 -3
- package/layout/_partial/scripts/loadfunction.ejs +0 -72
- package/layout/_partial/scripts/search.ejs +0 -62
- package/layout/_partial/snackbar.ejs +0 -22
- package/layout/_third-party/analytics/script.ejs +0 -24
- package/layout/_third-party/aplayer/script.ejs +0 -24
- package/layout/_third-party/clipboard/script.ejs +0 -53
- package/layout/_third-party/comments/disqus/layout.ejs +0 -5
- package/layout/_third-party/comments/disqus/script.ejs +0 -93
- package/layout/_third-party/comments/gitalk/layout.ejs +0 -1
- package/layout/_third-party/comments/gitalk/script.ejs +0 -29
- package/layout/_third-party/comments/hashover/layout.ejs +0 -2
- package/layout/_third-party/comments/hashover/script.ejs +0 -1
- package/layout/_third-party/comments/isso/layout.ejs +0 -1
- package/layout/_third-party/comments/isso/script.ejs +0 -1
- package/layout/_third-party/comments/livere/layout.ejs +0 -3
- package/layout/_third-party/comments/livere/script.ejs +0 -10
- package/layout/_third-party/comments/minivaline/layout.ejs +0 -3
- package/layout/_third-party/comments/minivaline/script.ejs +0 -29
- package/layout/_third-party/comments/twikoo/layout.ejs +0 -3
- package/layout/_third-party/comments/twikoo/script.ejs +0 -17
- package/layout/_third-party/comments/valine/layout.ejs +0 -3
- package/layout/_third-party/comments/valine/script.ejs +0 -75
- package/layout/_third-party/comments/vssue/layout.ejs +0 -1
- package/layout/_third-party/comments/vssue/script.ejs +0 -22
- package/layout/_third-party/fancybox/script.ejs +0 -50
- package/layout/_third-party/issues/script.ejs +0 -15
- package/layout/_third-party/pjax/index.ejs +0 -143
- package/layout/_third-party/pjax/pdata.ejs +0 -47
- package/layout/_third-party/scrollreveal/script.ejs +0 -15
- package/layout/artitalk.ejs +0 -48
- package/scripts/tags/issues.js +0 -41
- package/scripts/z-lazyload/index.js +0 -4
- package/source/css/_highlight/index.styl +0 -316
- package/source/css/_layout/friends.styl +0 -79
- package/source/css/_plugins/clipboard.styl +0 -37
- package/source/css/_plugins/dark.styl +0 -149
- package/source/css/_plugins/darkmode.styl +0 -9
- package/source/css/_plugins/index.styl +0 -16
- package/source/css/_plugins/valine.styl +0 -173
- package/source/css/_tag-plugins/simpleuser.styl +0 -21
- package/source/css/_tag-plugins/site-card.styl +0 -70
- package/source/js/aplayer.js +0 -161
- package/source/js/issues.js +0 -186
- package/source/js/search/algolia.js +0 -348
- package/source/js/search/azure.js +0 -359
- package/source/js/search/baidu.js +0 -342
- package/source/js/search/google.js +0 -343
- package/source/js/twikoo.js +0 -13
- package/source/js/valine.js +0 -5265
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
const disqus_shortname = '<%= theme.comments.disqus.shortname %>';
|
|
3
|
-
const autoload = '<%= theme.comments.disqus.autoload %>';
|
|
4
|
-
const global_url = '<%= config.url %>'; // must use an absolute URL; relative URLs won’t work.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function checkDisqus() {
|
|
8
|
-
// 正在检查 Disqus 能否访问...
|
|
9
|
-
const runcheck = (domain) => {
|
|
10
|
-
return new Promise((resolve, reject) => {
|
|
11
|
-
const img = new Image;
|
|
12
|
-
const timeout = setTimeout(() => {
|
|
13
|
-
img.onerror = img.onload = null;
|
|
14
|
-
reject();
|
|
15
|
-
}, 3000);
|
|
16
|
-
img.onerror = () => {
|
|
17
|
-
clearTimeout(timeout);
|
|
18
|
-
reject();
|
|
19
|
-
}
|
|
20
|
-
img.onload = () => {
|
|
21
|
-
clearTimeout(timeout);
|
|
22
|
-
resolve();
|
|
23
|
-
}
|
|
24
|
-
img.src = `https://${domain}/favicon.ico?${+(new Date)}=${+(new Date)}`;
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
return Promise.all([
|
|
28
|
-
runcheck('<%= theme.comments.disqus.shortname %>.disqus.com')
|
|
29
|
-
]).then(loadDisqus,showError);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function loadDisqus() {
|
|
33
|
-
|
|
34
|
-
let path = pdata.commentPath;
|
|
35
|
-
if (path.length == 0) {
|
|
36
|
-
let defaultPath = '<%= theme.comments.disqus.path %>';
|
|
37
|
-
path = defaultPath || decodeURI(window.location.pathname);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (window.DISQUS) {
|
|
41
|
-
window.DISQUS.reset({
|
|
42
|
-
reload: true,
|
|
43
|
-
config() {
|
|
44
|
-
this.page.identifier = global_url + path;
|
|
45
|
-
this.page.url = global_url + path;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
window.disqus_config = function () {
|
|
50
|
-
this.page.url = global_url + path;
|
|
51
|
-
this.page.identifier = global_url + path;
|
|
52
|
-
};
|
|
53
|
-
let d = document, s = d.createElement('script');
|
|
54
|
-
s.async = true;
|
|
55
|
-
s.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
|
56
|
-
s.setAttribute('data-timestamp', +new Date());
|
|
57
|
-
(d.head || d.body).appendChild(s);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// 加载错误
|
|
62
|
-
function showError() {
|
|
63
|
-
$('#loading-comments').hide();
|
|
64
|
-
$('#notShowDisqus').show();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 点击了加载
|
|
68
|
-
function needLoadDisqus() {
|
|
69
|
-
checkDisqus();
|
|
70
|
-
$('#load-btns').hide();
|
|
71
|
-
$('#loading-comments').show();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// pjax 重载
|
|
75
|
-
function pjax_disqus() {
|
|
76
|
-
// 排除当前页面不存在评论框的情形
|
|
77
|
-
if ($('#disqus_thread').length == 0) {return}
|
|
78
|
-
// 如果 DISQUS 已被实例化,则可直接加载
|
|
79
|
-
if (window.DISQUS) {
|
|
80
|
-
$('#load-btns').hide();
|
|
81
|
-
$('#notShowDisqus').hide();
|
|
82
|
-
$('#loading-comments').hide();
|
|
83
|
-
loadDisqus();
|
|
84
|
-
} else if (autoload == 'true') {
|
|
85
|
-
// 设置自动加载但是上个页面加载失败了
|
|
86
|
-
needLoadDisqus();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (autoload == 'true') {
|
|
90
|
-
needLoadDisqus();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div id="gitalk-container"></div>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
|
|
2
|
-
<script type="text/javascript">
|
|
3
|
-
function pjax_gitalk() {
|
|
4
|
-
if(!document.querySelectorAll("#gitalk-container")[0])return;
|
|
5
|
-
|
|
6
|
-
let path = pdata.commentPath;
|
|
7
|
-
if (path.length == 0) {
|
|
8
|
-
let defaultPath = '<%= theme.comments.gitalk.path %>';
|
|
9
|
-
path = defaultPath || decodeURI(window.location.pathname);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (document.getElementById('gitalk-container') != null) {
|
|
13
|
-
var gitalk = new Gitalk({
|
|
14
|
-
clientID: "<%- theme.comments.gitalk.clientID %>",
|
|
15
|
-
clientSecret: "<%- theme.comments.gitalk.clientSecret %>",
|
|
16
|
-
repo: "<%- theme.comments.gitalk.repo %>",
|
|
17
|
-
owner: "<%- theme.comments.gitalk.owner %>",
|
|
18
|
-
admin: "<%- theme.comments.gitalk.admin %>",
|
|
19
|
-
id: path,
|
|
20
|
-
distractionFreeMode: false // Facebook-like distraction free mode
|
|
21
|
-
});
|
|
22
|
-
gitalk.render('gitalk-container');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
$(function () {
|
|
27
|
-
pjax_gitalk();
|
|
28
|
-
});
|
|
29
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<script type="text/javascript" src="<%= theme.comments.hashover.src %>"></script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div id="isso-thread"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<script data-isso="<%= theme.comments.isso.url %>" src="<%= theme.comments.isso.src %>"</script>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<script type="text/javascript">
|
|
2
|
-
(function(d, s) {
|
|
3
|
-
var j, e = d.getElementsByTagName(s)[0];
|
|
4
|
-
if (typeof LivereTower === 'function') { return; }
|
|
5
|
-
j = d.createElement(s);
|
|
6
|
-
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
|
7
|
-
j.async = true;
|
|
8
|
-
e.parentNode.insertBefore(j, e);
|
|
9
|
-
})(document, 'script');
|
|
10
|
-
</script>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
function load_minivaline() {
|
|
3
|
-
setTimeout(function() {
|
|
4
|
-
<% if (theme.comments.minivaline.js) { %>
|
|
5
|
-
loadScript('<%- theme.comments.minivaline.js %>', pjax_minivaline)
|
|
6
|
-
<% } else { %>
|
|
7
|
-
loadScript('https://cdn.jsdelivr.net/npm/minivaline@latest/dist/MiniValine.min.js', pjax_minivaline)
|
|
8
|
-
<% } %>
|
|
9
|
-
}, 1);
|
|
10
|
-
};
|
|
11
|
-
function pjax_minivaline() {
|
|
12
|
-
if(!document.querySelectorAll("#minivaline_container")[0])return;
|
|
13
|
-
let pagePlaceholder = pdata.commentPlaceholder || "<%= theme.comments.minivaline.placeholder %>";
|
|
14
|
-
let path = pdata.commentPath;
|
|
15
|
-
if (path.length == 0) {
|
|
16
|
-
let defaultPath = '<%= theme.comments.minivaline.path %>';
|
|
17
|
-
path = defaultPath || decodeURI(window.location.pathname);
|
|
18
|
-
}
|
|
19
|
-
new MiniValine(Object.assign(<%- JSON.stringify(theme.comments.minivaline) %>, {
|
|
20
|
-
el: '#minivaline_container',
|
|
21
|
-
pathname: path,
|
|
22
|
-
placeholder: pagePlaceholder,
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
$(function () {
|
|
26
|
-
if(!document.querySelectorAll("#minivaline_container")[0])return;
|
|
27
|
-
load_minivaline();
|
|
28
|
-
});
|
|
29
|
-
</script>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<% if (theme.comments.twikoo.js) { %>
|
|
2
|
-
<%- js(theme.comments.twikoo.js) %>
|
|
3
|
-
<% } else { %>
|
|
4
|
-
<%- js(['js/twikoo.js']) %>
|
|
5
|
-
<% } %>
|
|
6
|
-
<script>
|
|
7
|
-
function pjax_twikoo() {
|
|
8
|
-
twikoo.init({ envId: '<%= theme.comments.twikoo.envId %>', el: '#twikoo_container' })
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
$(function () {
|
|
12
|
-
pjax_twikoo();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</script>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<% if (theme.comments.valine.js) { %>
|
|
2
|
-
<%- js(theme.comments.valine.js) %>
|
|
3
|
-
<% } else if(theme.use_cdn) { %>
|
|
4
|
-
<%- js(['https://cdn.jsdelivr.net/npm/hexo-theme-volantis@'+theme.info.theme_version+'/source/js/valine.min.js']) %>
|
|
5
|
-
<% } else { %>
|
|
6
|
-
<%- js(['js/valine.js']) %>
|
|
7
|
-
<% } %>
|
|
8
|
-
<script>
|
|
9
|
-
var GUEST_INFO = ['nick', 'mail', 'link'];
|
|
10
|
-
var meta = '<%= theme.comments.valine.meta %>'.split(',').filter(function (item) {
|
|
11
|
-
return GUEST_INFO.indexOf(item) > -1
|
|
12
|
-
});
|
|
13
|
-
var REQUIRED_FIELDS = ['nick', 'mail', 'link'];
|
|
14
|
-
var requiredFields = '<%= theme.comments.valine.requiredFields %>'.split(',').filter(function (item) {
|
|
15
|
-
return REQUIRED_FIELDS.indexOf(item) > -1
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
function emoji(path, idx, ext) {
|
|
19
|
-
return path + "/" + path + "-" + idx + "." + ext;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var emojiMaps = {};
|
|
23
|
-
for (var i = 1; i <= 54; i++) {
|
|
24
|
-
emojiMaps['tieba-' + i] = emoji('tieba', i, 'png');
|
|
25
|
-
}
|
|
26
|
-
for (var i = 1; i <= 101; i++) {
|
|
27
|
-
emojiMaps['qq-' + i] = emoji('qq', i, 'gif');
|
|
28
|
-
}
|
|
29
|
-
for (var i = 1; i <= 116; i++) {
|
|
30
|
-
emojiMaps['aru-' + i] = emoji('aru', i, 'gif');
|
|
31
|
-
}
|
|
32
|
-
for (var i = 1; i <= 125; i++) {
|
|
33
|
-
emojiMaps['twemoji-' + i] = emoji('twemoji', i, 'png');
|
|
34
|
-
}
|
|
35
|
-
for (var i = 1; i <= 4; i++) {
|
|
36
|
-
emojiMaps['weibo-' + i] = emoji('weibo', i, 'png');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function pjax_valine() {
|
|
40
|
-
if(!document.querySelectorAll("#valine_container")[0])return;
|
|
41
|
-
|
|
42
|
-
let pagePlaceholder = pdata.commentPlaceholder || "<%= theme.comments.valine.placeholder %>";
|
|
43
|
-
|
|
44
|
-
let path = pdata.commentPath;
|
|
45
|
-
if (path.length == 0) {
|
|
46
|
-
let defaultPath = '<%= theme.comments.valine.path %>';
|
|
47
|
-
path = defaultPath || decodeURI(window.location.pathname);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var valine = new Valine();
|
|
51
|
-
valine.init({
|
|
52
|
-
el: '#valine_container',
|
|
53
|
-
meta: meta,
|
|
54
|
-
placeholder: pagePlaceholder,
|
|
55
|
-
path: path,
|
|
56
|
-
appId: "<%= theme.comments.valine.appId %>",
|
|
57
|
-
appKey: "<%= theme.comments.valine.appKey %>",
|
|
58
|
-
pageSize: '<%= theme.comments.valine.pageSize %>',
|
|
59
|
-
avatar: '<%= theme.comments.valine.avatar %>',
|
|
60
|
-
lang: '<%= theme.comments.valine.lang %>',
|
|
61
|
-
visitor: '<%= theme.comments.valine.visitor %>',
|
|
62
|
-
highlight: '<%= theme.comments.valine.highlight %>',
|
|
63
|
-
mathJax: '<%= theme.comments.valine.mathJax %>',
|
|
64
|
-
enableQQ: '<%= theme.comments.valine.enableQQ %>',
|
|
65
|
-
recordIP: '<%= theme.comments.valine.recordIP %>',
|
|
66
|
-
requiredFields: requiredFields,
|
|
67
|
-
emojiCDN: 'https://cdn.jsdelivr.net/gh/volantis-x/cdn-emoji/valine/',
|
|
68
|
-
emojiMaps: emojiMaps
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
$(function () {
|
|
73
|
-
pjax_valine();
|
|
74
|
-
});
|
|
75
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<div id="vssue"></div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/gh/vuejs/vue@2.6.11/dist/vue.runtime.min.js"></script>
|
|
2
|
-
<script src="https://cdn.jsdelivr.net/gh/meteorlxy/vssue@1.4.4/packages/vssue/dist/vssue.github.min.js"></script>
|
|
3
|
-
<script>
|
|
4
|
-
loadCSS("https://cdn.jsdelivr.net/gh/meteorlxy/vssue@1.4.4/packages/vssue/dist/vssue.min.css", window.volantis.loadcss);
|
|
5
|
-
new Vue({
|
|
6
|
-
el: '#vssue',
|
|
7
|
-
|
|
8
|
-
render: h => h('Vssue', {
|
|
9
|
-
props: {
|
|
10
|
-
title: "<%- (page.seo_title || page.title) + ' - ' + config.title %>",
|
|
11
|
-
options: {
|
|
12
|
-
owner: '<%- theme.comments.vssue.owner %>',
|
|
13
|
-
repo: '<%- theme.comments.vssue.repo %>',
|
|
14
|
-
clientId: '<%- theme.comments.vssue.clientId %>',
|
|
15
|
-
clientSecret: '<%- theme.comments.vssue.clientSecret %>',
|
|
16
|
-
prefix: '',
|
|
17
|
-
autoCreateIssue: true,
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
</script>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
function pjax_fancybox() {
|
|
3
|
-
$(".md .gallery").find("img").each(function () { //渲染 fancybox
|
|
4
|
-
var element = document.createElement("a"); // a 标签
|
|
5
|
-
$(element).attr("class", "fancybox");
|
|
6
|
-
$(element).attr("pjax-fancybox", ""); // 过滤 pjax
|
|
7
|
-
$(element).attr("href", $(this).attr("src"));
|
|
8
|
-
if ($(this).attr("data-original")) {
|
|
9
|
-
$(element).attr("href", $(this).attr("data-original"));
|
|
10
|
-
}
|
|
11
|
-
$(element).attr("data-fancybox", "images");
|
|
12
|
-
var caption = ""; // 描述信息
|
|
13
|
-
if ($(this).attr('alt')) { // 判断当前页面是否存在描述信息
|
|
14
|
-
$(element).attr('data-caption', $(this).attr('alt'));
|
|
15
|
-
caption = $(this).attr('alt');
|
|
16
|
-
}
|
|
17
|
-
var div = document.createElement("div");
|
|
18
|
-
$(div).addClass("fancybox");
|
|
19
|
-
$(this).wrap(div); // 最外层套 div ,其实主要作用还是 class 样式
|
|
20
|
-
var span = document.createElement("span");
|
|
21
|
-
$(span).addClass("image-caption");
|
|
22
|
-
$(span).text(caption); // 加描述
|
|
23
|
-
$(this).after(span); // 再套一层描述
|
|
24
|
-
$(this).wrap(element); // 最后套 a 标签
|
|
25
|
-
})
|
|
26
|
-
$(".md .gallery").find("img").fancybox({
|
|
27
|
-
selector: '[data-fancybox="images"]',
|
|
28
|
-
hash: false,
|
|
29
|
-
loop: false,
|
|
30
|
-
closeClick: true,
|
|
31
|
-
helpers: {
|
|
32
|
-
overlay: {closeClick: true}
|
|
33
|
-
},
|
|
34
|
-
buttons: [
|
|
35
|
-
"zoom",
|
|
36
|
-
"close"
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
function SCload_fancybox() {
|
|
41
|
-
if ($(".md .gallery").find("img").length == 0) return;
|
|
42
|
-
loadCSS("https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css", document.getElementById("loadcss"));
|
|
43
|
-
setTimeout(function() {
|
|
44
|
-
loadScript('https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js', pjax_fancybox)
|
|
45
|
-
}, 1);
|
|
46
|
-
};
|
|
47
|
-
$(function () {
|
|
48
|
-
SCload_fancybox();
|
|
49
|
-
});
|
|
50
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
function loadIssuesJS() {
|
|
3
|
-
if ($(".md").find(".issues-api").length == 0) return;
|
|
4
|
-
setTimeout(function() {
|
|
5
|
-
<% if(theme.use_cdn) { %>
|
|
6
|
-
loadScript('https://cdn.jsdelivr.net/npm/hexo-theme-volantis@<%- theme.info.theme_version %>/source/js/issues.min.js');
|
|
7
|
-
<% } else { %>
|
|
8
|
-
loadScript('/js/issues.js');
|
|
9
|
-
<% } %>
|
|
10
|
-
}, 1);
|
|
11
|
-
};
|
|
12
|
-
$(function () {
|
|
13
|
-
loadIssuesJS();
|
|
14
|
-
});
|
|
15
|
-
</script>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
var banUrl = theme.plugins.pjax.banUrl || [];
|
|
3
|
-
%>
|
|
4
|
-
|
|
5
|
-
<%- js('https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.min.js') %>
|
|
6
|
-
<% if (theme.plugins.pjax.animation){ %>
|
|
7
|
-
<%- partial('animate') %>
|
|
8
|
-
<% } %>
|
|
9
|
-
<script>
|
|
10
|
-
var pjax;
|
|
11
|
-
document.addEventListener('DOMContentLoaded', function () {
|
|
12
|
-
pjax = new Pjax({
|
|
13
|
-
elements: 'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox])',
|
|
14
|
-
selectors: [
|
|
15
|
-
"title",
|
|
16
|
-
"#l_cover",
|
|
17
|
-
"#pjax-container",
|
|
18
|
-
"#pjax-header-nav-list"
|
|
19
|
-
],
|
|
20
|
-
cacheBust: <%= theme.plugins.pjax.cacheBust %>, // url 地址追加时间戳,用以避免浏览器缓存
|
|
21
|
-
timeout: <%= theme.plugins.pjax.timeout %>
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
document.addEventListener('pjax:send', function (e) {
|
|
26
|
-
//window.stop(); // 相当于点击了浏览器的停止按钮
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
var currentUrl = window.location.pathname;
|
|
30
|
-
var targetUrl = e.triggerElement.href;
|
|
31
|
-
var banUrl = <%- '["' + banUrl.join('", "') + '"]' %>;
|
|
32
|
-
if (banUrl[0] != "") {
|
|
33
|
-
banUrl.forEach(item => {
|
|
34
|
-
if(currentUrl.indexOf(item) != -1 || targetUrl.indexOf(item) != -1) {
|
|
35
|
-
window.location.href = targetUrl;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
} catch (error) {}
|
|
40
|
-
|
|
41
|
-
window.subData = null; // 移除标题(用于一二级导航栏切换处)
|
|
42
|
-
if (typeof $.fancybox != "undefined") {
|
|
43
|
-
$.fancybox.close(); // 关闭弹窗
|
|
44
|
-
}
|
|
45
|
-
volantis.$switcher.removeClass('active'); // 关闭移动端激活的搜索框
|
|
46
|
-
volantis.$header.removeClass('z_search-open'); // 关闭移动端激活的搜索框
|
|
47
|
-
volantis.$wrapper.removeClass('sub'); // 跳转页面时关闭二级导航
|
|
48
|
-
|
|
49
|
-
// 解绑事件 避免重复监听
|
|
50
|
-
volantis.$topBtn.unbind('click');
|
|
51
|
-
$('.menu a').unbind('click');
|
|
52
|
-
$(window).unbind('resize');
|
|
53
|
-
$(window).unbind('scroll');
|
|
54
|
-
$(document).unbind('scroll');
|
|
55
|
-
$(document).unbind('click');
|
|
56
|
-
$('body').unbind('click');
|
|
57
|
-
<% if (theme.plugins.pjax.animation){ %>
|
|
58
|
-
window.ShowLoading();
|
|
59
|
-
<% } %>
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
document.addEventListener('pjax:complete', function () {
|
|
63
|
-
// 关于百度统计对 SPA 页面的处理:
|
|
64
|
-
// 方案一:百度统计>管理>单页应用设置中,打开开启按钮即可对SPA进行统计。 https://tongji.baidu.com/web/help/article?id=324
|
|
65
|
-
// 方案二:取消注释下列代码。 https://tongji.baidu.com/web/help/article?id=235
|
|
66
|
-
<% if (config.baidu_analytics_key) { %>
|
|
67
|
-
_hmt.push(['_trackPageview', document.location.pathname]);
|
|
68
|
-
<% } %>
|
|
69
|
-
|
|
70
|
-
// 关于谷歌统计对 SPA 页面的处理:
|
|
71
|
-
// 当应用以动态方式加载内容并更新地址栏中的网址时,也应该更新通过 gtag.js 存储的网页网址。
|
|
72
|
-
// https://developers.google.cn/analytics/devguides/collection/gtagjs/single-page-applications?hl=zh-cn
|
|
73
|
-
<% if (config.google_analytics_key) { %>
|
|
74
|
-
window.dataLayer = window.dataLayer || [];
|
|
75
|
-
function gtag(){dataLayer.push(arguments);}
|
|
76
|
-
gtag('config', '<%- config.google_analytics_key %>', {'page_path': document.location.pathname});
|
|
77
|
-
<% } %>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
$('.nav-main').find('.list-v').not('.menu-phone').removeAttr("style",""); // 移除小尾巴的移除
|
|
81
|
-
$('.menu-phone.list-v').removeAttr("style",""); // 移除小尾巴的移除
|
|
82
|
-
$('script[data-pjax], .pjax-reload script').each(function () {
|
|
83
|
-
$(this).parent().append($(this).remove());
|
|
84
|
-
});
|
|
85
|
-
try{
|
|
86
|
-
if (typeof $.fancybox == "undefined") {
|
|
87
|
-
SCload_fancybox();
|
|
88
|
-
} else {
|
|
89
|
-
pjax_fancybox();
|
|
90
|
-
}
|
|
91
|
-
<% if (theme.plugins.backstretch.enable && theme.plugins.backstretch.images) { %>
|
|
92
|
-
Pjax_backstretch()
|
|
93
|
-
<% } %>
|
|
94
|
-
<% if (theme.plugins.highlightjs.enable) { %>
|
|
95
|
-
document.querySelectorAll('pre code').forEach((block) => {
|
|
96
|
-
hljs.highlightBlock(block);
|
|
97
|
-
});
|
|
98
|
-
<% } %>
|
|
99
|
-
<% if (theme.plugins.scrollreveal.enable) { %>
|
|
100
|
-
pjax_scrollrebeal();
|
|
101
|
-
<% } %>
|
|
102
|
-
<% if (theme.plugins.issues.enable) { %>
|
|
103
|
-
if (typeof IssuesAPI == "undefined") {
|
|
104
|
-
loadIssuesJS();
|
|
105
|
-
}
|
|
106
|
-
<% } %>
|
|
107
|
-
<% if (theme.plugins.clipboard.enable && (theme.custom_css.body.highlight.copy_btn == true)) { %>
|
|
108
|
-
pjax_initCopyCode();
|
|
109
|
-
<% } %>
|
|
110
|
-
<% if (theme.comments.service == 'valine'){ %>
|
|
111
|
-
pjax_valine();
|
|
112
|
-
<% } %>
|
|
113
|
-
<% if (theme.comments.service == 'minivaline'){ %>
|
|
114
|
-
if (typeof MiniValine == "undefined") {
|
|
115
|
-
load_minivaline();
|
|
116
|
-
} else {
|
|
117
|
-
pjax_minivaline();
|
|
118
|
-
}
|
|
119
|
-
<% } %>
|
|
120
|
-
<% if (theme.comments.service == 'gitalk'){ %>
|
|
121
|
-
pjax_gitalk();
|
|
122
|
-
<% } %>
|
|
123
|
-
<% if (theme.comments.service == 'disqus'){ %>
|
|
124
|
-
pjax_disqus();
|
|
125
|
-
<% } %>
|
|
126
|
-
<% if (theme.comments.service == 'twikoo'){ %>
|
|
127
|
-
pjax_twikoo();
|
|
128
|
-
<% } %>
|
|
129
|
-
} catch (e) {
|
|
130
|
-
console.log(e);
|
|
131
|
-
}
|
|
132
|
-
<% if (theme.plugins.pjax.animation){ %>
|
|
133
|
-
window.HideLoading();
|
|
134
|
-
<% } %>
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
document.addEventListener('pjax:error', function (e) {
|
|
138
|
-
<% if (theme.plugins.pjax.animation){ %>
|
|
139
|
-
window.HideLoading();
|
|
140
|
-
<% } %>
|
|
141
|
-
window.location.href = e.triggerElement.href;
|
|
142
|
-
});
|
|
143
|
-
</script>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<!--此文件用来存放一些不方便取值的变量-->
|
|
2
|
-
<!--思路大概是将值藏到重加载的区域内-->
|
|
3
|
-
<%
|
|
4
|
-
var commentPath = ''; // 自定义的评论路径
|
|
5
|
-
var commentPlaceholder = ''; // 自定义的评论描述
|
|
6
|
-
var ispage = false; // 一二级导航栏切换控制
|
|
7
|
-
var postTitle = ''; // 当前文章标题,用于二级导航栏赋值
|
|
8
|
-
if (theme.comments.service && theme.comments.service.length > 0) {
|
|
9
|
-
let service = theme.comments.service;
|
|
10
|
-
if (page.comments == undefined || page.comments != false) {
|
|
11
|
-
if (service in page) {
|
|
12
|
-
if (page[service].path) {
|
|
13
|
-
commentPath = page[service].path;
|
|
14
|
-
}
|
|
15
|
-
if (page[service].placeholder) {
|
|
16
|
-
commentPlaceholder = page[service].placeholder;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
var enableValine = false;
|
|
22
|
-
if (theme.comments.service == 'valine') {
|
|
23
|
-
enableValine = true;
|
|
24
|
-
}
|
|
25
|
-
var enableMiniValine = false;
|
|
26
|
-
if (theme.comments.service == 'minivaline') {
|
|
27
|
-
enableMiniValine = true;
|
|
28
|
-
}
|
|
29
|
-
if (page && page.layout == 'post' && page.title) {
|
|
30
|
-
ispage = true;
|
|
31
|
-
postTitle = page.title;
|
|
32
|
-
}
|
|
33
|
-
%>
|
|
34
|
-
<script>
|
|
35
|
-
window.pdata={}
|
|
36
|
-
pdata.ispage=<%=ispage%>;
|
|
37
|
-
pdata.postTitle="<%=postTitle%>";
|
|
38
|
-
pdata.commentPath="<%=theme.commentPath%>";
|
|
39
|
-
pdata.commentPlaceholder="<%=commentPlaceholder%>";
|
|
40
|
-
|
|
41
|
-
var l_header=document.getElementById("l_header");
|
|
42
|
-
<% if (theme.pjax_cover.frontMatterCover == "none") {%>
|
|
43
|
-
l_header.classList.add("show");
|
|
44
|
-
<% } else {%>
|
|
45
|
-
l_header.classList.remove("show");
|
|
46
|
-
<% }%>
|
|
47
|
-
</script>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script src="<%- theme.plugins.scrollreveal.js %>"></script>
|
|
2
|
-
<script type="text/javascript">
|
|
3
|
-
function pjax_scrollrebeal() {
|
|
4
|
-
ScrollReveal().reveal('.l_main .reveal', {
|
|
5
|
-
distance: '<%- theme.plugins.scrollreveal.distance %>',
|
|
6
|
-
duration: '<%- theme.plugins.scrollreveal.duration %>',
|
|
7
|
-
interval: '<%- theme.plugins.scrollreveal.interval %>',
|
|
8
|
-
scale: '<%- theme.plugins.scrollreveal.scale %>',
|
|
9
|
-
easing: 'ease-out'
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
$(function () {
|
|
13
|
-
pjax_scrollrebeal();
|
|
14
|
-
});
|
|
15
|
-
</script>
|
package/layout/artitalk.ejs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<%- partial('_pre') %>
|
|
2
|
-
<div class='l_main<%- page.sidebar == false ? ' no_sidebar' : '' %>'>
|
|
3
|
-
<%- partial('_partial/article', {post: page, index: false}) %>
|
|
4
|
-
</div>
|
|
5
|
-
<%- partial('_partial/side') %>
|
|
6
|
-
|
|
7
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/artitalk"></script>
|
|
8
|
-
<script>
|
|
9
|
-
new Artitalk({
|
|
10
|
-
appId: "<%= theme.plugins.artitalk.appId %>",
|
|
11
|
-
appKey: "<%= theme.plugins.artitalk.appKey %>",
|
|
12
|
-
<% if (theme.plugins.artitalk.serverURL) { %>
|
|
13
|
-
serverURL: "<%= theme.plugins.artitalk.serverURL %>",
|
|
14
|
-
<% } %>
|
|
15
|
-
<% if (theme.plugins.artitalk.lang) { %>
|
|
16
|
-
lang: "<%= theme.plugins.artitalk.lang %>",
|
|
17
|
-
<% } %>
|
|
18
|
-
<% if (theme.plugins.artitalk.pageSize) { %>
|
|
19
|
-
pageSize: "<%= theme.plugins.artitalk.pageSize %>",
|
|
20
|
-
<% } %>
|
|
21
|
-
<% if (theme.plugins.artitalk.shuoPla) { %>
|
|
22
|
-
shuoPla: "<%= theme.plugins.artitalk.shuoPla %>",
|
|
23
|
-
<% } %>
|
|
24
|
-
<% if (theme.plugins.artitalk.avatarPla) { %>
|
|
25
|
-
avatarPla: "<%= theme.plugins.artitalk.avatarPla %>",
|
|
26
|
-
<% } %>
|
|
27
|
-
<% if (theme.plugins.artitalk.motion == 0) { %>
|
|
28
|
-
motion: 0,
|
|
29
|
-
<% } else { %>
|
|
30
|
-
motion: 1,
|
|
31
|
-
<% } %>
|
|
32
|
-
<% if (theme.plugins.artitalk.bgImg) { %>
|
|
33
|
-
bgImg: "<%= theme.plugins.artitalk.bgImg %>",
|
|
34
|
-
<% } %>
|
|
35
|
-
<% if (theme.plugins.artitalk.color1) { %>
|
|
36
|
-
color1: "<%= theme.plugins.artitalk.color1 %>",
|
|
37
|
-
<% } %>
|
|
38
|
-
<% if (theme.plugins.artitalk.color2) { %>
|
|
39
|
-
color2: "<%= theme.plugins.artitalk.color2 %>",
|
|
40
|
-
<% } %>
|
|
41
|
-
<% if (theme.plugins.artitalk.color3) { %>
|
|
42
|
-
color3: "<%= theme.plugins.artitalk.color3 %>",
|
|
43
|
-
<% } %>
|
|
44
|
-
<% if (theme.plugins.artitalk.cssUrl) { %>
|
|
45
|
-
cssUrl: "<%= theme.plugins.artitalk.cssUrl %>",
|
|
46
|
-
<% } %>
|
|
47
|
-
})
|
|
48
|
-
</script>
|