hexo-theme-lnote 1.2.4 → 1.2.5

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.
Files changed (136) hide show
  1. package/README.md +122 -122
  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 +4 -0
  6. package/languages/de.yml +69 -69
  7. package/languages/en.yml +69 -69
  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 +69 -69
  13. package/languages/zh-HK.yml +69 -69
  14. package/languages/zh-TW.yml +69 -69
  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 -0
  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 -7
  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 -70
  76. package/source/css/_functions/base.styl +8 -8
  77. package/source/css/_mixins/base.styl +23 -23
  78. package/source/css/_pages/_about/about.styl +32 -32
  79. package/source/css/_pages/_archive/archive.styl +32 -32
  80. package/source/css/_pages/_base/_widget/anchorjs.styl +8 -8
  81. package/source/css/_pages/_base/_widget/banner.styl +29 -29
  82. package/source/css/_pages/_base/_widget/board.styl +11 -11
  83. package/source/css/_pages/_base/_widget/code-widget.styl +37 -36
  84. package/source/css/_pages/_base/_widget/copyright.styl +91 -90
  85. package/source/css/_pages/_base/_widget/footer.styl +65 -65
  86. package/source/css/_pages/_base/_widget/footnote.styl +26 -25
  87. package/source/css/_pages/_base/_widget/header.styl +173 -173
  88. package/source/css/_pages/_base/_widget/modal.styl +100 -100
  89. package/source/css/_pages/_base/_widget/navlink.styl +15 -15
  90. package/source/css/_pages/_base/_widget/ngrogress.styl +12 -12
  91. package/source/css/_pages/_base/_widget/noscript.styl +13 -12
  92. package/source/css/_pages/_base/_widget/pagination.styl +23 -23
  93. package/source/css/_pages/_base/_widget/qrcode.styl +17 -17
  94. package/source/css/_pages/_base/_widget/scroll-btn.styl +48 -48
  95. package/source/css/_pages/_base/_widget/text.styl +20 -19
  96. package/source/css/_pages/_base/_widget/toc.styl +75 -75
  97. package/source/css/_pages/_base/base.styl +68 -68
  98. package/source/css/_pages/_base/color-schema.styl +75 -75
  99. package/source/css/_pages/_base/inline.styl +51 -51
  100. package/source/css/_pages/_base/keyframes.styl +31 -31
  101. package/source/css/_pages/_base/print.styl +39 -38
  102. package/source/css/_pages/_category/category-bar.styl +58 -58
  103. package/source/css/_pages/_category/category-chain.styl +6 -6
  104. package/source/css/_pages/_category/category-list.styl +62 -62
  105. package/source/css/_pages/_index/index.styl +75 -75
  106. package/source/css/_pages/_links/links.styl +80 -79
  107. package/source/css/_pages/_post/comment.styl +28 -27
  108. package/source/css/_pages/_post/highlight.styl +75 -75
  109. package/source/css/_pages/_post/markdown.styl +96 -96
  110. package/source/css/_pages/_post/post-page.styl +179 -179
  111. package/source/css/_pages/_post/post-plugin.styl +10 -0
  112. package/source/css/_pages/_post/post-tag.styl +43 -29
  113. package/source/css/_pages/_tag/tags.styl +9 -9
  114. package/source/css/_pages/pages.styl +8 -8
  115. package/source/css/_variables/base.styl +72 -72
  116. package/source/css/gitalk.css +546 -546
  117. package/source/css/main.styl +19 -19
  118. package/source/js/color-schema.js +279 -279
  119. package/source/js/events.js +72 -72
  120. package/source/js/img-lazyload.js +10 -10
  121. package/source/js/local-search.js +70 -70
  122. package/source/js/post/copying-code.js +34 -34
  123. package/source/js/post/enable.js +6 -6
  124. package/source/js/post/img-swipe-bf.js +47 -47
  125. package/source/js/post/img-swipe.js +81 -35
  126. package/source/js/post/mermaiding.js +9 -9
  127. package/source/js/post/play-imgs.js +58 -58
  128. package/source/js/post/toc.js +24 -24
  129. package/source/js/post/view-imgs.js +27 -27
  130. package/source/js/utils.js +245 -245
  131. package/source/xml/local-search.xml +45 -45
  132. package/templates/footer.ejs +12 -12
  133. package/templates/noun.vue +14 -17
  134. package/templates/utils/uri.ts +12 -0
  135. package/scripts/index.js +0 -1
  136. package/source/css/_pages/_tag/tag.styl +0 -9
@@ -1,50 +1,50 @@
1
- <%
2
- var license = 'BY'
3
- if (typeof page.copyright === 'string') {
4
- license = page.copyright
5
- } else if (typeof page.license === 'string') {
6
- license = page.license
7
- }
8
- license = license.toUpperCase()
9
- %>
10
-
11
- <div class="license-box my-3">
12
- <div class="license-title">
13
- <div><%= page.title %></div>
14
- <div><%= decode_url(page.permalink) %></div>
15
- </div>
16
- <div class="license-meta">
17
- <div class="license-meta-item">
18
- <div><%- __('post.copyright.author') %></div>
19
- <div><%- page.author || config.author %></div>
20
- </div>
21
- <div class="license-meta-item license-meta-date">
22
- <div><%- __('post.copyright.posted') %></div>
23
- <div><%= full_date(page.date, 'LL') %></div>
24
- </div>
25
- <div class="license-meta-item license-meta-date">
26
- <div><%- __('post.copyright.updated') %></div>
27
- <div><%= full_date(page.updated, 'LL') %></div>
28
- </div>
29
- <% if (license) { %>
30
- <div class="license-meta-item">
31
- <div><%- __('post.copyright.licensed') %></div>
32
- <div>
33
- <% if (['BY', 'BY-SA', 'BY-ND', 'BY-NC', 'BY-NC-SA', 'BY-NC-ND'].indexOf(license) !== -1) { %>
34
- <% var items = license.split('-') %>
35
- <% for (var idx = 0; idx < items.length; idx++) { %>
36
- <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/<%= license.toLowerCase() %>/4.0/">
37
- <span class="hint--top hint--rounded" aria-label="<%- __('post.copyright.' + items[idx]) %>">
38
- <i class="iconfont icon-<%= items[idx].toLowerCase() %>"></i>
39
- </span>
40
- </a>
41
- <% } %>
42
- <% } else { %>
43
- <%- license %>
44
- <% } %>
45
- </div>
46
- </div>
47
- <% } %>
48
- </div>
49
- <div class="license-icon iconfont"></div>
50
- </div>
1
+ <%
2
+ var license = 'BY'
3
+ if (typeof page.copyright === 'string') {
4
+ license = page.copyright
5
+ } else if (typeof page.license === 'string') {
6
+ license = page.license
7
+ }
8
+ license = license.toUpperCase()
9
+ %>
10
+
11
+ <div class="license-box my-3">
12
+ <div class="license-title">
13
+ <div><%= page.title %></div>
14
+ <div><%= decode_url(page.permalink) %></div>
15
+ </div>
16
+ <div class="license-meta">
17
+ <div class="license-meta-item">
18
+ <div><%- __('post.copyright.author') %></div>
19
+ <div><%- page.author || config.author %></div>
20
+ </div>
21
+ <div class="license-meta-item license-meta-date">
22
+ <div><%- __('post.copyright.posted') %></div>
23
+ <div><%= full_date(page.date, 'LL') %></div>
24
+ </div>
25
+ <div class="license-meta-item license-meta-date">
26
+ <div><%- __('post.copyright.updated') %></div>
27
+ <div><%= full_date(page.updated, 'LL') %></div>
28
+ </div>
29
+ <% if (license) { %>
30
+ <div class="license-meta-item">
31
+ <div><%- __('post.copyright.licensed') %></div>
32
+ <div>
33
+ <% if (['BY', 'BY-SA', 'BY-ND', 'BY-NC', 'BY-NC-SA', 'BY-NC-ND'].indexOf(license) !== -1) { %>
34
+ <% var items = license.split('-') %>
35
+ <% for (var idx = 0; idx < items.length; idx++) { %>
36
+ <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/<%= license.toLowerCase() %>/4.0/">
37
+ <span class="hint--top hint--rounded" aria-label="<%- __('post.copyright.' + items[idx]) %>">
38
+ <i class="iconfont icon-<%= items[idx].toLowerCase() %>"></i>
39
+ </span>
40
+ </a>
41
+ <% } %>
42
+ <% } else { %>
43
+ <%- license %>
44
+ <% } %>
45
+ </div>
46
+ </div>
47
+ <% } %>
48
+ </div>
49
+ <div class="license-icon iconfont"></div>
50
+ </div>
@@ -1,4 +1,4 @@
1
- <% if(is_post()) { %>
2
- <link id="highlight-css" rel="stylesheet" href="//lib.baomitu.com/highlight.js/11.9.0/styles/qtcreator-light.min.css">
3
- <link id="highlight-css-dark" rel="stylesheet" href="//lib.baomitu.com/highlight.js/11.9.0/styles/qtcreator-dark.min.css">
1
+ <% if(is_post()) { %>
2
+ <link id="highlight-css" rel="stylesheet" href="//lib.baomitu.com/highlight.js/11.9.0/styles/qtcreator-light.min.css">
3
+ <link id="highlight-css-dark" rel="stylesheet" href="//lib.baomitu.com/highlight.js/11.9.0/styles/qtcreator-dark.min.css">
4
4
  <% } %>
@@ -1,16 +1,16 @@
1
- <div class="post-metas my-3">
2
- <% if (page.categories && page.categories.length > 0) { %>
3
- <div class="post-meta mr-3 d-flex align-items-center">
4
- <i class="iconfont icon-category"></i>
5
- <%- partial('_partials/category-chains', { categories: page.categories }) %>
6
- </div>
7
- <% } %>
8
- <% if (page.tags && page.tags.length > 0 ) { %>
9
- <div class="post-meta">
10
- <i class="iconfont icon-tags"></i>
11
- <% page.tags.each(function(tag) { %>
12
- <a href="<%= url_for(tag.path) %>" class="print-no-link">#<%- tag.name %></a>
13
- <% }) %>
14
- </div>
15
- <% } %>
16
- </div>
1
+ <div class="post-metas my-3">
2
+ <% if (page.categories && page.categories.length > 0) { %>
3
+ <div class="post-meta mr-3 d-flex align-items-center">
4
+ <i class="iconfont icon-category"></i>
5
+ <%- partial('_partials/category-chains', { categories: page.categories }) %>
6
+ </div>
7
+ <% } %>
8
+ <% if (page.tags && page.tags.length > 0 ) { %>
9
+ <div class="post-meta">
10
+ <i class="iconfont icon-tags"></i>
11
+ <% page.tags.each(function(tag) { %>
12
+ <a href="<%= url_for(tag.path) %>" class="print-no-link">#<%- tag.name %></a>
13
+ <% }) %>
14
+ </div>
15
+ <% } %>
16
+ </div>
@@ -1,28 +1,28 @@
1
- <div class="mt-3">
2
- <span class="post-meta">
3
- <i class="iconfont icon-date-fill" aria-hidden="true"></i>
4
- <time datetime="<%= full_date(page.date, 'YYYY-MM-DD HH:mm') %>" pubdate>
5
- <%= full_date(page.date, 'LLLL') %>
6
- </time>
7
- </span>
8
- </div>
9
-
10
- <div class="mt-1">
11
- <span class="post-meta mr-2">
12
- <i class="iconfont icon-chart"></i>
13
- <%- __('post.meta.wordcount', wordcount(page)) %>
14
- </span>
15
-
16
- <span class="post-meta mr-2">
17
- <i class="iconfont icon-clock-fill"></i>
18
- <% var awl = parseInt(2, 10) %>
19
- <% var wpm = parseInt(60, 10) %>
20
- <%- __('post.meta.min2read', min2read(page, { awl: awl, wpm: wpm })) %>
21
- </span>
22
-
23
- <span id="busuanzi_container_page_pv" style="display: none">
24
- <i class="iconfont icon-eye" aria-hidden="true"></i>
25
- <span id="busuanzi_value_site_pv"></span>
26
- <%- __('post.meta.views') %>
27
- </span>
1
+ <div class="mt-3">
2
+ <span class="post-meta">
3
+ <i class="iconfont icon-date-fill" aria-hidden="true"></i>
4
+ <time datetime="<%= full_date(page.date, 'YYYY-MM-DD HH:mm') %>" pubdate>
5
+ <%= full_date(page.date, 'LLLL') %>
6
+ </time>
7
+ </span>
8
+ </div>
9
+
10
+ <div class="mt-1">
11
+ <span class="post-meta mr-2">
12
+ <i class="iconfont icon-chart"></i>
13
+ <%- __('post.meta.wordcount', wordcount(page)) %>
14
+ </span>
15
+
16
+ <span class="post-meta mr-2">
17
+ <i class="iconfont icon-clock-fill"></i>
18
+ <% var awl = parseInt(2, 10) %>
19
+ <% var wpm = parseInt(60, 10) %>
20
+ <%- __('post.meta.min2read', min2read(page, { awl: awl, wpm: wpm })) %>
21
+ </span>
22
+
23
+ <!-- <span id="busuanzi_container_page_pv" style="display: none">
24
+ <i class="iconfont icon-eye" aria-hidden="true"></i>
25
+ <span id="busuanzi_value_site_pv"></span>
26
+ <%#- __('post.meta.views') %>
27
+ </span> -->
28
28
  </div>
@@ -1,8 +1,9 @@
1
- <% if(is_post()) { %>
2
- <%- post_html_link('tocbot') %>
3
- <%- post_html_link('clipboard') %>
4
- <%- post_html_link('photoswipe') %>
5
- <%- post_html_link('enable') %>
6
- <script crossorigin="anonymous" integrity="sha512-G2PbtRp8Sjlvy8e+LxaLxtcpLfMtZTCgnpyHwc17gbFoMrhxdcFmUmuAmv9KWNTVaYOqXq6pPqCebgxcMYnCEw==" src="//lib.baomitu.com/busuanzi/2.3.0/bsz.pure.mini.min.js" defer></script>
7
- <%- partial('_partials/plugins/mermaid.ejs') %>
1
+ <% if(is_post()) { %>
2
+ <%- post_html_link('tocbot') %>
3
+ <%- post_html_link('clipboard') %>
4
+ <%- post_html_link('photoswipe') %>
5
+ <%- post_html_link('enable') %>
6
+ <!-- <script crossorigin="anonymous" integrity="sha512-G2PbtRp8Sjlvy8e+LxaLxtcpLfMtZTCgnpyHwc17gbFoMrhxdcFmUmuAmv9KWNTVaYOqXq6pPqCebgxcMYnCEw==" src="//lib.baomitu.com/busuanzi/2.3.0/bsz.pure.mini.min.js" defer></script> -->
7
+ <%- partial('_partials/plugins/mermaid.ejs') %>
8
+ <%- partial('_partials/plugins/CSR.ejs') %>
8
9
  <% } %>
@@ -1 +1 @@
1
-
1
+
@@ -1,3 +1,3 @@
1
- <aside class="sidebar" style="margin-left: -1rem">
2
- <%- partial('_partials/post/toc') %>
1
+ <aside class="sidebar" style="margin-left: -1rem">
2
+ <%- partial('_partials/post/toc') %>
3
3
  </aside>
@@ -1,7 +1,7 @@
1
- <div id="toc">
2
- <p class="toc-header">
3
- <i class="iconfont icon-list"></i>
4
- <span><%- __('post.toc') %></span>
5
- </p>
6
- <div class="toc-body" id="toc-body"></div>
1
+ <div id="toc">
2
+ <p class="toc-header">
3
+ <i class="iconfont icon-list"></i>
4
+ <span><%- __('post.toc') %></span>
5
+ </p>
6
+ <div class="toc-body" id="toc-body"></div>
7
7
  </div>
@@ -1,10 +1,10 @@
1
- <%- partial('_partials/plugins/nprogress.ejs') %>
2
-
3
- <%- all_html_link('js') %>
4
-
5
- <%- partial('_partials/plugins/typed.ejs') %>
6
- <%- partial('_partials/post/scripts.ejs') %>
7
-
8
- <%# if (theme.custom_js) { %>
9
- <%#- js(theme.custom_js) %>
10
- <%# } %>
1
+ <%- partial('_partials/plugins/nprogress.ejs') %>
2
+
3
+ <%- all_html_link('js') %>
4
+
5
+ <%- partial('_partials/plugins/typed.ejs') %>
6
+ <%- partial('_partials/post/scripts.ejs') %>
7
+
8
+ <%# if (theme.custom_js) { %>
9
+ <%#- js(theme.custom_js) %>
10
+ <%# } %>
@@ -1,19 +1,19 @@
1
- <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="modalSearchLabel"
2
- aria-hidden="true">
3
- <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
4
- <div class="modal-content">
5
- <div class="modal-header text-center">
6
- <h4 class="modal-title w-100 font-weight-bold"><%= __('search.title') %></h4>
7
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
8
- </button>
9
- </div>
10
- <div class="modal-body mx-3">
11
- <div class="md-form mb-5">
12
- <input type="text" id="modalSearchInput" class="form-control validate">
13
- <label data-error="x" data-success="v" for="modalSearchInput"><%= __('search.keyword') %></label>
14
- </div>
15
- <div class="list-group" id="modalSearchResult"></div>
16
- </div>
17
- </div>
18
- </div>
19
- </div>
1
+ <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="modalSearchLabel"
2
+ aria-hidden="true">
3
+ <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
4
+ <div class="modal-content">
5
+ <div class="modal-header text-center">
6
+ <h4 class="modal-title w-100 font-weight-bold"><%= __('search.title') %></h4>
7
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
8
+ </button>
9
+ </div>
10
+ <div class="modal-body mx-3">
11
+ <div class="md-form mb-5">
12
+ <input type="text" id="modalSearchInput" class="form-control validate">
13
+ <label data-error="x" data-success="v" for="modalSearchInput"><%= __('search.keyword') %></label>
14
+ </div>
15
+ <div class="list-group" id="modalSearchResult"></div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
package/layout/about.ejs CHANGED
@@ -1,22 +1,22 @@
1
- <%
2
- page.layout = "about"
3
- page.title = __('about.title')
4
- page.subtitle = __('about.subtitle')
5
- page.banner_img = page.banner_img || theme.banner_img
6
- page.banner_img_height = 60
7
- page.banner_mask_alpha = 0.3
8
- %>
9
-
10
- <div class="text-center">
11
- <div class="about-info">
12
- <div class="about-name"><%- config.author %></div>
13
- <div class="about-intro"><%- config.description %></div>
14
- </div>
15
- </div>
16
-
17
- <article class="about-content page-content mt-5">
18
- <div class="markdown-body">
19
- <%- page.content %>
20
- </div>
21
- </article>
22
-
1
+ <%
2
+ page.layout = "about"
3
+ page.title = __('about.title')
4
+ page.subtitle = __('about.subtitle')
5
+ page.banner_img = page.banner_img || theme.banner_img
6
+ page.banner_img_height = 60
7
+ page.banner_mask_alpha = 0.3
8
+ %>
9
+
10
+ <div class="text-center">
11
+ <div class="about-info">
12
+ <div class="about-name"><%- config.author %></div>
13
+ <div class="about-intro"><%- config.description %></div>
14
+ </div>
15
+ </div>
16
+
17
+ <article class="about-content page-content mt-5">
18
+ <div class="markdown-body">
19
+ <%- page.content %>
20
+ </div>
21
+ </article>
22
+
@@ -1,10 +1,10 @@
1
- <%
2
- page.layout = "archive"
3
- page.title = __('archive.title')
4
- page.subtitle = __('archive.subtitle')
5
- page.banner_img = theme.banner_img
6
- page.banner_img_height = 60
7
- page.banner_mask_alpha = 0.3
8
- %>
9
-
10
- <%- partial('_partials/archive-list.ejs', { params: { key: page.layout, postTotal: site.posts.length } }) %>
1
+ <%
2
+ page.layout = "archive"
3
+ page.title = __('archive.title')
4
+ page.subtitle = __('archive.subtitle')
5
+ page.banner_img = theme.banner_img
6
+ page.banner_img_height = 60
7
+ page.banner_mask_alpha = 0.3
8
+ %>
9
+
10
+ <%- partial('_partials/archive-list.ejs', { params: { key: page.layout, postTotal: site.posts.length } }) %>
@@ -1,20 +1,20 @@
1
- <%
2
- page.layout = 'categories'
3
- page.title = __('category.title')
4
- page.subtitle = __('category.subtitle')
5
- page.banner_img = theme.banner_img
6
- page.banner_img_height = 60
7
- page.banner_mask_alpha = 0.3
8
- // 排序,前面带减号是倒序,不带减号是正序
9
- var orderBy = '-length' || 'name'
10
- var curCats = site.categories.find({ parent: { $exists: false } }).sort(orderBy).filter(cat => cat.length)
11
- %>
12
-
13
- <%- partial('_partials/category-list', {
14
- curCats: curCats,
15
- params: {
16
- orderBy: orderBy,
17
- postLimit : 10,
18
- postOrderBy: orderBy || config.index_generator.order_by
19
- }
20
- }) %>
1
+ <%
2
+ page.layout = 'categories'
3
+ page.title = __('category.title')
4
+ page.subtitle = __('category.subtitle')
5
+ page.banner_img = theme.banner_img
6
+ page.banner_img_height = 60
7
+ page.banner_mask_alpha = 0.3
8
+ // 排序,前面带减号是倒序,不带减号是正序
9
+ var orderBy = '-length' || 'name'
10
+ var curCats = site.categories.find({ parent: { $exists: false } }).sort(orderBy).filter(cat => cat.length)
11
+ %>
12
+
13
+ <%- partial('_partials/category-list', {
14
+ curCats: curCats,
15
+ params: {
16
+ orderBy: orderBy,
17
+ postLimit : 10,
18
+ postOrderBy: orderBy || config.index_generator.order_by
19
+ }
20
+ }) %>
@@ -1,12 +1,12 @@
1
- <%
2
- page.layout = "category"
3
- page.title = [__('category.title'), page.category].join(" - ")
4
- page.subtitle = [__('category.subtitle'), page.category].join(" - ")
5
- page.banner_img = theme.banner_img
6
- page.banner_img_height = 60
7
- page.banner_mask_alpha = 0.3
8
-
9
- var cat = site.categories.find({name: page.category}).filter(cat => cat.length).data[0]
10
- %>
11
-
12
- <%- partial('_partials/archive-list.ejs', { params: { key: page.layout, postTotal: cat ? cat.posts.length : 0 } }) %>
1
+ <%
2
+ page.layout = "category"
3
+ page.title = [__('category.title'), page.category].join(" - ")
4
+ page.subtitle = [__('category.subtitle'), page.category].join(" - ")
5
+ page.banner_img = theme.banner_img
6
+ page.banner_img_height = 60
7
+ page.banner_mask_alpha = 0.3
8
+
9
+ var cat = site.categories.find({name: page.category}).filter(cat => cat.length).data[0]
10
+ %>
11
+
12
+ <%- partial('_partials/archive-list.ejs', { params: { key: page.layout, postTotal: cat ? cat.posts.length : 0 } }) %>
package/layout/index.ejs CHANGED
@@ -1,61 +1,61 @@
1
- <%
2
- page.subtitle = config.subtitle
3
- page.banner_img = theme.banner_img
4
- page.banner_img_height = 100
5
- page.banner_mask_alpha = 0.3
6
- %>
7
-
8
- <% page.posts.each(function (post) { %>
9
- <div class="row mx-auto index-card">
10
- <% var post_url = url_for(post.path), index_img = post.index_img %>
11
- <% if (index_img) { %>
12
- <div class="col-12 col-md-4 m-auto index-img">
13
- <a href="<%= post_url %>" target="_self">
14
- <img src="<%= url_for(index_img) %>" alt="<%= post.title %>">
15
- </a>
16
- </div>
17
- <% } %>
18
- <article class="col-12 col-md-<%= index_img ? '8' : '12' %> mx-auto index-info">
19
- <h2 class="index-header">
20
- <% if (post.sticky > 0) { %>
21
- <i class="index-pin iconfont icon-top" title="Pin on top"></i>
22
- <% } %>
23
- <a href="<%= post_url %>" target="_self">
24
- <%= post.title %>
25
- </a>
26
- </h2>
27
-
28
- <% var excerpt = post.description || post.excerpt || post.content %>
29
- <a class="index-excerpt <%= index_img ? '' : 'index-excerpt__noimg' %>" href="<%= post_url %>" target="_self">
30
- <div>
31
- <%- strip_html(excerpt).substring(0, 200).trim().replace(/\n/g, ' ') %>
32
- </div>
33
- </a>
34
-
35
- <div class="index-btm post-metas">
36
- <div class="post-meta mr-3">
37
- <i class="iconfont icon-date"></i>
38
- <time datetime="<%= full_date(post.date, 'YYYY-MM-DD HH:mm') %>" pubdate>
39
- <%- date(post.date, config.date_format) %>
40
- </time>
41
- </div>
42
- <% if (post.categories.length > 0) { %>
43
- <div class="post-meta mr-3 d-flex align-items-center">
44
- <i class="iconfont icon-category"></i>
45
- <%- partial('_partials/category-chains', { categories: post.categories, limit: 1 }) %>
46
- </div>
47
- <% } %>
48
- <% if (post.tags.length > 0) { %>
49
- <div class="post-meta">
50
- <i class="iconfont icon-tags"></i>
51
- <% post.tags.each(function(tag){ %>
52
- <a href="<%= url_for(tag.path) %>">#<%- tag.name %></a>
53
- <% }) %>
54
- </div>
55
- <% } %>
56
- </div>
57
- </article>
58
- </div>
59
- <% }) %>
60
-
61
- <%- partial('_partials/paginator') %>
1
+ <%
2
+ page.subtitle = config.subtitle
3
+ page.banner_img = theme.banner_img
4
+ page.banner_img_height = 100
5
+ page.banner_mask_alpha = 0.3
6
+ %>
7
+
8
+ <% page.posts.each(function (post) { %>
9
+ <div class="row mx-auto index-card">
10
+ <% var post_url = url_for(post.path), index_img = post.index_img %>
11
+ <% if (index_img) { %>
12
+ <div class="col-12 col-md-4 m-auto index-img">
13
+ <a href="<%= post_url %>" target="_self">
14
+ <img src="<%= url_for(index_img) %>" alt="<%= post.title %>">
15
+ </a>
16
+ </div>
17
+ <% } %>
18
+ <article class="col-12 col-md-<%= index_img ? '8' : '12' %> mx-auto index-info">
19
+ <h2 class="index-header">
20
+ <% if (post.sticky > 0) { %>
21
+ <i class="index-pin iconfont icon-top" title="Pin on top"></i>
22
+ <% } %>
23
+ <a href="<%= post_url %>" target="_self">
24
+ <%= post.title %>
25
+ </a>
26
+ </h2>
27
+
28
+ <% var excerpt = post.description || post.excerpt || post.content %>
29
+ <a class="index-excerpt <%= index_img ? '' : 'index-excerpt__noimg' %>" href="<%= post_url %>" target="_self">
30
+ <div>
31
+ <%- strip_html(excerpt).substring(0, 200).trim().replace(/\n/g, ' ') %>
32
+ </div>
33
+ </a>
34
+
35
+ <div class="index-btm post-metas">
36
+ <div class="post-meta mr-3">
37
+ <i class="iconfont icon-date"></i>
38
+ <time datetime="<%= full_date(post.date, 'YYYY-MM-DD HH:mm') %>" pubdate>
39
+ <%- date(post.date, config.date_format) %>
40
+ </time>
41
+ </div>
42
+ <% if (post.categories.length > 0) { %>
43
+ <div class="post-meta mr-3 d-flex align-items-center">
44
+ <i class="iconfont icon-category"></i>
45
+ <%- partial('_partials/category-chains', { categories: post.categories, limit: 1 }) %>
46
+ </div>
47
+ <% } %>
48
+ <% if (post.tags.length > 0) { %>
49
+ <div class="post-meta">
50
+ <i class="iconfont icon-tags"></i>
51
+ <% post.tags.each(function(tag){ %>
52
+ <a href="<%= url_for(tag.path) %>">#<%- tag.name %></a>
53
+ <% }) %>
54
+ </div>
55
+ <% } %>
56
+ </div>
57
+ </article>
58
+ </div>
59
+ <% }) %>
60
+
61
+ <%- partial('_partials/paginator') %>