hexo-theme-lnote 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +36 -123
- package/_config.yml +19 -19
- package/config/links.yml +63 -63
- package/config/svg.yml +33 -33
- package/index.d.ts +3 -3
- package/languages/de.yml +69 -69
- package/languages/en.yml +73 -73
- package/languages/eo.yml +69 -69
- package/languages/es.yml +69 -69
- package/languages/ja.yml +69 -69
- package/languages/ru.yml +69 -69
- package/languages/zh-CN.yml +73 -73
- package/languages/zh-HK.yml +73 -73
- package/languages/zh-TW.yml +73 -73
- package/layout/404.ejs +8 -8
- package/layout/_partials/archive-list.ejs +17 -17
- package/layout/_partials/category-chains.ejs +19 -19
- package/layout/_partials/category-list.ejs +62 -62
- package/layout/_partials/comments/changyan.ejs +11 -11
- package/layout/_partials/comments/cusdis.ejs +25 -25
- package/layout/_partials/comments/discuss.ejs +17 -17
- package/layout/_partials/comments/disqus.ejs +32 -32
- package/layout/_partials/comments/giscus.ejs +36 -36
- package/layout/_partials/comments/gitalk.ejs +19 -19
- package/layout/_partials/comments/livere.ejs +10 -10
- package/layout/_partials/comments/remark42.ejs +29 -29
- package/layout/_partials/comments/twikoo.ejs +25 -25
- package/layout/_partials/comments/utterances.ejs +27 -27
- package/layout/_partials/comments/valine.ejs +23 -23
- package/layout/_partials/comments/waline.ejs +24 -24
- package/layout/_partials/comments.ejs +8 -8
- package/layout/_partials/css.ejs +9 -9
- package/layout/_partials/footer/beian.ejs +33 -33
- package/layout/_partials/footer/statistics.ejs +39 -39
- package/layout/_partials/footer.ejs +7 -7
- package/layout/_partials/head.ejs +46 -46
- package/layout/_partials/header/banner.ejs +24 -24
- package/layout/_partials/header/navigation.ejs +56 -56
- package/layout/_partials/header.ejs +4 -4
- package/layout/_partials/markdown-plugins.ejs +24 -24
- package/layout/_partials/paginator.ejs +14 -14
- package/layout/_partials/plugins/CSR.ejs +4 -4
- package/layout/_partials/plugins/analytics.ejs +75 -75
- package/layout/_partials/plugins/anchorjs.ejs +39 -39
- package/layout/_partials/plugins/code-widget.ejs +7 -7
- package/layout/_partials/plugins/encrypt.ejs +18 -18
- package/layout/_partials/plugins/fancybox.ejs +11 -11
- package/layout/_partials/plugins/highlight.ejs +13 -13
- package/layout/_partials/plugins/math.ejs +51 -51
- package/layout/_partials/plugins/mermaid.ejs +4 -4
- package/layout/_partials/plugins/nprogress.ejs +7 -7
- package/layout/_partials/plugins/typed.ejs +20 -20
- package/layout/_partials/post/category-bar.ejs +18 -18
- package/layout/_partials/post/copyright.ejs +50 -50
- package/layout/_partials/post/css.ejs +3 -3
- package/layout/_partials/post/meta-bottom.ejs +16 -16
- package/layout/_partials/post/meta-top.ejs +27 -27
- package/layout/_partials/post/scripts.ejs +8 -8
- package/layout/_partials/post/sidebar-left.ejs +1 -1
- package/layout/_partials/post/sidebar-right.ejs +2 -2
- package/layout/_partials/post/toc.ejs +6 -6
- package/layout/_partials/scripts.ejs +10 -10
- package/layout/_partials/search.ejs +19 -19
- package/layout/about.ejs +22 -22
- package/layout/archive.ejs +10 -10
- package/layout/categories.ejs +20 -20
- package/layout/category.ejs +12 -12
- package/layout/index.ejs +61 -61
- package/layout/layout.ejs +60 -60
- package/layout/links.ejs +31 -31
- package/layout/page.ejs +15 -15
- package/layout/post.ejs +77 -77
- package/layout/tag.ejs +12 -12
- package/layout/tags.ejs +26 -26
- package/package.json +73 -74
- package/scripts/index.js +1 -1
- package/source/css/_functions/base.styl +8 -8
- package/source/css/_mixins/base.styl +23 -23
- package/source/css/_pages/_about/about.styl +32 -32
- package/source/css/_pages/_archive/archive.styl +32 -32
- package/source/css/_pages/_base/_widget/anchorjs.styl +8 -8
- package/source/css/_pages/_base/_widget/banner.styl +29 -29
- package/source/css/_pages/_base/_widget/board.styl +11 -11
- package/source/css/_pages/_base/_widget/code-widget.styl +36 -36
- package/source/css/_pages/_base/_widget/copyright.styl +90 -90
- package/source/css/_pages/_base/_widget/footer.styl +65 -65
- package/source/css/_pages/_base/_widget/footnote.styl +25 -25
- package/source/css/_pages/_base/_widget/header.styl +173 -173
- package/source/css/_pages/_base/_widget/modal.styl +100 -100
- package/source/css/_pages/_base/_widget/navlink.styl +15 -15
- package/source/css/_pages/_base/_widget/ngrogress.styl +12 -12
- package/source/css/_pages/_base/_widget/noscript.styl +12 -12
- package/source/css/_pages/_base/_widget/pagination.styl +23 -23
- package/source/css/_pages/_base/_widget/qrcode.styl +17 -17
- package/source/css/_pages/_base/_widget/scroll-btn.styl +48 -48
- package/source/css/_pages/_base/_widget/text.styl +19 -19
- package/source/css/_pages/_base/_widget/toc.styl +75 -75
- package/source/css/_pages/_base/base.styl +67 -67
- package/source/css/_pages/_base/color-schema.styl +79 -79
- package/source/css/_pages/_base/inline.styl +51 -51
- package/source/css/_pages/_base/keyframes.styl +31 -31
- package/source/css/_pages/_base/print.styl +38 -38
- package/source/css/_pages/_category/category-bar.styl +58 -58
- package/source/css/_pages/_category/category-chain.styl +6 -6
- package/source/css/_pages/_category/category-list.styl +62 -62
- package/source/css/_pages/_index/index.styl +75 -75
- package/source/css/_pages/_links/links.styl +79 -79
- package/source/css/_pages/_post/comment.styl +27 -27
- package/source/css/_pages/_post/highlight.styl +76 -76
- package/source/css/_pages/_post/markdown.styl +96 -96
- package/source/css/_pages/_post/post-page.styl +179 -179
- package/source/css/_pages/_post/post-plugin.styl +9 -9
- package/source/css/_pages/_post/post-tag.styl +74 -74
- package/source/css/_pages/_tag/tags.styl +9 -9
- package/source/css/_pages/pages.styl +8 -8
- package/source/css/_variables/base.styl +72 -72
- package/source/css/gitalk.css +546 -546
- package/source/css/main.styl +19 -19
- package/source/js/color-schema.js +279 -279
- package/source/js/events.js +72 -72
- package/source/js/img-lazyload.js +10 -10
- package/source/js/local-search.js +70 -70
- package/source/js/post/copying-code.js +34 -34
- package/source/js/post/enable.js +6 -6
- package/source/js/post/img-swipe-bf.js +47 -47
- package/source/js/post/img-swipe.js +83 -83
- package/source/js/post/mermaiding.js +9 -9
- package/source/js/post/play-imgs.js +58 -58
- package/source/js/post/toc.js +24 -24
- package/source/js/post/view-imgs.js +27 -27
- package/source/js/utils.js +245 -245
- package/source/xml/local-search.xml +45 -45
- package/templates/Chat.vue +52 -52
- package/templates/GroupImage.vue +36 -36
- package/templates/MenuNav.vue +39 -39
- package/templates/Note.vue +33 -33
- package/templates/Noun.vue +25 -25
- package/templates/NounContent.vue +29 -29
- package/templates/Tab.vue +40 -40
- package/templates/footer.ejs +12 -12
- package/templates/utils/uri.ts +39 -39
@@ -1,14 +1,14 @@
|
|
1
|
-
<% if (page.total > 1){ %>
|
2
|
-
<nav aria-label="navigation">
|
3
|
-
<span class="pagination" id="pagination">
|
4
|
-
<%- paginator({
|
5
|
-
prev_text: '<i class="iconfont icon-arrowleft"></i>',
|
6
|
-
next_text: '<i class="iconfont icon-arrowright"></i>',
|
7
|
-
mid_size: 2,
|
8
|
-
end_size: 1,
|
9
|
-
format: `${config.pagination_dir}/%d`,
|
10
|
-
escape: false
|
11
|
-
}) %>
|
12
|
-
</span>
|
13
|
-
</nav>
|
14
|
-
<% } %>
|
1
|
+
<% if (page.total > 1){ %>
|
2
|
+
<nav aria-label="navigation">
|
3
|
+
<span class="pagination" id="pagination">
|
4
|
+
<%- paginator({
|
5
|
+
prev_text: '<i class="iconfont icon-arrowleft"></i>',
|
6
|
+
next_text: '<i class="iconfont icon-arrowright"></i>',
|
7
|
+
mid_size: 2,
|
8
|
+
end_size: 1,
|
9
|
+
format: `${config.pagination_dir}/%d`,
|
10
|
+
escape: false
|
11
|
+
}) %>
|
12
|
+
</span>
|
13
|
+
</nav>
|
14
|
+
<% } %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if (page.CSR) { %>
|
2
|
-
<%- post_csr(page) %>
|
3
|
-
<% } %>
|
4
|
-
|
1
|
+
<% if (page.CSR) { %>
|
2
|
+
<%- post_csr(page) %>
|
3
|
+
<% } %>
|
4
|
+
|
@@ -1,75 +1,75 @@
|
|
1
|
-
<% if (theme.web_analytics.enable) { %>
|
2
|
-
|
3
|
-
<% if(theme.web_analytics.baidu) { %>
|
4
|
-
<!-- Baidu Analytics -->
|
5
|
-
<script async>
|
6
|
-
if (!LNote.ctx.dnt) {
|
7
|
-
var _hmt = _hmt || [];
|
8
|
-
(function() {
|
9
|
-
var hm = document.createElement("script");
|
10
|
-
hm.src = "https://hm.baidu.com/hm.js?<%= theme.web_analytics.baidu %>";
|
11
|
-
var s = document.getElementsByTagName("script")[0];
|
12
|
-
s.parentNode.insertBefore(hm, s);
|
13
|
-
})();
|
14
|
-
}
|
15
|
-
</script>
|
16
|
-
<% } %>
|
17
|
-
|
18
|
-
<% if (theme.web_analytics.google){ %>
|
19
|
-
<!-- Google tag (gtag.js) -->
|
20
|
-
<script async>
|
21
|
-
if (!LNote.ctx.dnt) {
|
22
|
-
LNote.utils.createScript("https://www.googletagmanager.com/gtag/js?id=<%= theme.web_analytics.google.measurement_id %>", function() {
|
23
|
-
window.dataLayer = window.dataLayer || [];
|
24
|
-
function gtag() {
|
25
|
-
dataLayer.push(arguments);
|
26
|
-
}
|
27
|
-
gtag('js', new Date());
|
28
|
-
gtag('config', '<%- theme.web_analytics.google.measurement_id %>');
|
29
|
-
});
|
30
|
-
}
|
31
|
-
</script>
|
32
|
-
<% } %>
|
33
|
-
|
34
|
-
<% if(theme.web_analytics.tencent && theme.web_analytics.tencent.sid && theme.web_analytics.tencent.cid) { %>
|
35
|
-
<!-- Tencent Analytics -->
|
36
|
-
<script async>
|
37
|
-
if (!LNote.ctx.dnt) {
|
38
|
-
var _mtac = {};
|
39
|
-
(function() {
|
40
|
-
var mta = document.createElement("script");
|
41
|
-
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
|
42
|
-
mta.setAttribute("name", "MTAH5");
|
43
|
-
mta.setAttribute("sid", "<%= theme.web_analytics.tencent.sid %>");
|
44
|
-
<% if(theme.web_analytics.tencent.cid) { %>
|
45
|
-
mta.setAttribute("cid", "<%= theme.web_analytics.tencent.cid %>");
|
46
|
-
<% } %>
|
47
|
-
var s = document.getElementsByTagName("script")[0];
|
48
|
-
s.parentNode.insertBefore(mta, s);
|
49
|
-
})();
|
50
|
-
}
|
51
|
-
</script>
|
52
|
-
<% } %>
|
53
|
-
|
54
|
-
<% if(theme.web_analytics.woyaola) { %>
|
55
|
-
<!-- 51.la Analytics -->
|
56
|
-
<script async>
|
57
|
-
if (!LNote.ctx.dnt) {
|
58
|
-
LNote.utils.createScript('//js.users.51.la/<%= theme.web_analytics.woyaola %>.js');
|
59
|
-
}
|
60
|
-
</script>
|
61
|
-
<% } %>
|
62
|
-
|
63
|
-
<% if(theme.web_analytics.cnzz) { %>
|
64
|
-
<!-- cnzz Analytics -->
|
65
|
-
<script async>
|
66
|
-
if (!LNote.ctx.dnt) {
|
67
|
-
LNote.utils.createScript('//s4.cnzz.com/z_stat.php?id=<%= theme.web_analytics.cnzz %>&show=pic');
|
68
|
-
}
|
69
|
-
</script>
|
70
|
-
<% } %>
|
71
|
-
|
72
|
-
<% if(theme.web_analytics.leancloud && theme.web_analytics.leancloud.app_id && theme.web_analytics.leancloud.app_key) { %>
|
73
|
-
<% import_js(theme.static_prefix.internal_js, 'leancloud.js', 'defer') %>
|
74
|
-
<% } %>
|
75
|
-
<% } %>
|
1
|
+
<% if (theme.web_analytics.enable) { %>
|
2
|
+
|
3
|
+
<% if(theme.web_analytics.baidu) { %>
|
4
|
+
<!-- Baidu Analytics -->
|
5
|
+
<script async>
|
6
|
+
if (!LNote.ctx.dnt) {
|
7
|
+
var _hmt = _hmt || [];
|
8
|
+
(function() {
|
9
|
+
var hm = document.createElement("script");
|
10
|
+
hm.src = "https://hm.baidu.com/hm.js?<%= theme.web_analytics.baidu %>";
|
11
|
+
var s = document.getElementsByTagName("script")[0];
|
12
|
+
s.parentNode.insertBefore(hm, s);
|
13
|
+
})();
|
14
|
+
}
|
15
|
+
</script>
|
16
|
+
<% } %>
|
17
|
+
|
18
|
+
<% if (theme.web_analytics.google){ %>
|
19
|
+
<!-- Google tag (gtag.js) -->
|
20
|
+
<script async>
|
21
|
+
if (!LNote.ctx.dnt) {
|
22
|
+
LNote.utils.createScript("https://www.googletagmanager.com/gtag/js?id=<%= theme.web_analytics.google.measurement_id %>", function() {
|
23
|
+
window.dataLayer = window.dataLayer || [];
|
24
|
+
function gtag() {
|
25
|
+
dataLayer.push(arguments);
|
26
|
+
}
|
27
|
+
gtag('js', new Date());
|
28
|
+
gtag('config', '<%- theme.web_analytics.google.measurement_id %>');
|
29
|
+
});
|
30
|
+
}
|
31
|
+
</script>
|
32
|
+
<% } %>
|
33
|
+
|
34
|
+
<% if(theme.web_analytics.tencent && theme.web_analytics.tencent.sid && theme.web_analytics.tencent.cid) { %>
|
35
|
+
<!-- Tencent Analytics -->
|
36
|
+
<script async>
|
37
|
+
if (!LNote.ctx.dnt) {
|
38
|
+
var _mtac = {};
|
39
|
+
(function() {
|
40
|
+
var mta = document.createElement("script");
|
41
|
+
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
|
42
|
+
mta.setAttribute("name", "MTAH5");
|
43
|
+
mta.setAttribute("sid", "<%= theme.web_analytics.tencent.sid %>");
|
44
|
+
<% if(theme.web_analytics.tencent.cid) { %>
|
45
|
+
mta.setAttribute("cid", "<%= theme.web_analytics.tencent.cid %>");
|
46
|
+
<% } %>
|
47
|
+
var s = document.getElementsByTagName("script")[0];
|
48
|
+
s.parentNode.insertBefore(mta, s);
|
49
|
+
})();
|
50
|
+
}
|
51
|
+
</script>
|
52
|
+
<% } %>
|
53
|
+
|
54
|
+
<% if(theme.web_analytics.woyaola) { %>
|
55
|
+
<!-- 51.la Analytics -->
|
56
|
+
<script async>
|
57
|
+
if (!LNote.ctx.dnt) {
|
58
|
+
LNote.utils.createScript('//js.users.51.la/<%= theme.web_analytics.woyaola %>.js');
|
59
|
+
}
|
60
|
+
</script>
|
61
|
+
<% } %>
|
62
|
+
|
63
|
+
<% if(theme.web_analytics.cnzz) { %>
|
64
|
+
<!-- cnzz Analytics -->
|
65
|
+
<script async>
|
66
|
+
if (!LNote.ctx.dnt) {
|
67
|
+
LNote.utils.createScript('//s4.cnzz.com/z_stat.php?id=<%= theme.web_analytics.cnzz %>&show=pic');
|
68
|
+
}
|
69
|
+
</script>
|
70
|
+
<% } %>
|
71
|
+
|
72
|
+
<% if(theme.web_analytics.leancloud && theme.web_analytics.leancloud.app_id && theme.web_analytics.leancloud.app_key) { %>
|
73
|
+
<% import_js(theme.static_prefix.internal_js, 'leancloud.js', 'defer') %>
|
74
|
+
<% } %>
|
75
|
+
<% } %>
|
@@ -1,39 +1,39 @@
|
|
1
|
-
<%
|
2
|
-
import_script(`
|
3
|
-
<script>
|
4
|
-
LNote.utils.createScript('${ url_join(theme.static_prefix.anchor, 'anchor.min.js') }', function() {
|
5
|
-
window.anchors.options = {
|
6
|
-
placement: CONFIG.anchorjs.placement,
|
7
|
-
visible : CONFIG.anchorjs.visible
|
8
|
-
};
|
9
|
-
if (CONFIG.anchorjs.icon) {
|
10
|
-
window.anchors.options.icon = CONFIG.anchorjs.icon;
|
11
|
-
}
|
12
|
-
var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
|
13
|
-
var res = [];
|
14
|
-
for (var item of el) {
|
15
|
-
res.push('.markdown-body > ' + item.trim());
|
16
|
-
}
|
17
|
-
if (CONFIG.anchorjs.placement === 'left') {
|
18
|
-
window.anchors.options.class = 'anchorjs-link-left';
|
19
|
-
}
|
20
|
-
window.anchors.add(res.join(', '));
|
21
|
-
|
22
|
-
LNote.events.registerRefreshCallback(function() {
|
23
|
-
if ('anchors' in window) {
|
24
|
-
anchors.removeAll();
|
25
|
-
var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
|
26
|
-
var res = [];
|
27
|
-
for (var item of el) {
|
28
|
-
res.push('.markdown-body > ' + item.trim());
|
29
|
-
}
|
30
|
-
if (CONFIG.anchorjs.placement === 'left') {
|
31
|
-
anchors.options.class = 'anchorjs-link-left';
|
32
|
-
}
|
33
|
-
anchors.add(res.join(', '));
|
34
|
-
}
|
35
|
-
});
|
36
|
-
});
|
37
|
-
</script>
|
38
|
-
`)
|
39
|
-
%>
|
1
|
+
<%
|
2
|
+
import_script(`
|
3
|
+
<script>
|
4
|
+
LNote.utils.createScript('${ url_join(theme.static_prefix.anchor, 'anchor.min.js') }', function() {
|
5
|
+
window.anchors.options = {
|
6
|
+
placement: CONFIG.anchorjs.placement,
|
7
|
+
visible : CONFIG.anchorjs.visible
|
8
|
+
};
|
9
|
+
if (CONFIG.anchorjs.icon) {
|
10
|
+
window.anchors.options.icon = CONFIG.anchorjs.icon;
|
11
|
+
}
|
12
|
+
var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
|
13
|
+
var res = [];
|
14
|
+
for (var item of el) {
|
15
|
+
res.push('.markdown-body > ' + item.trim());
|
16
|
+
}
|
17
|
+
if (CONFIG.anchorjs.placement === 'left') {
|
18
|
+
window.anchors.options.class = 'anchorjs-link-left';
|
19
|
+
}
|
20
|
+
window.anchors.add(res.join(', '));
|
21
|
+
|
22
|
+
LNote.events.registerRefreshCallback(function() {
|
23
|
+
if ('anchors' in window) {
|
24
|
+
anchors.removeAll();
|
25
|
+
var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
|
26
|
+
var res = [];
|
27
|
+
for (var item of el) {
|
28
|
+
res.push('.markdown-body > ' + item.trim());
|
29
|
+
}
|
30
|
+
if (CONFIG.anchorjs.placement === 'left') {
|
31
|
+
anchors.options.class = 'anchorjs-link-left';
|
32
|
+
}
|
33
|
+
anchors.add(res.join(', '));
|
34
|
+
}
|
35
|
+
});
|
36
|
+
});
|
37
|
+
</script>
|
38
|
+
`)
|
39
|
+
%>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%
|
2
|
-
if (theme.code.copy_btn) {
|
3
|
-
import_script(`<script src=${url_join(theme.static_prefix.clipboard, 'clipboard.min.js')}></script>`)
|
4
|
-
}
|
5
|
-
import_script(`<script>LNote.plugins.codeWidget();</script>
|
6
|
-
`)
|
7
|
-
%>
|
1
|
+
<%
|
2
|
+
if (theme.code.copy_btn) {
|
3
|
+
import_script(`<script src=${url_join(theme.static_prefix.clipboard, 'clipboard.min.js')}></script>`)
|
4
|
+
}
|
5
|
+
import_script(`<script>LNote.plugins.codeWidget();</script>
|
6
|
+
`)
|
7
|
+
%>
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<%
|
2
|
-
import_script(`
|
3
|
-
<script defer>
|
4
|
-
if (document.getElementById('hbePass') || document.querySelector('hbe-prefix')) {
|
5
|
-
LNote.utils.waitElementLoaded('hbe-prefix', function() {
|
6
|
-
var hbePrefix = document.querySelector('hbe-prefix');
|
7
|
-
hbePrefix.parentElement.classList.add('markdown-body');
|
8
|
-
LNote.utils.retry(function() {
|
9
|
-
if (LNote.boot && LNote.boot.refresh) {
|
10
|
-
LNote.boot.refresh();
|
11
|
-
return true;
|
12
|
-
}
|
13
|
-
}, 100, 10);
|
14
|
-
})
|
15
|
-
}
|
16
|
-
</script>
|
17
|
-
`)
|
18
|
-
%>
|
1
|
+
<%
|
2
|
+
import_script(`
|
3
|
+
<script defer>
|
4
|
+
if (document.getElementById('hbePass') || document.querySelector('hbe-prefix')) {
|
5
|
+
LNote.utils.waitElementLoaded('hbe-prefix', function() {
|
6
|
+
var hbePrefix = document.querySelector('hbe-prefix');
|
7
|
+
hbePrefix.parentElement.classList.add('markdown-body');
|
8
|
+
LNote.utils.retry(function() {
|
9
|
+
if (LNote.boot && LNote.boot.refresh) {
|
10
|
+
LNote.boot.refresh();
|
11
|
+
return true;
|
12
|
+
}
|
13
|
+
}, 100, 10);
|
14
|
+
})
|
15
|
+
}
|
16
|
+
</script>
|
17
|
+
`)
|
18
|
+
%>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%
|
2
|
-
import_css(theme.static_prefix.fancybox, 'jquery.fancybox.min.css')
|
3
|
-
|
4
|
-
import_script(`
|
5
|
-
<script>
|
6
|
-
LNote.utils.createScript('${url_join(theme.static_prefix.fancybox, 'jquery.fancybox.min.js')}', function() {
|
7
|
-
LNote.plugins.fancyBox();
|
8
|
-
});
|
9
|
-
</script>
|
10
|
-
`)
|
11
|
-
%>
|
1
|
+
<%
|
2
|
+
import_css(theme.static_prefix.fancybox, 'jquery.fancybox.min.css')
|
3
|
+
|
4
|
+
import_script(`
|
5
|
+
<script>
|
6
|
+
LNote.utils.createScript('${url_join(theme.static_prefix.fancybox, 'jquery.fancybox.min.js')}', function() {
|
7
|
+
LNote.plugins.fancyBox();
|
8
|
+
});
|
9
|
+
</script>
|
10
|
+
`)
|
11
|
+
%>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<%
|
2
|
-
if (theme.code.highlight.lib === 'prismjs') {
|
3
|
-
if (!theme.code.highlight.prismjs.preprocess) {
|
4
|
-
import_js(theme.static_prefix.prismjs, 'components/prism-core.min.js')
|
5
|
-
import_js(theme.static_prefix.prismjs, 'plugins/autoloader/prism-autoloader.min.js')
|
6
|
-
}
|
7
|
-
|
8
|
-
if (theme.code.highlight.line_number) {
|
9
|
-
import_css(theme.static_prefix.prismjs, '/plugins/line-numbers/prism-line-numbers.min.css')
|
10
|
-
import_js(theme.static_prefix.prismjs, '/plugins/line-numbers/prism-line-numbers.min.js')
|
11
|
-
}
|
12
|
-
}
|
13
|
-
%>
|
1
|
+
<%
|
2
|
+
if (theme.code.highlight.lib === 'prismjs') {
|
3
|
+
if (!theme.code.highlight.prismjs.preprocess) {
|
4
|
+
import_js(theme.static_prefix.prismjs, 'components/prism-core.min.js')
|
5
|
+
import_js(theme.static_prefix.prismjs, 'plugins/autoloader/prism-autoloader.min.js')
|
6
|
+
}
|
7
|
+
|
8
|
+
if (theme.code.highlight.line_number) {
|
9
|
+
import_css(theme.static_prefix.prismjs, '/plugins/line-numbers/prism-line-numbers.min.css')
|
10
|
+
import_js(theme.static_prefix.prismjs, '/plugins/line-numbers/prism-line-numbers.min.js')
|
11
|
+
}
|
12
|
+
}
|
13
|
+
%>
|
@@ -1,51 +1,51 @@
|
|
1
|
-
<% if(theme.post.math.engine === 'mathjax') { %>
|
2
|
-
<%
|
3
|
-
var lazy = theme.lazyload.enable && require_version(theme.static_prefix.mathjax, '3.2.0')
|
4
|
-
|
5
|
-
import_script(`
|
6
|
-
<script>
|
7
|
-
if (!window.MathJax) {
|
8
|
-
window.MathJax = {
|
9
|
-
tex : {
|
10
|
-
inlineMath: { '[+]': [['$', '$']] }
|
11
|
-
},
|
12
|
-
loader : {
|
13
|
-
${ lazy ? 'load: \[\'ui/lazy\'\]' : '' }
|
14
|
-
},
|
15
|
-
options: {
|
16
|
-
renderActions: {
|
17
|
-
insertedScript: [200, () => {
|
18
|
-
document.querySelectorAll('mjx-container').forEach(node => {
|
19
|
-
let target = node.parentNode;
|
20
|
-
if (target.nodeName.toLowerCase() === 'li') {
|
21
|
-
target.parentNode.classList.add('has-jax');
|
22
|
-
}
|
23
|
-
});
|
24
|
-
}, '', false]
|
25
|
-
}
|
26
|
-
}
|
27
|
-
};
|
28
|
-
} else {
|
29
|
-
MathJax.startup.document.state(0);
|
30
|
-
MathJax.texReset();
|
31
|
-
MathJax.typeset();
|
32
|
-
MathJax.typesetPromise();
|
33
|
-
}
|
34
|
-
|
35
|
-
LNote.events.registerRefreshCallback(function() {
|
36
|
-
if ('MathJax' in window && MathJax.startup.document && typeof MathJax.startup.document.state === 'function') {
|
37
|
-
MathJax.startup.document.state(0);
|
38
|
-
MathJax.texReset();
|
39
|
-
MathJax.typeset();
|
40
|
-
MathJax.typesetPromise();
|
41
|
-
}
|
42
|
-
});
|
43
|
-
</script>
|
44
|
-
`)
|
45
|
-
|
46
|
-
import_js(theme.static_prefix.mathjax.replace('es5/', ''), 'es5/tex-mml-chtml.js')
|
47
|
-
%>
|
48
|
-
|
49
|
-
<% } else if (theme.post.math.engine === 'katex') { %>
|
50
|
-
<% import_css(theme.static_prefix.katex, 'katex.min.css') %>
|
51
|
-
<% } %>
|
1
|
+
<% if(theme.post.math.engine === 'mathjax') { %>
|
2
|
+
<%
|
3
|
+
var lazy = theme.lazyload.enable && require_version(theme.static_prefix.mathjax, '3.2.0')
|
4
|
+
|
5
|
+
import_script(`
|
6
|
+
<script>
|
7
|
+
if (!window.MathJax) {
|
8
|
+
window.MathJax = {
|
9
|
+
tex : {
|
10
|
+
inlineMath: { '[+]': [['$', '$']] }
|
11
|
+
},
|
12
|
+
loader : {
|
13
|
+
${ lazy ? 'load: \[\'ui/lazy\'\]' : '' }
|
14
|
+
},
|
15
|
+
options: {
|
16
|
+
renderActions: {
|
17
|
+
insertedScript: [200, () => {
|
18
|
+
document.querySelectorAll('mjx-container').forEach(node => {
|
19
|
+
let target = node.parentNode;
|
20
|
+
if (target.nodeName.toLowerCase() === 'li') {
|
21
|
+
target.parentNode.classList.add('has-jax');
|
22
|
+
}
|
23
|
+
});
|
24
|
+
}, '', false]
|
25
|
+
}
|
26
|
+
}
|
27
|
+
};
|
28
|
+
} else {
|
29
|
+
MathJax.startup.document.state(0);
|
30
|
+
MathJax.texReset();
|
31
|
+
MathJax.typeset();
|
32
|
+
MathJax.typesetPromise();
|
33
|
+
}
|
34
|
+
|
35
|
+
LNote.events.registerRefreshCallback(function() {
|
36
|
+
if ('MathJax' in window && MathJax.startup.document && typeof MathJax.startup.document.state === 'function') {
|
37
|
+
MathJax.startup.document.state(0);
|
38
|
+
MathJax.texReset();
|
39
|
+
MathJax.typeset();
|
40
|
+
MathJax.typesetPromise();
|
41
|
+
}
|
42
|
+
});
|
43
|
+
</script>
|
44
|
+
`)
|
45
|
+
|
46
|
+
import_js(theme.static_prefix.mathjax.replace('es5/', ''), 'es5/tex-mml-chtml.js')
|
47
|
+
%>
|
48
|
+
|
49
|
+
<% } else if (theme.post.math.engine === 'katex') { %>
|
50
|
+
<% import_css(theme.static_prefix.katex, 'katex.min.css') %>
|
51
|
+
<% } %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if (page.mermaid) { %>
|
2
|
-
<%- post_html_link('mermaid') %>
|
3
|
-
<% } %>
|
4
|
-
|
1
|
+
<% if (page.mermaid) { %>
|
2
|
+
<%- post_html_link('mermaid') %>
|
3
|
+
<% } %>
|
4
|
+
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<%- post_html_link('nprogress') %>
|
2
|
-
<script>
|
3
|
-
NProgress.configure({showSpinner: false, trickleSpeed: 100})
|
4
|
-
NProgress.start()
|
5
|
-
window.addEventListener('load', function() {
|
6
|
-
NProgress.done();
|
7
|
-
})
|
1
|
+
<%- post_html_link('nprogress') %>
|
2
|
+
<script>
|
3
|
+
NProgress.configure({showSpinner: false, trickleSpeed: 100})
|
4
|
+
NProgress.start()
|
5
|
+
window.addEventListener('load', function() {
|
6
|
+
NProgress.done();
|
7
|
+
})
|
8
8
|
</script>
|
@@ -1,20 +1,20 @@
|
|
1
|
-
<script>
|
2
|
-
(function (window, document) {
|
3
|
-
const subtitle = document.getElementById('subtitle');
|
4
|
-
if (!subtitle || !('Typed' in window)) {
|
5
|
-
return;
|
6
|
-
}
|
7
|
-
subtitle.innerText = '';
|
8
|
-
|
9
|
-
const text = subtitle.getAttribute('data-typed-text');
|
10
|
-
const typed = new window.Typed('#subtitle', {
|
11
|
-
strings: [
|
12
|
-
' ',
|
13
|
-
text
|
14
|
-
],
|
15
|
-
cursorChar: '_',
|
16
|
-
typeSpeed: 80,
|
17
|
-
loop: false
|
18
|
-
});
|
19
|
-
})(window, document);
|
20
|
-
</script>
|
1
|
+
<script>
|
2
|
+
(function (window, document) {
|
3
|
+
const subtitle = document.getElementById('subtitle');
|
4
|
+
if (!subtitle || !('Typed' in window)) {
|
5
|
+
return;
|
6
|
+
}
|
7
|
+
subtitle.innerText = '';
|
8
|
+
|
9
|
+
const text = subtitle.getAttribute('data-typed-text');
|
10
|
+
const typed = new window.Typed('#subtitle', {
|
11
|
+
strings: [
|
12
|
+
' ',
|
13
|
+
text
|
14
|
+
],
|
15
|
+
cursorChar: '_',
|
16
|
+
typeSpeed: 80,
|
17
|
+
loop: false
|
18
|
+
});
|
19
|
+
})(window, document);
|
20
|
+
</script>
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<%
|
2
|
-
var parent = page.categories.filter(c => !c.parent)
|
3
|
-
if (Array.isArray(page.category_bar)) {
|
4
|
-
parent = page.categories.filter(cat => page.category_bar.indexOf(cat.name) !== -1)
|
5
|
-
}
|
6
|
-
var filterIds = page.categories.map(c => c._id)
|
7
|
-
filterIds.push(page._id)
|
8
|
-
%>
|
9
|
-
|
10
|
-
<%- partial('_partials/category-list', {
|
11
|
-
curCats : parent,
|
12
|
-
params: {
|
13
|
-
type : 'post',
|
14
|
-
filterIds: filterIds,
|
15
|
-
postLimit: 10,
|
16
|
-
postOrderBy: '-date'
|
17
|
-
}
|
18
|
-
}) %>
|
1
|
+
<%
|
2
|
+
var parent = page.categories.filter(c => !c.parent)
|
3
|
+
if (Array.isArray(page.category_bar)) {
|
4
|
+
parent = page.categories.filter(cat => page.category_bar.indexOf(cat.name) !== -1)
|
5
|
+
}
|
6
|
+
var filterIds = page.categories.map(c => c._id)
|
7
|
+
filterIds.push(page._id)
|
8
|
+
%>
|
9
|
+
|
10
|
+
<%- partial('_partials/category-list', {
|
11
|
+
curCats : parent,
|
12
|
+
params: {
|
13
|
+
type : 'post',
|
14
|
+
filterIds: filterIds,
|
15
|
+
postLimit: 10,
|
16
|
+
postOrderBy: '-date'
|
17
|
+
}
|
18
|
+
}) %>
|