jekyll-theme-h2o-ac 1.2.1 → 1.3.1

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/_config.yml +15 -17
  4. data/_data/collections.yml +11 -0
  5. data/_data/locales/en.yml +6 -0
  6. data/_data/locales/ja.yml +6 -0
  7. data/_data/locales/zh-Hans.yml +6 -0
  8. data/_data/locales/zh-Hant.yml +6 -0
  9. data/_includes/{footer.html → layouts/footer.html} +61 -35
  10. data/_includes/{post-head.html → layouts/head.html} +35 -29
  11. data/_includes/{header.html → layouts/header.html} +19 -1
  12. data/_includes/layouts/metainfo.html +40 -0
  13. data/_includes/{paginate-article.html → layouts/paginate-article.html} +9 -2
  14. data/_includes/{paginate.html → layouts/paginate.html} +5 -5
  15. data/_includes/{sidebar.html → layouts/sidebar.html} +21 -4
  16. data/_includes/layouts/submenu.html +30 -0
  17. data/_includes/plugins/analytics/analytics.html +3 -0
  18. data/_includes/{analytics.html → plugins/analytics/google.html} +1 -2
  19. data/_includes/plugins/comments/comments_block.html +67 -0
  20. data/_includes/plugins/comments/comments_js.html +24 -0
  21. data/_includes/plugins/comments/disqus.html +19 -0
  22. data/_includes/plugins/comments/waline_css.html +3 -0
  23. data/_includes/plugins/comments/waline_js.html +14 -0
  24. data/_includes/plugins/i18n.html +32 -0
  25. data/_includes/plugins/markdown/fancybox_css.html +1 -0
  26. data/_includes/plugins/markdown/fancybox_js.html +24 -0
  27. data/_includes/plugins/markdown/hotkeys.html +31 -0
  28. data/_includes/plugins/markdown/markdown.html +7 -0
  29. data/_includes/{mathjax.html → plugins/markdown/mathjax.html} +4 -9
  30. data/_includes/plugins/markdown/mermaid_block.html +10 -0
  31. data/_includes/plugins/markdown/mermaid_js.html +12 -0
  32. data/_includes/plugins/markdown/prism_css.html +16 -0
  33. data/_includes/plugins/markdown/prism_js.html +3 -0
  34. data/_includes/plugins/others/calendar_block.html +31 -0
  35. data/_includes/plugins/others/calendar_css.html +3 -0
  36. data/_includes/plugins/others/calendar_js.html +8 -0
  37. data/_includes/plugins/others/social_block.html +5 -0
  38. data/_includes/plugins/others/social_css.html +1 -0
  39. data/_includes/plugins/others/social_js.html +15 -0
  40. data/_layouts/404.html +17 -0
  41. data/_layouts/archives.html +89 -59
  42. data/_layouts/blog.html +4 -10
  43. data/_layouts/categories.html +3 -1
  44. data/_layouts/default.html +62 -45
  45. data/_layouts/links.html +14 -4
  46. data/_layouts/page.html +17 -87
  47. data/_layouts/post.html +146 -483
  48. data/_layouts/stats.html +52 -0
  49. data/_layouts/tags.html +2 -2
  50. data/assets/css/app.min.css +1 -2591
  51. data/assets/css/app.min.css.map +1 -1
  52. data/assets/css/cv.min.css +1 -279
  53. data/assets/css/cv.min.css.map +1 -1
  54. data/assets/js/app.min.js +1 -686
  55. data/assets/js/app.min.js.LICENSE.txt +15 -0
  56. data/assets/js/app.min.js.map +1 -1
  57. metadata +43 -20
  58. data/_includes/comments.html +0 -53
  59. data/_includes/head.html +0 -47
  60. data/_includes/mermaid.html +0 -12
  61. data/_includes/waline.html +0 -3
  62. /data/_includes/{pageNav.html → layouts/pageNav.html} +0 -0
  63. /data/_includes/{toc.html → layouts/toc.html} +0 -0
  64. /data/_includes/{busuanzi.html → plugins/analytics/busuanzi.html} +0 -0
  65. /data/_includes/{umami.html → plugins/analytics/umami.html} +0 -0
  66. /data/_includes/{pwa.html → plugins/others/pwa.html} +0 -0
  67. /data/_includes/{webpusher.html → plugins/others/webpusher.html} +0 -0
@@ -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,53 +1,70 @@
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%}
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
+ </body>
34
69
 
35
- <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
36
- <script src="https://cdn.jsdelivr.net/npm/clipboard/dist/clipboard.min.js"></script>
37
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
38
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
39
- <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
40
- <script src="{{ "/assets/js/app.min.js" | prepend: site.baseurl }}"></script>
41
- <script src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js" async></script>
42
- <script src="https://at.alicdn.com/t/font_3046306_skfh9jzzbbf.js"></script>
43
- {% include waline.html %}
44
- {% include analytics.html %}
45
- {% include umami.html %}
46
- {% include busuanzi.html %}
47
- {% include pwa.html %}
48
- {% include mathjax.html %}
49
- {% include mermaid.html%}
50
- {% include webpusher.html %}
51
- {% include comments.html %}
52
- </body>
53
- </html>
70
+ </html>
data/_layouts/links.html CHANGED
@@ -3,10 +3,16 @@ layout: page
3
3
  home-title: H2O-ac Theme For Jekyll
4
4
  description: 或许是最漂亮的Jekyll主题
5
5
  ---
6
-
6
+ {% assign lang = page.lang | default: site.default_lang %}
7
+ {% assign locales = site.data.locales[lang] %}
8
+ {% assign panel = locales.panel %}
7
9
  {% if site.data.links %}
8
10
  <div class="friends">
9
- <h2>{% if site.language == "zh-cn" %}链接{% else %}Links{% endif %}</h2>
11
+ <h2>
12
+ <svg class="icon" aria-hidden="true">
13
+ <use xlink:href="#icon-links"></use>
14
+ </svg> {{panel.links}}
15
+ </h2>
10
16
  {% for f in site.data.links.links %}
11
17
  <a target="_blank" href="{{ f.url }}" title="{{ f.name }}" class="friendurl">
12
18
  <div class="frienddiv">
@@ -23,7 +29,11 @@ description: 或许是最漂亮的Jekyll主题
23
29
  {% endfor %}
24
30
  </div>
25
31
  <div class="friends">
26
- <h2>{% if site.language == "zh-cn" %}朋友们{% else %}Friends{% endif %}</h2>
32
+ <h2>
33
+ <svg class="icon" aria-hidden="true">
34
+ <use xlink:href="#icon-friends"></use>
35
+ </svg> {{panel.friends}}
36
+ </h2>
27
37
  {% for f in site.data.links.friends %}
28
38
  <a target="_blank" href="{{ f.url }}" title="{{ f.name }}" class="friendurl">
29
39
  <div class="frienddiv">
@@ -40,7 +50,7 @@ description: 或许是最漂亮的Jekyll主题
40
50
  {% endfor %}
41
51
  </div>
42
52
  {% else %}
43
- 暂无链接
53
+ {{panel.nolink}}
44
54
  {% endif %}
45
55
 
46
56
  {{ content }}
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>