jekyll-theme-h2o-ac 1.3.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/_config.yml +12 -17
  3. data/_data/collections.yml +2 -2
  4. data/_includes/{footer.html → layouts/footer.html} +9 -4
  5. data/_includes/{post-head.html → layouts/head.html} +36 -29
  6. data/_includes/{header.html → layouts/header.html} +24 -0
  7. data/_includes/layouts/metainfo.html +40 -0
  8. data/_includes/{paginate-article.html → layouts/paginate-article.html} +8 -1
  9. data/_includes/{paginate.html → layouts/paginate.html} +5 -5
  10. data/_includes/{sidebar.html → layouts/sidebar.html} +10 -9
  11. data/_includes/layouts/submenu.html +30 -0
  12. data/_includes/plugins/analytics/analytics.html +3 -0
  13. data/_includes/{analytics.html → plugins/analytics/google.html} +1 -2
  14. data/_includes/plugins/comments/comments_block.html +67 -0
  15. data/_includes/plugins/comments/comments_js.html +24 -0
  16. data/_includes/plugins/comments/disqus.html +19 -0
  17. data/_includes/plugins/comments/waline_css.html +3 -0
  18. data/_includes/plugins/comments/waline_js.html +14 -0
  19. data/_includes/plugins/i18n.html +32 -0
  20. data/_includes/plugins/markdown/fancybox_css.html +1 -0
  21. data/_includes/plugins/markdown/fancybox_js.html +24 -0
  22. data/_includes/plugins/markdown/hotkeys.html +31 -0
  23. data/_includes/plugins/markdown/markdown.html +7 -0
  24. data/_includes/plugins/markdown/mermaid_block.html +10 -0
  25. data/_includes/plugins/markdown/mermaid_js.html +12 -0
  26. data/_includes/plugins/markdown/prism_css.html +16 -0
  27. data/_includes/plugins/markdown/prism_js.html +3 -0
  28. data/_includes/{calendar.html → plugins/others/calendar_block.html} +1 -1
  29. data/_includes/plugins/others/calendar_css.html +3 -0
  30. data/_includes/plugins/others/calendar_js.html +8 -0
  31. data/_includes/plugins/others/social_block.html +5 -0
  32. data/_includes/plugins/others/social_css.html +1 -0
  33. data/_includes/plugins/others/social_js.html +15 -0
  34. data/_includes/plugins/search/docsearch_css.html +3 -0
  35. data/_includes/plugins/search/docsearch_js.html +19 -0
  36. data/_layouts/404.html +17 -0
  37. data/_layouts/archives.html +70 -65
  38. data/_layouts/blog.html +4 -10
  39. data/_layouts/categories.html +3 -1
  40. data/_layouts/default.html +64 -54
  41. data/_layouts/page.html +17 -87
  42. data/_layouts/post.html +145 -434
  43. data/_layouts/stats.html +32 -2
  44. data/_layouts/tags.html +2 -2
  45. data/assets/css/app.min.css +1 -1
  46. data/assets/css/app.min.css.map +1 -1
  47. data/assets/js/app.min.js +1 -1
  48. data/assets/js/app.min.js.map +1 -1
  49. metadata +42 -22
  50. data/_includes/comments.html +0 -53
  51. data/_includes/head.html +0 -51
  52. data/_includes/mermaid.html +0 -12
  53. data/_includes/submenu.html +0 -20
  54. data/_includes/waline.html +0 -3
  55. /data/_includes/{pageNav.html → layouts/pageNav.html} +0 -0
  56. /data/_includes/{toc.html → layouts/toc.html} +0 -0
  57. /data/_includes/{busuanzi.html → plugins/analytics/busuanzi.html} +0 -0
  58. /data/_includes/{umami.html → plugins/analytics/umami.html} +0 -0
  59. /data/_includes/{mathjax.html → plugins/markdown/mathjax.html} +0 -0
  60. /data/_includes/{pwa.html → plugins/others/pwa.html} +0 -0
  61. /data/_includes/{webpusher.html → plugins/others/webpusher.html} +0 -0
@@ -0,0 +1,7 @@
1
+ {% include plugins/markdown/mathjax.html %}
2
+ {% if layout.type == "post" %}
3
+ {% include plugins/markdown/fancybox_js.html %}
4
+ {% endif %}
5
+ {% include plugins/markdown/hotkeys.html %}
6
+ {% include plugins/markdown/mermaid_js.html %}
7
+ {% include plugins/markdown/prism_js.html %}
@@ -0,0 +1,10 @@
1
+ {% if page.mermaid or site.mermaid %}
2
+ <div class="modal">
3
+ <div class="modal-content">
4
+ <header>
5
+ <span class="close">&times;</span>
6
+ </header>
7
+ <div class="container"></div>
8
+ </div>
9
+ </div>
10
+ {% endif%}
@@ -0,0 +1,12 @@
1
+ {% if page.mermaid or site.mermaid %}
2
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script>
3
+ <script>
4
+ $(document).ready(function () {
5
+ mermaid.initialize({
6
+ startOnLoad: true,
7
+ theme: "default",
8
+ });
9
+ mermaid.init(undefined, $('.mermaid2'));
10
+ });
11
+ </script>
12
+ {% endif %}
@@ -0,0 +1,16 @@
1
+ {% assign prisms1 = "coy,dark,funky,okaidia,solarizedlight,tomorrow,twilight" | split: "," %}
2
+ {% assign prisms2 =
3
+ "a11y-dark,atom-dark,base16-ateliersulphurpool.light,cb,coldark-cold,coy-without-shadows,darcula,duotone-dark,duotone-earth,duotone-light,dutone-sea,dutone-space,ghcolors,gruvbox-dark,gruvbox-light,holi-theme,hopscotch,lucario,material-dark,material-light,material-oceanic,night-owl,nord,one-dark,one-light,pojoaque,shades-of-purple,solarized-dark-atom,synthwave84,vs,vsc-dark-plus,xonokai,z-touch"
4
+ | split: "," %}
5
+ {% if prisms1 contains site.prism.theme %}
6
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism-{{site.prism.theme}}.min.css" />
7
+ {% else if prisms2 contains site.prism.theme %}
8
+ <link rel="stylesheet"
9
+ href="https://cdn.jsdelivr.net/npm/prism-themes@1.9.0/themes/prism-{{site.prism.theme}}.min.css" />
10
+ {% else %}
11
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism.min.css" />
12
+ {% endif %}
13
+ {% if site.prism.line_numbers %}
14
+ <link rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/plugins/line-numbers/prism-line-numbers.min.css">
16
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
2
+ <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
3
+ <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
@@ -9,7 +9,7 @@
9
9
  <a id="ex-ghDay-prev" class="button" href="#" aria-label="Prev month">
10
10
  <svg class="icon" aria-hidden="true">
11
11
  <use xlink:href="#icon-left"></use>
12
- </svg>
12
+ </svg>
13
13
  </a>
14
14
  <a id="ex-ghDay-next" class="button" href="#" aria-label="Next month">
15
15
  <svg class="icon" aria-hidden="true">
@@ -0,0 +1,3 @@
1
+ {% if site.calendar %}
2
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/cal-heatmap.min.css">
3
+ {% endif %}
@@ -0,0 +1,8 @@
1
+ {% if site.calendar %}
2
+ <script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
3
+ <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/cal-heatmap.min.js"></script>
4
+ <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
5
+ <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/Tooltip.min.js"></script>
6
+ <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/LegendLite.min.js"></script>
7
+ <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/CalendarLabel.min.js"></script>
8
+ {% endif %}
@@ -0,0 +1,5 @@
1
+ {% if site.social-share %}
2
+ <div class="social-share-wrapper">
3
+ <div class="social-share"></div>
4
+ </div>
5
+ {% endif %}
@@ -0,0 +1 @@
1
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css">
@@ -0,0 +1,15 @@
1
+ <script src="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js"></script>
2
+ <script>
3
+ socialShare('.social-share', {
4
+ sites: [
5
+ {% for i in site.social-share-items %}
6
+ '{{ i }}'{% if forloop.last == false %}, {% endif %}
7
+ {% endfor %}
8
+ ],
9
+ wechatQrcodeTitle: "分享到微信朋友圈",
10
+ wechatQrcodeHelper: '<p>扫码后点击右上角</p><p>将本文分享至朋友圈</p>'
11
+ });
12
+ $("a.social-share-icon").each(function () {
13
+ $(this).attr("aria-label", $(this).attr("class").split(' ')[1])
14
+ });
15
+ </script>
@@ -0,0 +1,3 @@
1
+ {% if site.search and site.search_type == "docsearch" %}
2
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
3
+ {% endif %}
@@ -0,0 +1,19 @@
1
+ {% if site.search and site.search_type == "docsearch" %}
2
+ <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
3
+ <script type="text/javascript">
4
+ docsearch({
5
+ appId: "{{ site.docsearch.appId }}",
6
+ apiKey: "{{ site.docsearch.apiKey }}",
7
+ indexName: "{{ site.docsearch.indexName }}",
8
+ container: 'li#search',
9
+ debug: true,
10
+ });
11
+ docsearch({
12
+ appId: "{{ site.docsearch.appId }}",
13
+ apiKey: "{{ site.docsearch.apiKey }}",
14
+ indexName: "{{ site.docsearch.indexName }}",
15
+ container: '#search-toggle',
16
+ debug: true,
17
+ });
18
+ </script>
19
+ {% endif %}
data/_layouts/404.html ADDED
@@ -0,0 +1,17 @@
1
+ ---
2
+ layout: default
3
+ description: "Sorry, Page Not Found :("
4
+ permalink: /404.html
5
+ ---
6
+
7
+ {% include layouts/header.html %}
8
+
9
+ <header class="g-banner np-banner {{ site.postPatterns | prepend: 'post-pattern-' }}" data-theme="{{ site.theme-color }}">
10
+ <div class="post-wrapper">
11
+ <h1>404</h1>
12
+ <span class="subheading">{{ page.description }}</span>
13
+ <a href="{{ site.nav.home }}" class="btn">Back to home</a>
14
+ </div>
15
+ </header>
16
+
17
+
@@ -12,6 +12,9 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
12
12
  {% assign unpin_posts_num = unpin_posts | size %}
13
13
  {% assign nyear = "1900" %}
14
14
  {% assign total_size = 0 %}
15
+ {% assign lang = page.lang | default: site.default_lang %}
16
+ {% assign locales = site.data.locales[lang] %}
17
+ {% assign panel = locales.panel %}
15
18
 
16
19
  {% for post in site.posts %}
17
20
  {% assign post_size = post.content | strip_html | strip_newlines | remove: " " | size %}
@@ -40,88 +43,90 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
40
43
 
41
44
  <div id="archive-heatmap">
42
45
  <div id="ex-ghDay2" class="calendar-top">
43
- <a id="ex-ghDay-prev2" class="button" href="#">
46
+ <a id="ex-ghDay-prev2" class="button" href="#" aria-label="Calendar heatmap prev">
44
47
  <svg class="icon" aria-hidden="true">
45
48
  <use xlink:href="#icon-left"></use>
46
49
  </svg>
47
50
  </a>
48
- <a id="ex-ghDay-next2" class="button" href="#">
51
+ <a id="ex-ghDay-next2" class="button" href="#" aria-label="Calendar heatmap next">
49
52
  <svg class="icon" aria-hidden="true">
50
53
  <use xlink:href="#icon-right"></use>
51
54
  </svg>
52
55
  </a>
53
- <a id="ex-ghDay-today2" class="button" href="#">
56
+ <a id="ex-ghDay-today2" class="button" href="#" aria-label="Calendar heatmap today">
54
57
  <svg class="icon" aria-hidden="true">
55
58
  <use xlink:href="#icon-rotate"></use>
56
59
  </svg>
57
60
  </a>
58
61
  <div class="legends">
59
- <span class="text">Less</span>
62
+ <span class="text">{{panel.calendar_less}}</span>
60
63
  <div id="ex-ghDay-legend2"></div>
61
- <span class="text">More</span>
64
+ <span class="text">{{panel.calendar_more}}</span>
62
65
  </div>
63
66
  </div>
64
67
  </div>
65
68
 
66
69
  {% assign ssyears = "rat,ox,tiger,rabbit,dragon,snake,horse,goat,monkey,rooster,dog,pig" | split: "," %}
67
70
 
68
- {% if pin_posts_num > 0 %}
69
- <h3>{{ archives.pin.title }}</h3>
70
- <ul>
71
- {% for post in pin_posts %}
72
- <li>
73
- <p class="archives-title">
74
- <span class="archives-date">
75
- {% case site.formats.time %}
76
- {% when 0 %}
77
- {{ post.date | date: "%Y-%m-%d" }}
78
- {% when 1 %}
79
- {{ post.date | date_to_string }}
80
- {% else %}
81
- {{ post.date | date: "%Y年%-m月%-d日" }}
82
- {% endcase %}
83
- </span>
84
- <a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
85
- </p>
86
- </li>
87
- {% endfor %}
88
- {% endif %}
89
-
90
- {% if unpin_posts_num > 0%}
91
- {% for post in unpin_posts %}
92
- {% assign year = post.date | date: '%Y' %}
93
- {% assign animal = year | minus:1900 | modulo:12 %}
94
- {% if year != nyear %}
95
- {% assign nyear = year %}
96
- </ul>
97
- <h3 class="year">{{ post.date | date: '%Y' }}
98
- <span class="icon-item">
99
- <svg class="icon animal" aria-hidden="true">
100
- <use xlink:href="#icon-{{ ssyears[animal] }}"></use>
101
- </svg>
102
- <svg class="icon dz" aria-hidden="true">
103
- <use xlink:href="#icon-{{ ssyears[animal]}}_dz"></use>
104
- </svg>
105
- </span>
106
- </h3>
107
- <ul>
108
- {% endif %}
109
-
110
- <li>
111
- <p class="archives-title">
112
- <span class="archives-date">
113
- {% case site.formats.time %}
114
- {% when 0 %}
115
- {{ post.date | date: "%Y-%m-%d" }}
116
- {% when 1 %}
117
- {{ post.date | date_to_string }}
118
- {% else %}
119
- {{ post.date | date: "%Y年%-m月%-d日" }}
120
- {% endcase %}
121
- </span>
122
- <a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
123
- </p>
124
- </li>
125
- {% endfor %}
126
- {% endif %}
127
- </ul>
71
+ <div id="archive-articles">
72
+ {% if pin_posts_num > 0 %}
73
+ <h3>{{ archives.pin.title }}</h3>
74
+ <ul>
75
+ {% for post in pin_posts %}
76
+ <li>
77
+ <p class="archives-title">
78
+ <span class="archives-date">
79
+ {% case site.formats.time %}
80
+ {% when 0 %}
81
+ {{ post.date | date: "%Y-%m-%d" }}
82
+ {% when 1 %}
83
+ {{ post.date | date_to_string }}
84
+ {% else %}
85
+ {{ post.date | date: "%Y年%-m月%-d日" }}
86
+ {% endcase %}
87
+ </span>
88
+ <a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
89
+ </p>
90
+ </li>
91
+ {% endfor %}
92
+ {% endif %}
93
+
94
+ {% if unpin_posts_num > 0%}
95
+ {% for post in unpin_posts %}
96
+ {% assign year = post.date | date: '%Y' %}
97
+ {% assign animal = year | minus:1900 | modulo:12 %}
98
+ {% if year != nyear %}
99
+ {% assign nyear = year %}
100
+ </ul>
101
+ <h3 class="year">{{ post.date | date: '%Y' }}
102
+ <span class="icon-item">
103
+ <svg class="icon animal" aria-hidden="true">
104
+ <use xlink:href="#icon-{{ ssyears[animal] }}"></use>
105
+ </svg>
106
+ <svg class="icon dz" aria-hidden="true">
107
+ <use xlink:href="#icon-{{ ssyears[animal]}}_dz"></use>
108
+ </svg>
109
+ </span>
110
+ </h3>
111
+ <ul>
112
+ {% endif %}
113
+
114
+ <li>
115
+ <p class="archives-title">
116
+ <span class="archives-date">
117
+ {% case site.formats.time %}
118
+ {% when 0 %}
119
+ {{ post.date | date: "%m-%d" }}
120
+ {% when 1 %}
121
+ {{ post.date | date_to_string }}
122
+ {% else %}
123
+ {{ post.date | date: "%-m月%-d日" }}
124
+ {% endcase %}
125
+ </span>
126
+ <a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
127
+ </p>
128
+ </li>
129
+ {% endfor %}
130
+ {% endif %}
131
+ </ul>
132
+ </div>
data/_layouts/blog.html CHANGED
@@ -4,8 +4,6 @@ home-title: H2O Theme For Jekyll
4
4
  description: 或许是最漂亮的Jekyll主题
5
5
  ---
6
6
 
7
- {% include header.html %}
8
-
9
7
  <div
10
8
  class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}"
11
9
  data-theme="{{ site.theme-color }}"
@@ -17,15 +15,11 @@ description: 或许是最漂亮的Jekyll主题
17
15
 
18
16
  <main class="g-container home-content">
19
17
  <div class="article-list">
20
- {% include paginate.html %}
18
+ {% include layouts/paginate.html %}
21
19
 
22
20
  {% if paginator.total_pages > 1 %}
23
- {% include pageNav.html %}
21
+ {% include layouts/pageNav.html %}
24
22
  {% endif %}
25
23
  </div>
26
-
27
- {% include sidebar.html %}
28
-
29
- </main>
30
-
31
- {% include footer.html %}
24
+ {% include layouts/sidebar.html %}
25
+ </main>
@@ -26,6 +26,7 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
26
26
  {% endif %}
27
27
  </p>
28
28
 
29
+ <div id="archive-articles">
29
30
  {% for category in site.categories %}
30
31
  {% assign category_name = category | first %}
31
32
  <h3 class="category">{{ category[0] }}</h3>
@@ -71,4 +72,5 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
71
72
  </li>
72
73
  {% endfor %}
73
74
  </ul>
74
- {% endif %}
75
+ {% endif %}
76
+ </div>
@@ -1,61 +1,71 @@
1
1
  {% assign lang = page.lang | default: site.default_lang %}
2
2
  <!DOCTYPE html>
3
3
  <html lang="{{ lang }}">
4
- {% include head.html %}
5
-
6
- {% if site.prism.line_numbers %}
7
- <body class="line-numbers" ontouchstart="">
8
- {% else %}
9
- <body ontouchstart="">
10
- {% endif %}
4
+ {% include layouts/head.html %}
5
+ {% if site.prism.line_numbers %}
6
+ <body class="line-numbers" ontouchstart="">
7
+ {% else %}
8
+ <body ontouchstart="">
9
+ {% endif %}
11
10
  <!--[if lt IE 10]>
12
11
  <div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
13
12
  <![endif]-->
14
- {% if site.gray %}
15
- <div id=all class="gray" data-theme="{{ site.theme-color }}">
16
- {% else %}
17
- <div id="all" data-theme="{{ site.theme-color }}">
18
- {% endif %}
19
- <input id="nm-switch" type="hidden" value="{{ site.nightMode }}">
20
- <div class="visible">
21
- {{ content }}
22
- </div>
23
- </div>
24
- {% if page.mermaid or site.mermaid %}
25
- <div class="modal">
26
- <div class="modal-content">
27
- <header>
28
- <span class="close">&times;</span>
29
- </header>
30
- <div class="container"></div>
13
+ {% if layout.type == "post" %}
14
+ {% if site.gray %}
15
+ <div id=all class="post gray" data-theme="{{ site.theme-color }}">
16
+ {% else %}
17
+ <div id="all" class="post" data-theme="{{ site.theme-color }}">
18
+ {% endif %}
19
+ {% assign locales = site.data.locales[lang] %}
20
+ {% assign post = locales.post %}
21
+ <div class="alert-tip" id="no-previous">{{ post.tips.left }}</div>
22
+ <div class="alert-tip" id="no-next">{{ post.tips.right }}</div>
23
+ {% else %}
24
+ {% if site.gray %}
25
+ <div id=all class="gray" data-theme="{{ site.theme-color }}">
26
+ {% else %}
27
+ <div id="all" data-theme="{{ site.theme-color }}">
28
+ {% endif %}
29
+ {% endif %}
30
+ <input id="nm-switch" type="hidden" value="{{ site.nightMode }}">
31
+ {% include layouts/header.html %}
32
+ {{ content }}
33
+ {% include layouts/footer.html %}
31
34
  </div>
32
- </div>
33
- {% endif%}
34
- <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
35
- <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
36
- {% if site.calendar %}
37
- <script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
38
- <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/cal-heatmap.min.js"></script>
39
- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
40
- <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/Tooltip.min.js"></script>
41
- <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/LegendLite.min.js"></script>
42
- <script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/CalendarLabel.min.js"></script>
43
- {% endif %}
44
- <script src="https://cdn.jsdelivr.net/npm/clipboard/dist/clipboard.min.js"></script>
45
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
46
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
47
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
48
- <script src="{{ "/assets/js/app.min.js" | prepend: site.baseurl }}"></script>
49
- <script src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js" async></script>
50
- <script src="https://at.alicdn.com/t/c/font_3046306_9tox63bysiw.js"></script>
51
- {% include waline.html %}
52
- {% include analytics.html %}
53
- {% include umami.html %}
54
- {% include busuanzi.html %}
55
- {% include pwa.html %}
56
- {% include mathjax.html %}
57
- {% include mermaid.html%}
58
- {% include webpusher.html %}
59
- {% include comments.html %}
60
- </body>
61
- </html>
35
+ {% include plugins/markdown/mermaid_block.html %}
36
+ <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
37
+ <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
38
+ <script src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js" async></script>
39
+ {% if layout.type == "post" %}
40
+ {% include layouts/metainfo.html %}
41
+ {% include plugins/others/social_js.html %}
42
+ {% else %}
43
+ {% include plugins/others/calendar_js.html %}
44
+ {% endif %}
45
+ <script src="https://cdn.jsdelivr.net/npm/clipboard/dist/clipboard.min.js"></script>
46
+ <script>
47
+ /**
48
+ * Better Scroll Experience
49
+ */
50
+ function scrollToAdjust(id){
51
+ var element = document.getElementById(id);
52
+ var headerOffset = 90;
53
+ var elementPosition = element.getBoundingClientRect().top;
54
+ var offsetPosition = elementPosition + window.scrollY - headerOffset;
55
+ window.scrollTo({
56
+ top: offsetPosition,
57
+ behavior: "smooth"
58
+ });
59
+ }
60
+ </script>
61
+ <script src="{{ " /assets/js/app.min.js" | prepend: site.baseurl }}"></script>
62
+ <script src="https://at.alicdn.com/t/c/font_3046306_ujr2yq34hw.js"></script>
63
+ {% include plugins/analytics/analytics.html %}
64
+ {% include plugins/markdown/markdown.html %}
65
+ {% include plugins/comments/comments_js.html %}
66
+ {% include plugins/others/pwa.html %}
67
+ {% include plugins/others/webpusher.html %}
68
+ {% include plugins/search/docsearch_js.html %}
69
+ </body>
70
+
71
+ </html>
data/_layouts/page.html CHANGED
@@ -2,29 +2,26 @@
2
2
  layout: default
3
3
  home-title: H2O Theme For Jekyll
4
4
  description: 或许是最漂亮的Jekyll主题
5
+ type: page
5
6
  ---
6
7
 
7
- {% include header.html %}
8
8
  {% assign lang = page.lang | default: site.default_lang %}
9
9
  {% assign locales = site.data.locales[lang] %}
10
- <div
11
- class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}"
12
- data-theme="{{ site.theme-color }}"
13
- style="{% if page.cover %}background: url({{ page.cover | relative_url }}) no-repeat center center; background-size: cover;{% endif %}"
14
- >
10
+ <div class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}" data-theme="{{ site.theme-color }}"
11
+ style="{% if page.cover %}background: url({{ page.cover | relative_url }}) no-repeat center center; background-size: cover;{% endif %}">
15
12
  <h2>{{ page.home-title }}</h2>
16
13
  <h3>{{ page.description }}</h3>
17
14
  {% if page.cover_author %}
18
- <p class="meta-item">
19
- <svg class="icon" aria-hidden="true">
20
- <use xlink:href="#icon-image"></use>
21
- </svg>
22
- {% if page.cover_author_link %}
23
- {{ locales.cover }} <a href="{{ page.cover_author_link }}" target="_blank">{{ page.cover_author }}</a>
24
- {% else %}
25
- {{ locales.cover }} {{ page.cover_author }}
26
- {% endif %}
27
- </p>
15
+ <p class="meta-item">
16
+ <svg class="icon" aria-hidden="true">
17
+ <use xlink:href="#icon-image"></use>
18
+ </svg>
19
+ {% if page.cover_author_link %}
20
+ {{ locales.cover }} <a href="{{ page.cover_author_link }}" target="_blank">{{ page.cover_author }}</a>
21
+ {% else %}
22
+ {{ locales.cover }} {{ page.cover_author }}
23
+ {% endif %}
24
+ </p>
28
25
  {% endif %}
29
26
  </div>
30
27
 
@@ -32,80 +29,13 @@ description: 或许是最漂亮的Jekyll主题
32
29
  <div class="article-list">
33
30
  <div class="post-content" style="padding-left: 30px;padding-right: 30px;width: auto;">
34
31
  <article class="markdown-body" style="width: auto;">
35
- {% assign lang = page.lang | default: site.default_lang %}
36
- {% assign locales = site.data.locales[lang] %}
37
- {% if page.langs %}
38
- <p><b>{{ locales.langs }}</b>
39
- {% assign langs = "zh-Hans, zh-Hant, en, ja" | split: ", " %}
40
- {% assign langnames = "简中, 繁中, EN, 日本語" | split: ", " %}
41
- {% if lang == site.default_lang %}
42
- {% assign url = page.url %}
43
- {% else %}
44
- {% assign urls = page.url | split: '/' %}
45
- {% assign url = "" %}
46
- {% for u in urls offset:2 %}
47
- {% assign url = url | append: "/" | append: u %}
48
- {% endfor %}
49
- {% endif %}
50
- {% for l in page.langs %}
51
- {% for i in (0..4) %}
52
- {% if langs[i] == l %}
53
- {% if l == page.lang %}
54
- {{ langnames[i] }}
55
- {% elsif l == site.default_lang %}
56
- <a href="{{ url }}">{{ langnames[i] }}</a>
57
- {% else %}
58
- {% assign prefix = "/" | append: l %}
59
- <a href="{{ url | prepend: prefix }}">{{ langnames[i] }}</a>
60
- {% endif %}
61
- {% endif %}
62
- {% endfor %}
63
- {% endfor %}
64
- </p>
65
- {% endif %}
32
+ {% include plugins/i18n.html %}
66
33
  {{ content | extlinks }}
67
34
  </article>
68
35
  </div>
69
36
  <section class="author-detail">
70
- {% if page.comments.disqus or page.comments.waline %}
71
- <section class="post-footer-item comment">
72
- <div class="comments-headline">
73
- <svg class="icon" aria-hidden="true">
74
- <use xlink:href="#icon-comment"></use>
75
- </svg>
76
- <span>评论</span>
77
- </div>
78
- {% if page.comments.disqus and page.comments.waline %}
79
- <div id="comments-switch">
80
- <span class="first-comment">Disqus</span>
81
- <span class="switch-button">
82
- <input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
83
- <label for="cmn-toggle-4"></label>
84
- </span>
85
- <span class="second-comment">Waline</span>
86
- </div>
87
- {% endif %}
88
- </section>
89
- {% endif %}
90
-
91
- {% if page.comments.disqus %}
92
- <section class="post-footer-item comment">
93
- <div id="disqus_thread"></div>
94
- </section>
95
- {% endif %}
96
-
97
- {% if page.comments.waline %}
98
- <section class="post-footer-item comment">
99
- <div id="waline"></div>
100
- </section>
101
- {% endif %}
37
+ {% include plugins/comments/comments_block.html %}
102
38
  </section>
103
39
  </div>
104
-
105
- {% include sidebar.html %}
106
-
107
- </main>
108
-
109
-
110
-
111
- {% include footer.html %}
40
+ {% include layouts/sidebar.html %}
41
+ </main>