hexo-theme-lnote 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. package/README.md +123 -0
  2. package/_config.yml +19 -0
  3. package/config/links.yml +63 -0
  4. package/config/svg.yml +34 -0
  5. package/languages/de.yml +69 -0
  6. package/languages/en.yml +69 -0
  7. package/languages/eo.yml +69 -0
  8. package/languages/es.yml +69 -0
  9. package/languages/ja.yml +69 -0
  10. package/languages/ru.yml +69 -0
  11. package/languages/zh-CN.yml +69 -0
  12. package/languages/zh-HK.yml +69 -0
  13. package/languages/zh-TW.yml +69 -0
  14. package/layout/404.ejs +8 -0
  15. package/layout/_partials/archive-list.ejs +17 -0
  16. package/layout/_partials/category-chains.ejs +19 -0
  17. package/layout/_partials/category-list.ejs +62 -0
  18. package/layout/_partials/comments/changyan.ejs +11 -0
  19. package/layout/_partials/comments/cusdis.ejs +25 -0
  20. package/layout/_partials/comments/discuss.ejs +17 -0
  21. package/layout/_partials/comments/disqus.ejs +32 -0
  22. package/layout/_partials/comments/giscus.ejs +36 -0
  23. package/layout/_partials/comments/gitalk.ejs +19 -0
  24. package/layout/_partials/comments/livere.ejs +10 -0
  25. package/layout/_partials/comments/remark42.ejs +29 -0
  26. package/layout/_partials/comments/twikoo.ejs +25 -0
  27. package/layout/_partials/comments/utterances.ejs +27 -0
  28. package/layout/_partials/comments/valine.ejs +23 -0
  29. package/layout/_partials/comments/waline.ejs +24 -0
  30. package/layout/_partials/comments.ejs +8 -0
  31. package/layout/_partials/css.ejs +10 -0
  32. package/layout/_partials/footer/beian.ejs +33 -0
  33. package/layout/_partials/footer/statistics.ejs +39 -0
  34. package/layout/_partials/footer.ejs +7 -0
  35. package/layout/_partials/head.ejs +46 -0
  36. package/layout/_partials/header/banner.ejs +24 -0
  37. package/layout/_partials/header/navigation.ejs +57 -0
  38. package/layout/_partials/header.ejs +4 -0
  39. package/layout/_partials/markdown-plugins.ejs +24 -0
  40. package/layout/_partials/paginator.ejs +14 -0
  41. package/layout/_partials/plugins/analytics.ejs +75 -0
  42. package/layout/_partials/plugins/anchorjs.ejs +39 -0
  43. package/layout/_partials/plugins/code-widget.ejs +7 -0
  44. package/layout/_partials/plugins/encrypt.ejs +18 -0
  45. package/layout/_partials/plugins/fancybox.ejs +11 -0
  46. package/layout/_partials/plugins/highlight.ejs +13 -0
  47. package/layout/_partials/plugins/math.ejs +51 -0
  48. package/layout/_partials/plugins/mermaid.ejs +4 -0
  49. package/layout/_partials/plugins/nprogress.ejs +8 -0
  50. package/layout/_partials/plugins/typed.ejs +20 -0
  51. package/layout/_partials/post/category-bar.ejs +18 -0
  52. package/layout/_partials/post/copyright.ejs +50 -0
  53. package/layout/_partials/post/css.ejs +4 -0
  54. package/layout/_partials/post/meta-bottom.ejs +16 -0
  55. package/layout/_partials/post/meta-top.ejs +28 -0
  56. package/layout/_partials/post/scripts.ejs +8 -0
  57. package/layout/_partials/post/sidebar-left.ejs +1 -0
  58. package/layout/_partials/post/sidebar-right.ejs +3 -0
  59. package/layout/_partials/post/toc.ejs +7 -0
  60. package/layout/_partials/scripts.ejs +10 -0
  61. package/layout/_partials/search.ejs +19 -0
  62. package/layout/about.ejs +22 -0
  63. package/layout/archive.ejs +10 -0
  64. package/layout/categories.ejs +20 -0
  65. package/layout/category.ejs +12 -0
  66. package/layout/index.ejs +61 -0
  67. package/layout/layout.ejs +60 -0
  68. package/layout/links.ejs +31 -0
  69. package/layout/page.ejs +15 -0
  70. package/layout/post.ejs +77 -0
  71. package/layout/tag.ejs +12 -0
  72. package/layout/tags.ejs +26 -0
  73. package/package.json +70 -0
  74. package/scripts/index.js +1 -0
  75. package/source/css/_functions/base.styl +8 -0
  76. package/source/css/_mixins/base.styl +23 -0
  77. package/source/css/_pages/_about/about.styl +32 -0
  78. package/source/css/_pages/_archive/archive.styl +32 -0
  79. package/source/css/_pages/_base/_widget/anchorjs.styl +8 -0
  80. package/source/css/_pages/_base/_widget/banner.styl +29 -0
  81. package/source/css/_pages/_base/_widget/board.styl +11 -0
  82. package/source/css/_pages/_base/_widget/code-widget.styl +36 -0
  83. package/source/css/_pages/_base/_widget/copyright.styl +90 -0
  84. package/source/css/_pages/_base/_widget/footer.styl +65 -0
  85. package/source/css/_pages/_base/_widget/footnote.styl +25 -0
  86. package/source/css/_pages/_base/_widget/header.styl +173 -0
  87. package/source/css/_pages/_base/_widget/modal.styl +100 -0
  88. package/source/css/_pages/_base/_widget/navlink.styl +16 -0
  89. package/source/css/_pages/_base/_widget/ngrogress.styl +12 -0
  90. package/source/css/_pages/_base/_widget/noscript.styl +12 -0
  91. package/source/css/_pages/_base/_widget/pagination.styl +23 -0
  92. package/source/css/_pages/_base/_widget/qrcode.styl +17 -0
  93. package/source/css/_pages/_base/_widget/scroll-btn.styl +48 -0
  94. package/source/css/_pages/_base/_widget/text.styl +19 -0
  95. package/source/css/_pages/_base/_widget/toc.styl +75 -0
  96. package/source/css/_pages/_base/base.styl +68 -0
  97. package/source/css/_pages/_base/color-schema.styl +75 -0
  98. package/source/css/_pages/_base/inline.styl +51 -0
  99. package/source/css/_pages/_base/keyframes.styl +31 -0
  100. package/source/css/_pages/_base/print.styl +38 -0
  101. package/source/css/_pages/_category/category-bar.styl +58 -0
  102. package/source/css/_pages/_category/category-chain.styl +6 -0
  103. package/source/css/_pages/_category/category-list.styl +62 -0
  104. package/source/css/_pages/_index/index.styl +75 -0
  105. package/source/css/_pages/_links/links.styl +79 -0
  106. package/source/css/_pages/_post/comment.styl +27 -0
  107. package/source/css/_pages/_post/highlight.styl +75 -0
  108. package/source/css/_pages/_post/markdown.styl +96 -0
  109. package/source/css/_pages/_post/post-page.styl +179 -0
  110. package/source/css/_pages/_post/post-tag.styl +29 -0
  111. package/source/css/_pages/_tag/tag.styl +9 -0
  112. package/source/css/_pages/_tag/tags.styl +9 -0
  113. package/source/css/_pages/pages.styl +8 -0
  114. package/source/css/_variables/base.styl +72 -0
  115. package/source/css/gitalk.css +546 -0
  116. package/source/css/main.styl +19 -0
  117. package/source/img/avatar.png +0 -0
  118. package/source/img/default.jpg +0 -0
  119. package/source/img/default1.jpg +0 -0
  120. package/source/img/default2.jpg +0 -0
  121. package/source/img/default3.jpg +0 -0
  122. package/source/img/default4.jpg +0 -0
  123. package/source/img/default5.jpg +0 -0
  124. package/source/img/default6.jpg +0 -0
  125. package/source/img/default7.jpg +0 -0
  126. package/source/img/default8.jpg +0 -0
  127. package/source/img/docs.png +0 -0
  128. package/source/img/loading.gif +0 -0
  129. package/source/img/police_beian.png +0 -0
  130. package/source/js/color-schema.js +279 -0
  131. package/source/js/events.js +72 -0
  132. package/source/js/img-lazyload.js +10 -0
  133. package/source/js/local-search.js +70 -0
  134. package/source/js/post/copying-code.js +34 -0
  135. package/source/js/post/enable.js +8 -0
  136. package/source/js/post/img-swipe-bf.js +47 -0
  137. package/source/js/post/img-swipe.js +35 -0
  138. package/source/js/post/mermaiding.js +13 -0
  139. package/source/js/post/play-imgs.js +59 -0
  140. package/source/js/post/toc.js +24 -0
  141. package/source/js/post/view-imgs.js +27 -0
  142. package/source/js/utils.js +245 -0
  143. package/source/xml/local-search.xml +45 -0
  144. package/templates/footer.ejs +13 -0
  145. package/templates/noun.vue +18 -0
@@ -0,0 +1,69 @@
1
+ name: '简体中文'
2
+
3
+ home:
4
+ menu: '首页'
5
+ title: '首页'
6
+
7
+ archive:
8
+ menu: '归档'
9
+ title: '归档'
10
+ subtitle: '归档'
11
+ post_total: '共计 %d 篇文章'
12
+
13
+ category:
14
+ menu: '分类'
15
+ title: '分类'
16
+ subtitle: '分类'
17
+ post_total: '共计 %d 篇文章'
18
+ more: 'More...'
19
+
20
+ tag:
21
+ menu: '标签'
22
+ title: '标签'
23
+ subtitle: '标签'
24
+ post_total: '共计 %d 篇文章'
25
+
26
+ about:
27
+ menu: '关于'
28
+ title: '关于'
29
+ subtitle: '关于'
30
+
31
+ links:
32
+ menu: '友链'
33
+ title: '友链'
34
+ subtitle: '友情链接'
35
+
36
+ page404:
37
+ menu: '页面不存在'
38
+ title: '页面不存在'
39
+ subtitle: '页面不存在'
40
+
41
+ post:
42
+ toc: '目录'
43
+ prev_post: '上一篇'
44
+ next_post: '下一篇'
45
+ updated: '本文最后更新于:%s'
46
+ meta:
47
+ wordcount: '%s 字'
48
+ min2read: '%s 分钟'
49
+ views: ' 次'
50
+ copyright:
51
+ author: '作者'
52
+ posted: '发布于'
53
+ updated: '更新于'
54
+ licensed: '许可协议'
55
+ CC: 'CC - 知识共享许可协议'
56
+ BY: 'BY - 署名'
57
+ SA: 'SA - 相同方式共享'
58
+ NC: 'NC - 非商业性使用'
59
+ ND: 'ND - 禁止演绎'
60
+
61
+ footer:
62
+ pv: '总访问量 {} 次'
63
+ uv: '总访客数 {} 人'
64
+
65
+ search:
66
+ title: '搜索'
67
+ keyword: '关键词'
68
+
69
+ noscript_warning: '博客在允许 JavaScript 运行的环境下浏览效果更佳'
@@ -0,0 +1,69 @@
1
+ name: '繁體中文'
2
+
3
+ home:
4
+ menu: '首頁'
5
+ title: '首頁'
6
+
7
+ archive:
8
+ menu: '歸檔'
9
+ title: '歸檔'
10
+ subtitle: '歸檔'
11
+ post_total: '共有 %d 篇文章'
12
+
13
+ category:
14
+ menu: '分類'
15
+ title: '分類'
16
+ subtitle: '分類'
17
+ post_total: '共有 %d 篇文章'
18
+ more: 'More...'
19
+
20
+ tag:
21
+ menu: '標籤'
22
+ title: '標籤'
23
+ subtitle: '標籤'
24
+ post_total: '共有 %d 篇文章'
25
+
26
+ about:
27
+ menu: '關於'
28
+ title: '關於'
29
+ subtitle: '關於'
30
+
31
+ links:
32
+ menu: '連結'
33
+ title: '交換連結'
34
+ subtitle: '交換連結'
35
+
36
+ page404:
37
+ menu: '頁面不存在'
38
+ title: '頁面不存在'
39
+ subtitle: '頁面不存在'
40
+
41
+ post:
42
+ toc: '目錄'
43
+ prev_post: '上一篇'
44
+ next_post: '下一篇'
45
+ updated: '本文最後更新於:%s'
46
+ meta:
47
+ wordcount: '%s 字'
48
+ min2read: '%s 分鐘'
49
+ views: '{} 次'
50
+ copyright:
51
+ author: '作者'
52
+ posted: '發布於'
53
+ updated: '更新於'
54
+ licensed: '許可協議'
55
+ CC: 'CC - 知識共享許可協議'
56
+ BY: 'BY - 署名'
57
+ SA: 'SA - 相同方式共享'
58
+ NC: 'NC - 非商業性使用'
59
+ ND: 'ND - 禁止演繹'
60
+
61
+ footer:
62
+ pv: '總訪問量 {} 次'
63
+ uv: '總訪客數 {} 人'
64
+
65
+ search:
66
+ title: '搜尋'
67
+ keyword: '關鍵字'
68
+
69
+ noscript_warning: '博客在允許 JavaScript 運行的環境下瀏覽效果更佳'
@@ -0,0 +1,69 @@
1
+ name: '正體中文'
2
+
3
+ home:
4
+ menu: '首頁'
5
+ title: '首頁'
6
+
7
+ archive:
8
+ menu: '歸檔'
9
+ title: '歸檔'
10
+ subtitle: '歸檔'
11
+ post_total: '共有 %d 篇文章'
12
+
13
+ category:
14
+ menu: '分類'
15
+ title: '分類'
16
+ subtitle: '分類'
17
+ post_total: '共有 %d 篇文章'
18
+ more: 'More...'
19
+
20
+ tag:
21
+ menu: '標籤'
22
+ title: '標籤'
23
+ subtitle: '標籤'
24
+ post_total: '共有 %d 篇文章'
25
+
26
+ about:
27
+ menu: '關於'
28
+ title: '關於'
29
+ subtitle: '關於'
30
+
31
+ links:
32
+ menu: '連結'
33
+ title: '交換連結'
34
+ subtitle: '交換連結'
35
+
36
+ page404:
37
+ menu: '頁面不存在'
38
+ title: '頁面不存在'
39
+ subtitle: '頁面不存在'
40
+
41
+ post:
42
+ toc: '目錄'
43
+ prev_post: '上一篇'
44
+ next_post: '下一篇'
45
+ updated: '本文最後更新於:%s'
46
+ meta:
47
+ wordcount: '%s 字'
48
+ min2read: '%s 分鐘'
49
+ views: '{} 次'
50
+ copyright:
51
+ author: '作者'
52
+ posted: '發布於'
53
+ updated: '更新於'
54
+ licensed: '許可協議'
55
+ CC: 'CC - 知識共享許可協議'
56
+ BY: 'BY - 署名'
57
+ SA: 'SA - 相同方式共享'
58
+ NC: 'NC - 非商業性使用'
59
+ ND: 'ND - 禁止演繹'
60
+
61
+ footer:
62
+ pv: '總訪問量 {} 次'
63
+ uv: '總訪客數 {} 人'
64
+
65
+ search:
66
+ title: '搜尋'
67
+ keyword: '關鍵字'
68
+
69
+ noscript_warning: '博客在允許 JavaScript 運行的環境下瀏覽效果更佳'
package/layout/404.ejs ADDED
@@ -0,0 +1,8 @@
1
+ <%
2
+ page.layout = "404"
3
+ page.title = __('page404.title')
4
+ page.subtitle = __('page404.subtitle')
5
+ page.banner_img = theme.banner_img
6
+ page.banner_img_height = 80
7
+ page.banner_mask_alpha = 0.3
8
+ %>
@@ -0,0 +1,17 @@
1
+ <div class="list-group">
2
+ <p class="fs-2 fw-bold"><%= __(params.key + '.post_total', params.postTotal) %></p>
3
+ <hr>
4
+ <% var dateCursor %>
5
+ <% page.posts.each(function (post) { %>
6
+ <% if(date(post.date, "YYYY") !== dateCursor) { %>
7
+ <% dateCursor = date(post.date, "YYYY") %>
8
+ <p class="fs-3 fw-bold"><%= dateCursor %></p>
9
+ <% } %>
10
+ <a href="<%= url_for(post.path) %>" class="list-group-item list-group-item-action">
11
+ <time><%= date(post.date, "MM-DD") %></time>
12
+ <div class="list-group-item-title"><%= post.title %></div>
13
+ </a>
14
+ <% }) %>
15
+ </div>
16
+
17
+ <%- partial('_partials/paginator') %>
@@ -0,0 +1,19 @@
1
+ <% function render_category_chain(cat) { %>
2
+ <a href="<%= url_for(cat.path) %>" class="category-chain-item"><%= cat.name.trim() %></a>
3
+ <% var nextCats = categories.find({ parent: cat._id }).sort(config.index_generator.order_by || 'name').filter(cat => cat.length) %>
4
+ <% if (nextCats.length > 0) { %>
5
+ <span>></span>
6
+ <%- render_category_chain(nextCats.data[0]) %>
7
+ <% } %>
8
+ <% } %>
9
+
10
+ <span class="category-chains">
11
+ <% var catsFirst = categories.find({ parent: { $exists: false } }).sort(config.index_generator.order_by || 'name').filter(cat => cat.length) %>
12
+ <% catsFirst.each((cat, idx) => { %>
13
+ <% if (typeof(limit) === "undefined" || idx < limit) { %>
14
+ <span class="category-chain">
15
+ <%- render_category_chain(cat) %>
16
+ </span>
17
+ <% } %>
18
+ <% }) %>
19
+ </span>
@@ -0,0 +1,62 @@
1
+ <% function render_categories(curCats, params = {}, depth = 0) { %>
2
+ <% return curCats.each((cat) => { %>
3
+ <% var subCats = site.categories.find({ parent: cat._id }).sort(params.orderBy || 'name').filter(cat => cat.length) %>
4
+ <% var collapsed = subCats.length === 0 %>
5
+ <% if ((params.filterIds || []).includes(cat._id)) collapsed = false %>
6
+ <div class="<%= depth <= 0 ? 'category' : 'category-sub' %> row nomargin-x">
7
+ <a class="<%= depth <= 0 ? 'category-item' : 'category-subitem' %> <%= collapsed ? 'collapsed' : '' %>
8
+ list-group-item category-item-action col-10 col-md-11 col-xm-11" title="<%= cat.name.trim() %>"
9
+ id="heading-<%= md5(cat.name) %>" role="tab" data-bs-toggle="collapse" href="#collapse-<%= md5(cat.name) %>"
10
+ aria-expanded="<%= collapsed ? 'false' : 'true' %>"
11
+ >
12
+ <%= cat.name.trim() %>
13
+ <span class="list-group-count"><%= params.type === 'post' ? `(${ cat.posts.length })` : '' %></span>
14
+ <i class="iconfont icon-arrowright"></i>
15
+ </a>
16
+ <% if(params.type !== 'post') { %>
17
+ <a href="<%= url_for(cat.path) %>" class="category-count col-2 col-md-1 col-xm-1">
18
+ <i class="iconfont icon-articles"></i>
19
+ <span><%= cat.posts.length %></span>
20
+ </a>
21
+ <% } %>
22
+ <div class="category-collapse collapse <%= collapsed ? '' : 'show' %>" id="collapse-<%= md5(cat.name) %>"
23
+ role="tabpanel" aria-labelledby="heading-<%= md5(cat.name) %>">
24
+ <% var posts = cat.posts.sort(params.postOrderBy || '-date') %>
25
+ <% if (subCats.length > 0) { %>
26
+ <% var filteredPosts = posts.filter((p) => {
27
+ return p.categories.filter(catOnPost => catOnPost.parent === cat._id).length === 0;
28
+ }) %>
29
+ <%- render_posts(filteredPosts, cat, params) %>
30
+ <%- render_categories(subCats, params, depth + 1) %>
31
+ <% } else { %>
32
+ <%- render_posts(posts, cat, params) %>
33
+ <% } %>
34
+ </div>
35
+ </div>
36
+ <% }) %>
37
+ <% } %>
38
+
39
+ <% function render_posts(posts, cat, params) { %>
40
+ <div class="category-post-list">
41
+ <% var limit = params.postLimit %>
42
+ <% for (var idx = 0; idx < posts.length; idx++) { %>
43
+ <% var post = posts.data[idx] %>
44
+ <% if (idx && limit && idx >= limit) { %>
45
+ <a href="<%= url_for(cat.path) %>" class="list-group-item list-group-item-action">
46
+ <span class="category-post"><%- __('category.more') %></span>
47
+ </a>
48
+ <% break %>
49
+ <% } else { %>
50
+ <a href="<%= url_for(post.path) %>" title="<%= post.title %>"
51
+ class="list-group-item list-group-item-action
52
+ <%= (params.filterIds || []).includes(post._id) ? 'active' : '' %>">
53
+ <span class="category-post"><%= post.title %></span>
54
+ </a>
55
+ <% } %>
56
+ <% } %>
57
+ </div>
58
+ <% } %>
59
+
60
+ <div class="category-list">
61
+ <%- render_categories(curCats, params) %>
62
+ </div>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+ <% } %>
@@ -0,0 +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
+
10
+ <%- my_post_css(page) %>