hexo-theme-lnote 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. package/README.md +36 -36
  2. package/_config.yml +19 -19
  3. package/config/links.yml +63 -63
  4. package/config/svg.yml +33 -33
  5. package/index.d.ts +3 -3
  6. package/languages/de.yml +69 -69
  7. package/languages/en.yml +73 -73
  8. package/languages/eo.yml +69 -69
  9. package/languages/es.yml +69 -69
  10. package/languages/ja.yml +69 -69
  11. package/languages/ru.yml +69 -69
  12. package/languages/zh-CN.yml +73 -73
  13. package/languages/zh-HK.yml +73 -73
  14. package/languages/zh-TW.yml +73 -73
  15. package/layout/404.ejs +8 -8
  16. package/layout/_partials/archive-list.ejs +17 -17
  17. package/layout/_partials/category-chains.ejs +19 -19
  18. package/layout/_partials/category-list.ejs +62 -62
  19. package/layout/_partials/comments/changyan.ejs +11 -11
  20. package/layout/_partials/comments/cusdis.ejs +25 -25
  21. package/layout/_partials/comments/discuss.ejs +17 -17
  22. package/layout/_partials/comments/disqus.ejs +32 -32
  23. package/layout/_partials/comments/giscus.ejs +36 -36
  24. package/layout/_partials/comments/gitalk.ejs +19 -19
  25. package/layout/_partials/comments/livere.ejs +10 -10
  26. package/layout/_partials/comments/remark42.ejs +29 -29
  27. package/layout/_partials/comments/twikoo.ejs +25 -25
  28. package/layout/_partials/comments/utterances.ejs +27 -27
  29. package/layout/_partials/comments/valine.ejs +23 -23
  30. package/layout/_partials/comments/waline.ejs +24 -24
  31. package/layout/_partials/comments.ejs +8 -8
  32. package/layout/_partials/css.ejs +9 -9
  33. package/layout/_partials/footer/beian.ejs +33 -33
  34. package/layout/_partials/footer/statistics.ejs +39 -39
  35. package/layout/_partials/footer.ejs +7 -7
  36. package/layout/_partials/head.ejs +46 -46
  37. package/layout/_partials/header/banner.ejs +24 -24
  38. package/layout/_partials/header/navigation.ejs +56 -56
  39. package/layout/_partials/header.ejs +4 -4
  40. package/layout/_partials/markdown-plugins.ejs +24 -24
  41. package/layout/_partials/paginator.ejs +14 -14
  42. package/layout/_partials/plugins/CSR.ejs +4 -4
  43. package/layout/_partials/plugins/analytics.ejs +75 -75
  44. package/layout/_partials/plugins/anchorjs.ejs +39 -39
  45. package/layout/_partials/plugins/code-widget.ejs +7 -7
  46. package/layout/_partials/plugins/encrypt.ejs +18 -18
  47. package/layout/_partials/plugins/fancybox.ejs +11 -11
  48. package/layout/_partials/plugins/highlight.ejs +13 -13
  49. package/layout/_partials/plugins/math.ejs +51 -51
  50. package/layout/_partials/plugins/mermaid.ejs +4 -4
  51. package/layout/_partials/plugins/nprogress.ejs +7 -7
  52. package/layout/_partials/plugins/typed.ejs +20 -20
  53. package/layout/_partials/post/category-bar.ejs +18 -18
  54. package/layout/_partials/post/copyright.ejs +50 -50
  55. package/layout/_partials/post/css.ejs +3 -3
  56. package/layout/_partials/post/meta-bottom.ejs +16 -16
  57. package/layout/_partials/post/meta-top.ejs +27 -27
  58. package/layout/_partials/post/scripts.ejs +8 -8
  59. package/layout/_partials/post/sidebar-left.ejs +1 -1
  60. package/layout/_partials/post/sidebar-right.ejs +2 -2
  61. package/layout/_partials/post/toc.ejs +6 -6
  62. package/layout/_partials/scripts.ejs +10 -10
  63. package/layout/_partials/search.ejs +19 -19
  64. package/layout/about.ejs +22 -22
  65. package/layout/archive.ejs +10 -10
  66. package/layout/categories.ejs +20 -20
  67. package/layout/category.ejs +12 -12
  68. package/layout/index.ejs +61 -61
  69. package/layout/layout.ejs +60 -60
  70. package/layout/links.ejs +31 -31
  71. package/layout/page.ejs +15 -15
  72. package/layout/post.ejs +77 -77
  73. package/layout/tag.ejs +12 -12
  74. package/layout/tags.ejs +26 -26
  75. package/package.json +73 -73
  76. package/scripts/index.js +2 -1
  77. package/source/css/_functions/base.styl +8 -8
  78. package/source/css/_mixins/base.styl +23 -23
  79. package/source/css/_pages/_about/about.styl +32 -32
  80. package/source/css/_pages/_archive/archive.styl +32 -32
  81. package/source/css/_pages/_base/_widget/anchorjs.styl +8 -8
  82. package/source/css/_pages/_base/_widget/banner.styl +29 -29
  83. package/source/css/_pages/_base/_widget/board.styl +11 -11
  84. package/source/css/_pages/_base/_widget/code-widget.styl +36 -36
  85. package/source/css/_pages/_base/_widget/copyright.styl +90 -90
  86. package/source/css/_pages/_base/_widget/footer.styl +65 -65
  87. package/source/css/_pages/_base/_widget/footnote.styl +25 -25
  88. package/source/css/_pages/_base/_widget/header.styl +173 -173
  89. package/source/css/_pages/_base/_widget/modal.styl +100 -100
  90. package/source/css/_pages/_base/_widget/navlink.styl +15 -15
  91. package/source/css/_pages/_base/_widget/ngrogress.styl +12 -12
  92. package/source/css/_pages/_base/_widget/noscript.styl +12 -12
  93. package/source/css/_pages/_base/_widget/pagination.styl +23 -23
  94. package/source/css/_pages/_base/_widget/qrcode.styl +17 -17
  95. package/source/css/_pages/_base/_widget/scroll-btn.styl +48 -48
  96. package/source/css/_pages/_base/_widget/text.styl +19 -19
  97. package/source/css/_pages/_base/_widget/toc.styl +75 -75
  98. package/source/css/_pages/_base/base.styl +67 -67
  99. package/source/css/_pages/_base/color-schema.styl +79 -79
  100. package/source/css/_pages/_base/inline.styl +51 -51
  101. package/source/css/_pages/_base/keyframes.styl +31 -31
  102. package/source/css/_pages/_base/print.styl +38 -38
  103. package/source/css/_pages/_category/category-bar.styl +58 -58
  104. package/source/css/_pages/_category/category-chain.styl +6 -6
  105. package/source/css/_pages/_category/category-list.styl +62 -62
  106. package/source/css/_pages/_index/index.styl +75 -75
  107. package/source/css/_pages/_links/links.styl +79 -79
  108. package/source/css/_pages/_post/comment.styl +27 -27
  109. package/source/css/_pages/_post/highlight.styl +76 -76
  110. package/source/css/_pages/_post/markdown.styl +96 -96
  111. package/source/css/_pages/_post/post-page.styl +179 -179
  112. package/source/css/_pages/_post/post-plugin.styl +9 -9
  113. package/source/css/_pages/_post/post-tag.styl +74 -74
  114. package/source/css/_pages/_tag/tags.styl +9 -9
  115. package/source/css/_pages/pages.styl +8 -8
  116. package/source/css/_variables/base.styl +72 -72
  117. package/source/css/gitalk.css +546 -546
  118. package/source/css/main.styl +19 -19
  119. package/source/js/color-schema.js +279 -279
  120. package/source/js/events.js +72 -72
  121. package/source/js/img-lazyload.js +10 -10
  122. package/source/js/local-search.js +70 -70
  123. package/source/js/post/copying-code.js +34 -34
  124. package/source/js/post/enable.js +6 -6
  125. package/source/js/post/img-swipe-bf.js +47 -47
  126. package/source/js/post/img-swipe.js +83 -83
  127. package/source/js/post/mermaiding.js +9 -9
  128. package/source/js/post/play-imgs.js +58 -58
  129. package/source/js/post/toc.js +24 -24
  130. package/source/js/post/view-imgs.js +27 -27
  131. package/source/js/utils.js +245 -245
  132. package/source/xml/local-search.xml +45 -45
  133. package/templates/Chat.vue +52 -52
  134. package/templates/GroupImage.vue +36 -36
  135. package/templates/MenuNav.vue +39 -39
  136. package/templates/Note.vue +33 -33
  137. package/templates/Noun.vue +25 -25
  138. package/templates/NounContent.vue +29 -29
  139. package/templates/Tab.vue +40 -40
  140. package/templates/footer.ejs +12 -12
  141. package/templates/utils/uri.ts +39 -39
@@ -1,11 +1,11 @@
1
- <% if (theme.changyan.appid) { %>
2
- <div id="SOHUCS" sid='<%= page.permalink %>'></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#SOHUCS', function() {
5
- LNote.utils.createScript("https://changyan.sohu.com/upload/changyan.js", function() {
6
- window.changyan.api.config(<%- JSON.stringify(theme.changyan || {}) %>)
7
- });
8
- });
9
- </script>
10
- <noscript>Please enable JavaScript to view the comments</noscript>
11
- <% } %>
1
+ <% if (theme.changyan.appid) { %>
2
+ <div id="SOHUCS" sid='<%= page.permalink %>'></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#SOHUCS', function() {
5
+ LNote.utils.createScript("https://changyan.sohu.com/upload/changyan.js", function() {
6
+ window.changyan.api.config(<%- JSON.stringify(theme.changyan || {}) %>)
7
+ });
8
+ });
9
+ </script>
10
+ <noscript>Please enable JavaScript to view the comments</noscript>
11
+ <% } %>
@@ -1,25 +1,25 @@
1
- <% if (theme.cusdis.host && theme.cusdis.app_id) { %>
2
- <div class="cusdis" style="width:100%">
3
- <div id="cusdis_thread"
4
- data-host="<%= theme.cusdis.host %>"
5
- data-app-id="<%= theme.cusdis.app_id %>"
6
- data-page-id="<%= md5(page.path) %>"
7
- data-page-url="<%= page.path %>"
8
- data-page-title="<%= page.title %>"
9
- data-theme="<%= theme.dark_mode %>"
10
- >
11
- </div>
12
- </div>
13
- <script type="text/javascript">
14
- LNote.utils.loadComments('#cusdis_thread', function() {
15
- LNote.utils.createScript('<%= url_join(theme.cusdis.host,
16
- `/js/widget/lang/${ String(theme.cusdis.lang || 'zh-cn').toLowerCase() }.js`) %>');
17
- LNote.utils.createScript('<%= url_join(theme.cusdis.host, 'js/cusdis.es.js') %>');
18
- var schema = document.documentElement.getAttribute('data-bs-theme');
19
- if (schema) {
20
- document.querySelector('#cusdis_thread').dataset.theme = schema
21
- }
22
- });
23
- </script>
24
- <noscript>Please enable JavaScript to view the comments</noscript>
25
- <% } %>
1
+ <% if (theme.cusdis.host && theme.cusdis.app_id) { %>
2
+ <div class="cusdis" style="width:100%">
3
+ <div id="cusdis_thread"
4
+ data-host="<%= theme.cusdis.host %>"
5
+ data-app-id="<%= theme.cusdis.app_id %>"
6
+ data-page-id="<%= md5(page.path) %>"
7
+ data-page-url="<%= page.path %>"
8
+ data-page-title="<%= page.title %>"
9
+ data-theme="<%= theme.dark_mode %>"
10
+ >
11
+ </div>
12
+ </div>
13
+ <script type="text/javascript">
14
+ LNote.utils.loadComments('#cusdis_thread', function() {
15
+ LNote.utils.createScript('<%= url_join(theme.cusdis.host,
16
+ `/js/widget/lang/${ String(theme.cusdis.lang || 'zh-cn').toLowerCase() }.js`) %>');
17
+ LNote.utils.createScript('<%= url_join(theme.cusdis.host, 'js/cusdis.es.js') %>');
18
+ var schema = document.documentElement.getAttribute('data-bs-theme');
19
+ if (schema) {
20
+ document.querySelector('#cusdis_thread').dataset.theme = schema
21
+ }
22
+ });
23
+ </script>
24
+ <noscript>Please enable JavaScript to view the comments</noscript>
25
+ <% } %>
@@ -1,17 +1,17 @@
1
- <% if (theme.discuss && theme.discuss.serverURLs) { %>
2
- <div id="discuss-comments"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#comments', function() {
5
- LNote.utils.createScript('<%= url_join(theme.static_prefix.discuss, 'discuss.js') %>', function() {
6
- var options = Object.assign(
7
- <%- JSON.stringify(theme.discuss || {}) %>,
8
- { el: '#discuss-comments',
9
- path: <%= theme.discuss.path %>
10
- }
11
- )
12
- discuss.init(options)
13
- });
14
- });
15
- </script>
16
- <noscript>Please enable JavaScript to view the comments</noscript>
17
- <% } %>
1
+ <% if (theme.discuss && theme.discuss.serverURLs) { %>
2
+ <div id="discuss-comments"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#comments', function() {
5
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.discuss, 'discuss.js') %>', function() {
6
+ var options = Object.assign(
7
+ <%- JSON.stringify(theme.discuss || {}) %>,
8
+ { el: '#discuss-comments',
9
+ path: <%= theme.discuss.path %>
10
+ }
11
+ )
12
+ discuss.init(options)
13
+ });
14
+ });
15
+ </script>
16
+ <noscript>Please enable JavaScript to view the comments</noscript>
17
+ <% } %>
@@ -1,32 +1,32 @@
1
- <% if (theme.disqus.shortname) { %>
2
- <div class="disqus" style="width:100%">
3
- <div id="disqus_thread"></div>
4
- <% if (theme.disqus.disqusjs) { %>
5
- <script>
6
- LNote.utils.loadComments('#disqus_thread', function() {
7
- LNote.utils.createCssLink('<%= url_join(theme.static_prefix.disqusjs, 'disqusjs.css') %>');
8
- LNote.utils.createScript('<%= url_join(theme.static_prefix.disqusjs, 'disqus.js') %>', function() {
9
- new DisqusJS({
10
- shortname: '<%= theme.disqus.shortname %>',
11
- apikey: '<%= theme.disqus.apikey %>'
12
- });
13
- });
14
- });
15
- </script>
16
- <% } else { %>
17
- <script type="text/javascript">
18
- var disqus_config = function() {
19
- this.page.url = '<%= page.permalink %>';
20
- this.page.identifier = '<%= url_for(page.path) %>';
21
- };
22
- LNote.utils.loadComments('#disqus_thread', function() {
23
- var d = document, s = d.createElement('script');
24
- s.src = '//' + '<%= theme.disqus.shortname %>' + '.disqus.com/embed.js';
25
- s.setAttribute('data-timestamp', new Date());
26
- (d.head || d.body).appendChild(s);
27
- });
28
- </script>
29
- <% } %>
30
- <noscript>Please enable JavaScript to view the comments</noscript>
31
- </div>
32
- <% } %>
1
+ <% if (theme.disqus.shortname) { %>
2
+ <div class="disqus" style="width:100%">
3
+ <div id="disqus_thread"></div>
4
+ <% if (theme.disqus.disqusjs) { %>
5
+ <script>
6
+ LNote.utils.loadComments('#disqus_thread', function() {
7
+ LNote.utils.createCssLink('<%= url_join(theme.static_prefix.disqusjs, 'disqusjs.css') %>');
8
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.disqusjs, 'disqus.js') %>', function() {
9
+ new DisqusJS({
10
+ shortname: '<%= theme.disqus.shortname %>',
11
+ apikey: '<%= theme.disqus.apikey %>'
12
+ });
13
+ });
14
+ });
15
+ </script>
16
+ <% } else { %>
17
+ <script type="text/javascript">
18
+ var disqus_config = function() {
19
+ this.page.url = '<%= page.permalink %>';
20
+ this.page.identifier = '<%= url_for(page.path) %>';
21
+ };
22
+ LNote.utils.loadComments('#disqus_thread', function() {
23
+ var d = document, s = d.createElement('script');
24
+ s.src = '//' + '<%= theme.disqus.shortname %>' + '.disqus.com/embed.js';
25
+ s.setAttribute('data-timestamp', new Date());
26
+ (d.head || d.body).appendChild(s);
27
+ });
28
+ </script>
29
+ <% } %>
30
+ <noscript>Please enable JavaScript to view the comments</noscript>
31
+ </div>
32
+ <% } %>
@@ -1,36 +1,36 @@
1
- <% if (theme.giscus && theme.giscus['repo'] && theme.giscus['repo-id']) { %>
2
- <div id="giscus" class="giscus"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#giscus', function() {
5
- var options = <%- JSON.stringify(theme.giscus || {}) %>;
6
- var attributes = {};
7
- for (let option in options) {
8
- if (!option.startsWith('theme-')) {
9
- var key = option.startsWith('data-') ? option : 'data-' + option;
10
- attributes[key] = options[option];
11
- }
12
- }
13
- var light = '<%= theme.giscus['theme-light'] || 'light' %>';
14
- var dark = '<%= theme.giscus['theme-dark'] || 'dark' %>';
15
- window.GiscusThemeLight = light;
16
- window.GiscusThemeDark = dark;
17
- attributes['data-theme'] = document.documentElement.getAttribute('data-bs-theme') === 'dark' ? dark : light;
18
- for (let attribute in attributes) {
19
- var value = attributes[attribute];
20
- if (value === undefined || value === null || value === '') {
21
- delete attributes[attribute];
22
- }
23
- }
24
- var s = document.createElement('script');
25
- s.setAttribute('src', 'https://giscus.app/client.js');
26
- s.setAttribute('crossorigin', 'anonymous');
27
- for (let attribute in attributes) {
28
- s.setAttribute(attribute, attributes[attribute]);
29
- }
30
- var ss = document.getElementsByTagName('script');
31
- var e = ss.length > 0 ? ss[ss.length - 1] : document.head || document.documentElement;
32
- e.parentNode.insertBefore(s, e.nextSibling);
33
- });
34
- </script>
35
- <noscript>Please enable JavaScript to view the comments</noscript>
36
- <% } %>
1
+ <% if (theme.giscus && theme.giscus['repo'] && theme.giscus['repo-id']) { %>
2
+ <div id="giscus" class="giscus"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#giscus', function() {
5
+ var options = <%- JSON.stringify(theme.giscus || {}) %>;
6
+ var attributes = {};
7
+ for (let option in options) {
8
+ if (!option.startsWith('theme-')) {
9
+ var key = option.startsWith('data-') ? option : 'data-' + option;
10
+ attributes[key] = options[option];
11
+ }
12
+ }
13
+ var light = '<%= theme.giscus['theme-light'] || 'light' %>';
14
+ var dark = '<%= theme.giscus['theme-dark'] || 'dark' %>';
15
+ window.GiscusThemeLight = light;
16
+ window.GiscusThemeDark = dark;
17
+ attributes['data-theme'] = document.documentElement.getAttribute('data-bs-theme') === 'dark' ? dark : light;
18
+ for (let attribute in attributes) {
19
+ var value = attributes[attribute];
20
+ if (value === undefined || value === null || value === '') {
21
+ delete attributes[attribute];
22
+ }
23
+ }
24
+ var s = document.createElement('script');
25
+ s.setAttribute('src', 'https://giscus.app/client.js');
26
+ s.setAttribute('crossorigin', 'anonymous');
27
+ for (let attribute in attributes) {
28
+ s.setAttribute(attribute, attributes[attribute]);
29
+ }
30
+ var ss = document.getElementsByTagName('script');
31
+ var e = ss.length > 0 ? ss[ss.length - 1] : document.head || document.documentElement;
32
+ e.parentNode.insertBefore(s, e.nextSibling);
33
+ });
34
+ </script>
35
+ <noscript>Please enable JavaScript to view the comments</noscript>
36
+ <% } %>
@@ -1,19 +1,19 @@
1
- <% if(theme.gitalk.clientID && theme.gitalk.clientSecret && theme.gitalk.repo){ %>
2
- <div id="gitalk-container"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#gitalk-container', function() {
5
- LNote.utils.createCssLink('<%= url_join(theme.static_prefix.internal_css, 'gitalk.css') %>')
6
- LNote.utils.createScript('<%= url_join(theme.static_prefix.gitalk, 'gitalk.min.js') %>', function() {
7
- var options = Object.assign(
8
- <%- JSON.stringify(theme.gitalk || {}) %>,
9
- {
10
- id: '<%= md5(page.path) %>'
11
- }
12
- )
13
- var gitalk = new Gitalk(options);
14
- gitalk.render('gitalk-container');
15
- });
16
- });
17
- </script>
18
- <noscript>Please enable JavaScript to view the comments</noscript>
19
- <% } %>
1
+ <% if(theme.gitalk.clientID && theme.gitalk.clientSecret && theme.gitalk.repo){ %>
2
+ <div id="gitalk-container"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#gitalk-container', function() {
5
+ LNote.utils.createCssLink('<%= url_join(theme.static_prefix.internal_css, 'gitalk.css') %>')
6
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.gitalk, 'gitalk.min.js') %>', function() {
7
+ var options = Object.assign(
8
+ <%- JSON.stringify(theme.gitalk || {}) %>,
9
+ {
10
+ id: '<%= md5(page.path) %>'
11
+ }
12
+ )
13
+ var gitalk = new Gitalk(options);
14
+ gitalk.render('gitalk-container');
15
+ });
16
+ });
17
+ </script>
18
+ <noscript>Please enable JavaScript to view the comments</noscript>
19
+ <% } %>
@@ -1,10 +1,10 @@
1
- <% if (theme.livere.uid) { %>
2
- <div id="lv-container" data-id="city" data-uid="<%= theme.livere.uid %>">
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#lv-container', function() {
5
- LNote.utils.createScript('https://cdn-city.livere.com/js/embed.dist.js');
6
- });
7
- </script>
8
- <noscript>Please enable JavaScript to view the comments</noscript>
9
- </div>
10
- <% } %>
1
+ <% if (theme.livere.uid) { %>
2
+ <div id="lv-container" data-id="city" data-uid="<%= theme.livere.uid %>">
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#lv-container', function() {
5
+ LNote.utils.createScript('https://cdn-city.livere.com/js/embed.dist.js');
6
+ });
7
+ </script>
8
+ <noscript>Please enable JavaScript to view the comments</noscript>
9
+ </div>
10
+ <% } %>
@@ -1,29 +1,29 @@
1
- <% if (theme.remark42.host && theme.remark42.site_id) { %>
2
- <div id="remark42"></div>
3
- <script type="text/javascript">
4
- var schema = document.documentElement.getAttribute('data-bs-theme');
5
- if (schema !== 'light' && schema !== 'dark') {
6
- schema = 'light';
7
- }
8
- var remark_config = Object.assign(
9
- <%- JSON.stringify(theme.remark42 || {}) %>,
10
- {
11
- url: '<%= url_for(page.path) %>',
12
- page_title: '<%= page.title %>',
13
- theme: schema,
14
- }
15
- );
16
-
17
- LNote.utils.loadComments('#remark42', function() {
18
- (function (c) {
19
- for (var i = 0; i < c.length; i++) {
20
- var d = document, s = d.createElement('script');
21
- s.src = remark_config.host + '/web/' + c[i] + '.js';
22
- s.defer = true;
23
- (d.head || d.body).appendChild(s);
24
- }
25
- })(remark_config.components || ['embed']);
26
- });
27
- </script>
28
- <noscript>Please enable JavaScript to view the comments</noscript>
29
- <% } %>
1
+ <% if (theme.remark42.host && theme.remark42.site_id) { %>
2
+ <div id="remark42"></div>
3
+ <script type="text/javascript">
4
+ var schema = document.documentElement.getAttribute('data-bs-theme');
5
+ if (schema !== 'light' && schema !== 'dark') {
6
+ schema = 'light';
7
+ }
8
+ var remark_config = Object.assign(
9
+ <%- JSON.stringify(theme.remark42 || {}) %>,
10
+ {
11
+ url: '<%= url_for(page.path) %>',
12
+ page_title: '<%= page.title %>',
13
+ theme: schema,
14
+ }
15
+ );
16
+
17
+ LNote.utils.loadComments('#remark42', function() {
18
+ (function (c) {
19
+ for (var i = 0; i < c.length; i++) {
20
+ var d = document, s = d.createElement('script');
21
+ s.src = remark_config.host + '/web/' + c[i] + '.js';
22
+ s.defer = true;
23
+ (d.head || d.body).appendChild(s);
24
+ }
25
+ })(remark_config.components || ['embed']);
26
+ });
27
+ </script>
28
+ <noscript>Please enable JavaScript to view the comments</noscript>
29
+ <% } %>
@@ -1,25 +1,25 @@
1
- <% if (theme.twikoo && theme.twikoo.envId) { %>
2
- <div id="twikoo"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#comments', function() {
5
- LNote.utils.createScript('<%= url_join(theme.static_prefix.twikoo, 'twikoo.all.min.js') %>', function() {
6
- var options = Object.assign(
7
- <%- JSON.stringify(theme.twikoo || {}) %>,
8
- {
9
- el: '#twikoo',
10
- path: '<%= theme.twikoo.path %>',
11
- onCommentLoaded: function() {
12
- LNote.utils.listenDOMLoaded(function() {
13
- var imgSelector = '#twikoo .tk-content img:not(.tk-owo-emotion)';
14
- LNote.plugins.imageCaption(imgSelector);
15
- LNote.plugins.fancyBox(imgSelector);
16
- });
17
- }
18
- }
19
- )
20
- twikoo.init(options)
21
- });
22
- });
23
- </script>
24
- <noscript>Please enable JavaScript to view the comments</noscript>
25
- <% } %>
1
+ <% if (theme.twikoo && theme.twikoo.envId) { %>
2
+ <div id="twikoo"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#comments', function() {
5
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.twikoo, 'twikoo.all.min.js') %>', function() {
6
+ var options = Object.assign(
7
+ <%- JSON.stringify(theme.twikoo || {}) %>,
8
+ {
9
+ el: '#twikoo',
10
+ path: '<%= theme.twikoo.path %>',
11
+ onCommentLoaded: function() {
12
+ LNote.utils.listenDOMLoaded(function() {
13
+ var imgSelector = '#twikoo .tk-content img:not(.tk-owo-emotion)';
14
+ LNote.plugins.imageCaption(imgSelector);
15
+ LNote.plugins.fancyBox(imgSelector);
16
+ });
17
+ }
18
+ }
19
+ )
20
+ twikoo.init(options)
21
+ });
22
+ });
23
+ </script>
24
+ <noscript>Please enable JavaScript to view the comments</noscript>
25
+ <% } %>
@@ -1,27 +1,27 @@
1
- <% if (theme.utterances.repo && theme.utterances.issue_term) { %>
2
- <script type="text/javascript">
3
- LNote.utils.loadComments('#comments', function() {
4
- var light = '<%= theme.utterances.theme || 'github-light' %>';
5
- var dark = '<%= theme.utterances.theme_dark || 'github-dark' %>';
6
- var schema = document.documentElement.getAttribute('data-bs-theme');
7
- if (schema === 'dark') {
8
- schema = dark;
9
- } else {
10
- schema = light;
11
- }
12
- window.UtterancesThemeLight = light;
13
- window.UtterancesThemeDark = dark;
14
- var s = document.createElement('script');
15
- s.setAttribute('src', 'https://utteranc.es/client.js');
16
- s.setAttribute('repo', '<%= theme.utterances.repo %>');
17
- s.setAttribute('issue-term', '<%= theme.utterances.issue_term %>');
18
- <% if (theme.utterances.label) { %>
19
- s.setAttribute('label', '<%= theme.utterances.label %>');
20
- <% } %>
21
- s.setAttribute('theme', schema);
22
- s.setAttribute('crossorigin', 'anonymous');
23
- document.getElementById('comments').appendChild(s);
24
- })
25
- </script>
26
- <noscript>Please enable JavaScript to view the comments</noscript>
27
- <% } %>
1
+ <% if (theme.utterances.repo && theme.utterances.issue_term) { %>
2
+ <script type="text/javascript">
3
+ LNote.utils.loadComments('#comments', function() {
4
+ var light = '<%= theme.utterances.theme || 'github-light' %>';
5
+ var dark = '<%= theme.utterances.theme_dark || 'github-dark' %>';
6
+ var schema = document.documentElement.getAttribute('data-bs-theme');
7
+ if (schema === 'dark') {
8
+ schema = dark;
9
+ } else {
10
+ schema = light;
11
+ }
12
+ window.UtterancesThemeLight = light;
13
+ window.UtterancesThemeDark = dark;
14
+ var s = document.createElement('script');
15
+ s.setAttribute('src', 'https://utteranc.es/client.js');
16
+ s.setAttribute('repo', '<%= theme.utterances.repo %>');
17
+ s.setAttribute('issue-term', '<%= theme.utterances.issue_term %>');
18
+ <% if (theme.utterances.label) { %>
19
+ s.setAttribute('label', '<%= theme.utterances.label %>');
20
+ <% } %>
21
+ s.setAttribute('theme', schema);
22
+ s.setAttribute('crossorigin', 'anonymous');
23
+ document.getElementById('comments').appendChild(s);
24
+ })
25
+ </script>
26
+ <noscript>Please enable JavaScript to view the comments</noscript>
27
+ <% } %>
@@ -1,23 +1,23 @@
1
- <% if (theme.valine.appId && theme.valine.appKey) { %>
2
- <div id="valine"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#valine', function() {
5
- LNote.utils.createScript('<%= url_join(theme.static_prefix.valine, 'Valine.min.js') %>', function() {
6
- var options = Object.assign(
7
- <%- JSON.stringify(theme.valine || {}) %>,
8
- {
9
- el: "#valine",
10
- path: <%= theme.valine.path %>
11
- }
12
- )
13
- new Valine(options);
14
- LNote.utils.waitElementVisible('#valine .vcontent', () => {
15
- var imgSelector = '#valine .vcontent img:not(.vemoji)';
16
- LNote.plugins.imageCaption(imgSelector);
17
- LNote.plugins.fancyBox(imgSelector);
18
- })
19
- });
20
- });
21
- </script>
22
- <noscript>Please enable JavaScript to view the comments</noscript>
23
- <% } %>
1
+ <% if (theme.valine.appId && theme.valine.appKey) { %>
2
+ <div id="valine"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#valine', function() {
5
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.valine, 'Valine.min.js') %>', function() {
6
+ var options = Object.assign(
7
+ <%- JSON.stringify(theme.valine || {}) %>,
8
+ {
9
+ el: "#valine",
10
+ path: <%= theme.valine.path %>
11
+ }
12
+ )
13
+ new Valine(options);
14
+ LNote.utils.waitElementVisible('#valine .vcontent', () => {
15
+ var imgSelector = '#valine .vcontent img:not(.vemoji)';
16
+ LNote.plugins.imageCaption(imgSelector);
17
+ LNote.plugins.fancyBox(imgSelector);
18
+ })
19
+ });
20
+ });
21
+ </script>
22
+ <noscript>Please enable JavaScript to view the comments</noscript>
23
+ <% } %>
@@ -1,24 +1,24 @@
1
- <% if (theme.waline.serverURL) { %>
2
- <div id="waline"></div>
3
- <script type="text/javascript">
4
- LNote.utils.loadComments('#waline', function() {
5
- LNote.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
6
- LNote.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {
7
- var options = Object.assign(
8
- <%- JSON.stringify(theme.waline || {}) %>,
9
- {
10
- el: '#waline',
11
- path: <%= theme.waline.path %>
12
- }
13
- )
14
- Waline.init(options);
15
- LNote.utils.waitElementVisible('#waline .vcontent', () => {
16
- var imgSelector = '#waline .vcontent img:not(.vemoji)';
17
- LNote.plugins.imageCaption(imgSelector);
18
- LNote.plugins.fancyBox(imgSelector);
19
- })
20
- });
21
- });
22
- </script>
23
- <noscript>Please enable JavaScript to view the comments</noscript>
24
- <% } %>
1
+ <% if (theme.waline.serverURL) { %>
2
+ <div id="waline"></div>
3
+ <script type="text/javascript">
4
+ LNote.utils.loadComments('#waline', function() {
5
+ LNote.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
6
+ LNote.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {
7
+ var options = Object.assign(
8
+ <%- JSON.stringify(theme.waline || {}) %>,
9
+ {
10
+ el: '#waline',
11
+ path: <%= theme.waline.path %>
12
+ }
13
+ )
14
+ Waline.init(options);
15
+ LNote.utils.waitElementVisible('#waline .vcontent', () => {
16
+ var imgSelector = '#waline .vcontent img:not(.vemoji)';
17
+ LNote.plugins.imageCaption(imgSelector);
18
+ LNote.plugins.fancyBox(imgSelector);
19
+ })
20
+ });
21
+ });
22
+ </script>
23
+ <noscript>Please enable JavaScript to view the comments</noscript>
24
+ <% } %>
@@ -1,8 +1,8 @@
1
- <% if ((!is_post() && !is_page()) || (is_post() && theme.post.comments.enable && page.comments) || (is_page() && page.comments)) { %>
2
- <% var commentType = typeof page.comment === 'string' && page.comment !== '' ? page.comment : theme.post.comments.type %>
3
- <% if (commentType) { %>
4
- <article id="comments">
5
- <%- partial('_partials/comments/' + commentType) %>
6
- </article>
7
- <% } %>
8
- <% } %>
1
+ <% if ((!is_post() && !is_page()) || (is_post() && theme.post.comments.enable && page.comments) || (is_page() && page.comments)) { %>
2
+ <% var commentType = typeof page.comment === 'string' && page.comment !== '' ? page.comment : theme.post.comments.type %>
3
+ <% if (commentType) { %>
4
+ <article id="comments">
5
+ <%- partial('_partials/comments/' + commentType) %>
6
+ </article>
7
+ <% } %>
8
+ <% } %>
@@ -1,10 +1,10 @@
1
- <%- all_html_link('css') %>
2
- <%- partial('_partials/post/css.ejs') %>
3
-
4
- <%- css('//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css') %>
5
-
6
- <%# if (theme.custom_css) { %>
7
- <%#- css(theme.custom_css) %>
8
- <%# } %>
9
-
1
+ <%- all_html_link('css') %>
2
+ <%- partial('_partials/post/css.ejs') %>
3
+
4
+ <%- css('//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css') %>
5
+
6
+ <%# if (theme.custom_css) { %>
7
+ <%#- css(theme.custom_css) %>
8
+ <%# } %>
9
+
10
10
  <%- my_post_css(page) %>