jekyll-theme-h2o-ac 1.2.1 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e8adcaaf4e554babff373944b6f8ca485909faf610b0bfcca931a869fa43490
4
- data.tar.gz: 280099e22c19eafcbbba41fcfe96e8656892c05b0de17351be14ccd9a1007ca3
3
+ metadata.gz: f964f3fa35b036f457909e829661cc630fd817997e6093097609963202ccbe2b
4
+ data.tar.gz: 4512124057d051e06d9efac0c013618ac5300bd04b9ab7a13b04c37679ce3da4
5
5
  SHA512:
6
- metadata.gz: a1328cc5cce2252750106589a34f19ccb7dd7f2b81ce1114c65375a191b41e2d61c4af3b51b1bc8d4683f7549684df7666e27deeb2cd182dbccd9889a26306d7
7
- data.tar.gz: 2a2a1a7462813ddaba76b0357a032da6c034daa992dabdf08a1241c5f54e50c08a6f7f198df9b83cd32ae7cecbf59d555de353fee84dfc1695b7bc48b74e90db
6
+ metadata.gz: 68e0f96136129fbfbfd1c6ca38a1e44ceeaa162fd9e54914134b8209448b4ffad0e41f75cf1c764bcffe20f89f8fc4ec7e64ed43e89e833ee4e636fad6922ff2
7
+ data.tar.gz: 6e1c87fe87e9c77a3183909d7b3d48417bc73972683fc302f575d339c7dfcfeb4312b4bddd277d5a881c3138a994a28af31a807d336b15252e0b7949c4b8a0f9
data/README.md CHANGED
@@ -16,9 +16,8 @@ A Jekyll theme for researchers and maintainers based on Jekyll and [H2O](https:/
16
16
  ## Preview
17
17
 
18
18
  ### [在线预览 Live Demo →](https://h2o-ac.pages.dev/)
19
-
20
- ![vgy.me](https://i.vgy.me/tDC0t6.png)
21
- ![vgy.me](https://i.vgy.me/2Oj0Tj.png)
19
+ ![Picyard Thu Jul 06 2023 14_59_28 GMT+0900 (日本标准时间)](https://github.com/zhonger/jekyll-theme-H2O-ac/assets/12064158/e6d55bf7-b956-46e9-80d0-f33397a62215)
20
+ ![Picyard Thu Jul 06 2023 15_09_27 GMT+0900 (日本标准时间)](https://github.com/zhonger/jekyll-theme-H2O-ac/assets/12064158/fa9a087a-d849-4469-9830-2400d3410660)
22
21
 
23
22
  如果你喜欢这个博客模板,请在右上角star一下,非常感谢~
24
23
 
@@ -28,7 +27,7 @@ If you like this theme or using it, please give a ⭐️ for motivation ;)
28
27
 
29
28
  Using your smartphone to scan the QR Code for preview
30
29
 
31
- <img src="https://i.vgy.me/0zuPYl.png" width=200 />
30
+ <img src="https://github.com/zhonger/jekyll-theme-H2O-ac/assets/12064158/b01c0a31-4fad-413c-9692-a67d330699b1" width=200 />
32
31
 
33
32
  ## New Features compared with H2O, 与 H2O 不同的新特性
34
33
 
@@ -51,6 +50,7 @@ Using your smartphone to scan the QR Code for preview
51
50
  - 提示框支持
52
51
  - 文章置顶
53
52
  - 版权显式声明
53
+ - 国际化支持(简中、繁中、英文、日文)
54
54
 
55
55
  ### EN
56
56
 
@@ -71,6 +71,7 @@ Using your smartphone to scan the QR Code for preview
71
71
  - Premonition
72
72
  - Top article pin
73
73
  - Copyright statement for articles
74
+ - Internationlization (Simplified Chinese, Traditional Chinse, English, Japanese)
74
75
 
75
76
  ## Usage 快速开始
76
77
 
data/_config.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # jekyll-theme-h2o-ac
2
- version: 1.2.1
2
+ version: 1.3.1
3
3
 
4
4
  # Site settings 配置站点
5
5
  title: 'Mr Li'
@@ -104,11 +104,25 @@ sns:
104
104
  links:
105
105
  # 'Mr Li': 'https://lisz.me'
106
106
 
107
+ # Calendar 日历
108
+ calendar: true
109
+
107
110
  # Supports 赞助商
108
111
  supports:
109
112
  upyun:
110
113
  webify:
111
114
 
115
+ # Badges
116
+ badges:
117
+ foreverblog: true # Foreverblog
118
+ wormhole: true # Wormhole
119
+ travelling: true # Travelling
120
+ notbyAI: true # NotByAI
121
+
122
+ # Alive time
123
+ alivetime: true
124
+ alivestart: "12/23/2021"
125
+
112
126
  # Beian 备案号
113
127
  beian: '沪ICP备xxxxxxxx号'
114
128
 
@@ -183,22 +197,6 @@ extlinks:
183
197
  # Mermaid
184
198
  mermaid: true
185
199
 
186
- # Webpusher
187
- webpusher: false
188
-
189
- # Foreverblog
190
- foreverblog: false
191
-
192
- # Wormhole
193
- wormhole: false
194
-
195
- # NotByAI
196
- notbyAI: false
197
-
198
- # Alive time
199
- alivetime: false
200
- alivestart: "12/23/2021"
201
-
202
200
  # TOC
203
201
  toc: true
204
202
  # <div class="title">{% if title %} {{title}} {% else %} {{default_title}} {% endif %}</div>
@@ -0,0 +1,11 @@
1
+ - id: 'begin'
2
+ name: 'H2O-ac 主题入门系列'
3
+ articles:
4
+ - name: '快速入门'
5
+ url: '/tech/new-theme-h2o-ac.html'
6
+ - name: '快速入门'
7
+ url: '/tech/new-theme-h2o-ac.html'
8
+ - name: '快速入门'
9
+ url: '/tech/new-theme-h2o-ac.html'
10
+ - name: 'Guide'
11
+ url: 'https://lisz.me/tech/new-theme-h2o-ac.html'
data/_data/locales/en.yml CHANGED
@@ -3,9 +3,14 @@ panel:
3
3
  posts: 'POSTS'
4
4
  categories: 'CATEGORIES'
5
5
  tags: 'TAGS'
6
+ calendar: 'CALENDAR'
7
+ calendar_less: 'Less'
8
+ calendar_more: 'More'
6
9
  hot_tags: 'HOT TAGS'
7
10
  links: 'LINKS'
8
11
  update: 'RECENT UPDATES'
12
+ friends: 'FRIENDS'
13
+ nolink: 'No any links'
9
14
  footer:
10
15
  driver: 'Powered by <a href="//jekyllrb.com" target="_blank" class="extlinks">Jekyll</a> & <a href="https://github.com/zhonger/jekyll-theme-H2O-ac" target="_blank" class="extlinks">H2O-ac</a> (based on <a href="https://github.com/kaeyleo/jekyll-theme-H2O" target="_blank" class="extlinks">H2O</a>)'
11
16
  views: 'Total Views'
@@ -22,6 +27,7 @@ footer:
22
27
  middle: 'Terms of Service'
23
28
  right: 'page.'
24
29
  btn: 'Accept'
30
+ name: 'Terms of Service'
25
31
  post:
26
32
  outline: 'Contents'
27
33
  cover:
data/_data/locales/ja.yml CHANGED
@@ -3,9 +3,14 @@ panel:
3
3
  posts: '記事'
4
4
  categories: 'カテゴリー'
5
5
  tags: 'タグ'
6
+ calendar: 'カレンダー'
7
+ calendar_less: '少ない'
8
+ calendar_more: '多い'
6
9
  hot_tags: '人気タグ'
7
10
  links: 'リンク'
8
11
  update: '最新のアップデート'
12
+ friends: '友達'
13
+ nolink: 'リンクがありません'
9
14
  footer:
10
15
  driver: 'このサイトは <a href="//jekyllrb.com" target="_blank" class="extlinks">Jekyll</a> と <a href="https://github.com/zhonger/jekyll-theme-H2O-ac" target="_blank" class="extlinks">H2O-ac</a> を利用しています'
11
16
  views: '総閲覧数'
@@ -22,6 +27,7 @@ footer:
22
27
  middle: 'このサイトについて'
23
28
  right: 'をご覧ください。'
24
29
  btn: '同意する'
30
+ name: '利用規約'
25
31
  post:
26
32
  outline: '目次'
27
33
  cover:
@@ -3,9 +3,14 @@ panel:
3
3
  posts: '文章'
4
4
  categories: '类别'
5
5
  tags: '标签'
6
+ calendar: '日历'
7
+ calendar_less: '少'
8
+ calendar_more: '多'
6
9
  hot_tags: '热门标签'
7
10
  links: '链接'
8
11
  update: '最近更新'
12
+ friends: '朋友们'
13
+ nolink: '暂无链接'
9
14
  footer:
10
15
  driver: '本站由 <a href="//jekyllrb.com" target="_blank" class="extlinks">Jekyll</a> 和 (基于 <a href="https://github.com/kaeyleo/jekyll-theme-H2O" target="_blank" class="extlinks">H2O</a> 的) <a href="https://github.com/zhonger/jekyll-theme-H2O-ac" target="_blank" class="extlinks">H2O-ac</a> 强力驱动'
11
16
  views: '总浏览量'
@@ -22,6 +27,7 @@ footer:
22
27
  middle: '本站使用条款'
23
28
  right: '了解更多。'
24
29
  btn: '同意'
30
+ name: '使用条款'
25
31
  post:
26
32
  outline: '目录'
27
33
  cover:
@@ -3,9 +3,14 @@ panel:
3
3
  posts: '文章'
4
4
  categories: '類別'
5
5
  tags: '標籤'
6
+ calendar: '日曆'
7
+ calendar_less: '少'
8
+ calendar_more: '多'
6
9
  hot_tags: '熱門標簽'
7
10
  links: '鏈接'
8
11
  update: '最近更新'
12
+ friends: '朋友們'
13
+ nolink: '暫無鏈接'
9
14
  footer:
10
15
  driver: '本站由 <a href="//jekyllrb.com" target="_blank" class="extlinks">Jekyll</a> 和 (基於 <a href="https://github.com/kaeyleo/jekyll-theme-H2O" target="_blank" class="extlinks">H2O</a> 的) <a href="https://github.com/zhonger/jekyll-theme-H2O-ac" target="_blank" class="extlinks">H2O-ac</a> 強力驅動'
11
16
  views: '總瀏覽量'
@@ -22,6 +27,7 @@ footer:
22
27
  middle: '本站使用條款'
23
28
  right: '了解更多。'
24
29
  btn: '同意'
30
+ name: '使用條款'
25
31
  post:
26
32
  outline: '目錄'
27
33
  cover:
@@ -6,7 +6,7 @@
6
6
  <div class="g-left">
7
7
  <section class="links">
8
8
  {{ footer.driver }}
9
- {% if site.version %} (<a href="https://github.com/zhonger/jekyll-theme-H2O-ac/releases/tag/v.{{ site.version }}" target="_blank" class="extlinks">v{{ site.version }}</a>){% endif %}
9
+ {% if site.version %} (<a href="https://github.com/zhonger/jekyll-theme-H2O-ac/releases/tag/v{{ site.version }}" target="_blank" class="extlinks">v{{ site.version }}</a>){% endif %}
10
10
  {% if site.supports.webify %} & <a href="https://webify.cloudbase.net/" target="_blank" class="extlinks">CloudBase Webify</a> {% endif %}
11
11
  </section>
12
12
  <section class="links">{{ site.title }} ©
@@ -16,17 +16,31 @@
16
16
  -
17
17
  {% endunless %}
18
18
  {{ current }}
19
- {% if site.beian %}
19
+ {% if site.beian and site.beian != "" %}
20
20
  <a href="https://beian.miit.gov.cn/" target="_blank" class="extlinks">{{ site.beian }}</a>
21
21
  {% endif %}
22
+ <a href="/rss.xml" target="_blank" aria-label="Terms of Service" class="others">
23
+ <svg class="icon" aria-hidden="true">
24
+ <use xlink:href="#icon-rss"></use>
25
+ </svg> RSS
26
+ </a>
27
+ <a href="/tos" target="_blank" aria-label="Terms of Service" class="others">
28
+ <svg class="icon" aria-hidden="true">
29
+ <use xlink:href="#icon-tos"></use>
30
+ </svg> {{footer.tos.name}}
31
+ </a>
22
32
  </section>
23
33
  {% if site.busuanzi %}
24
- <section>
34
+ <section class="links">
25
35
  <span id="busuanzi_container_site_pv">
26
- 👁️ {{ footer.views }} <span id="busuanzi_value_site_pv"></span> <b>·</b>
36
+ <svg class="icon" aria-hidden="true">
37
+ <use xlink:href="#icon-pv"></use>
38
+ </svg> {{ footer.views }} <span id="busuanzi_value_site_pv"></span> <b>·</b>
27
39
  </span>
28
40
  <span id="busuanzi_container_site_uv">
29
- 👤 {{ footer.visitors }} <span id="busuanzi_value_site_uv"></span>
41
+ <svg class="icon" aria-hidden="true">
42
+ <use xlink:href="#icon-user"></use>
43
+ </svg> {{ footer.visitors }} <span id="busuanzi_value_site_uv"></span>
30
44
  </span>
31
45
  </section>
32
46
  {% endif %}
@@ -43,23 +57,28 @@
43
57
  <div class="g-right">
44
58
  {% if site.supports.upyun %}
45
59
  <section>
46
- <a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" class="extlinks">{{ footer.upyun }} <img src="{{ "/assets/icons/upyun.png" | relative_url }}" class="upyun" /></a>
60
+ <a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" class="extlinks">{{ footer.upyun }} <img src="{{ "/assets/icons/upyun.png" | relative_url }}" class="upyun" alt="upyun" /></a>
47
61
  </section>
48
62
  {% endif %}
49
- {% if site.foreverblog or site.wormhole or site.notbyAI %}
63
+ {% if site.badges.foreverblog or site.badges.wormhole or site.badges.travelling or site.badges.notbyAI %}
50
64
  <section class="badges">
51
- {% if site.foreverblog %}
52
- <a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog">
65
+ {% if site.badges.foreverblog %}
66
+ <a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog" aria-label="foreverblog">
53
67
  <img src="https://img.foreverblog.cn/logo_en_default.png" alt="">
54
68
  </a>
55
69
  {% endif %}
56
- {% if site.wormhole %}
57
- <a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole">
70
+ {% if site.badges.wormhole %}
71
+ <a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole" aria-label="wormhole">
58
72
  <img src="https://img.foreverblog.cn/wormhole_3.gif" alt="" title="穿梭虫洞-随机访问十年之约友链博客">
59
73
  </a>
60
74
  {% endif%}
61
- {% if site.notbyAI %}
62
- <a href="https://notbyai.fyi/" target="_blank" class="notbyAI">
75
+ {% if site.badges.travelling %}
76
+ <a href="https://www.travellings.cn/go.html" target="_blank" class="travelling-badge" aria-label="Travelling" rel="noopener" title="开往-友链接力">
77
+ <img src="https://www.travellings.cn/assets/logo.gif" alt="开往-友链接力">
78
+ </a>
79
+ {% endif %}
80
+ {% if site.badges.notbyAI %}
81
+ <a href="https://notbyai.fyi/" target="_blank" class="notbyAI" aria-label="notbyAI">
63
82
  <img src="{{ "/assets/icons/notbyAI-white.png" | prepend: site.baseurl }}" alt="Written by Human, Not by AI">
64
83
  </a>
65
84
  {% endif %}
@@ -76,26 +95,33 @@
76
95
 
77
96
  <button id="accept-tos">{{ footer.tos.btn }}</button>
78
97
  </div>
79
- <button id="list" aria-label="Scroll back to top" class="mobile-list" type="button">
80
- <svg class="icon list day" aria-hidden="true">
81
- <use xlink:href="#icon-list-day"></use>
82
- </svg>
83
- <svg class="icon list night" aria-hidden="true">
84
- <use xlink:href="#icon-list-night"></use>
85
- </svg>
86
- <svg class="icon exit day" aria-hidden="true">
87
- <use xlink:href="#icon-exit-day"></use>
88
- </svg>
89
- <svg class="icon exit night" aria-hidden="true">
90
- <use xlink:href="#icon-exit-night"></use>
91
- </svg>
92
- </button>
93
- <button id="bttb" aria-label="Scroll back to top" class="bttb" type="button">
94
- <svg class="icon up day" aria-hidden="true">
95
- <use xlink:href="#icon-up-day"></use>
96
- </svg>
97
- <svg class="icon up night" aria-hidden="true">
98
- <use xlink:href="#icon-up-night"></use>
99
- </svg>
100
- </button>
101
98
 
99
+ <section id="tools">
100
+ {% if page.submenu %}
101
+ <div class="tool collection">
102
+ <svg class="icon b1 active" aria-hidden="true">
103
+ <use xlink:href="#icon-submenu"></use>
104
+ </svg>
105
+ <svg class="icon b2" aria-hidden="true">
106
+ <use xlink:href="#icon-exit"></use>
107
+ </svg>
108
+ </div>
109
+ {% endif %}
110
+ {% if page.content contains 'h1' or page.content contains 'h2' or page.content contains 'h3' or page.content contains 'h4' or page.content contains 'h5' or page.content contains 'h6' and site.toc %}
111
+ <div class="tool toc">
112
+ <svg class="icon b1 active" aria-hidden="true">
113
+ <use xlink:href="#icon-toc"></use>
114
+ </svg>
115
+ <svg class="icon b2" aria-hidden="true">
116
+ <use xlink:href="#icon-exit"></use>
117
+ </svg>
118
+ </div>
119
+ {% endif %}
120
+ </section>
121
+ <section id="bttb" aria-label="Scroll back to top" class="bttb">
122
+ <div class="tool">
123
+ <svg class="icon top" aria-hidden="true">
124
+ <use xlink:href="#icon-top"></use>
125
+ </svg>
126
+ </div>
127
+ </section>
@@ -2,23 +2,21 @@
2
2
  <meta charset="UTF-8">
3
3
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
4
  <title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
5
- <meta name="author" content="{{ site.author }}">
5
+ <meta name="author" content="{{ site.author }}">
6
+ {% if layout.type == "post" %}
6
7
  <meta name="description" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
7
- <meta name="keywords" content="{% if page.tags.size > 0 %}{% for tag in page.tags %}{{ tag }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}">
8
- <!-- Open Graph -->
9
- <meta property="og:title" content="{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}">
10
- <meta property="og:type" content="website">
11
- <meta property="og:url" content="{{ page.url | prepend: site.url }}">
12
- <meta property="og:baseurl" content="{{ site.baseurl }}">
13
- <meta property="og:description" content="{{ site.description }}">
14
- <meta property="og:site_name" content="{{ site.title }}">
15
- <meta property="og:gray" content="{{ site.gray }}">
8
+ <meta name="keywords"
9
+ content="{% if page.tags.size > 0 %}{% for tag in page.tags %}{{ tag }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}">
16
10
  {% if page.next.url %}
17
11
  <meta property="og:previous_url" content="{{ page.next.url | relative_url }}">
18
12
  {% endif %}
19
13
  {% if page.previous.url %}
20
14
  <meta property="og:next_url" content="{{ page.previous.url | relative_url }}">
21
15
  {% endif %}
16
+ {% else %}
17
+ <meta name="description" content="{{ site.description }}">
18
+ <meta name="keywords" content="{{ site.keyword }}">
19
+ {% endif %}
22
20
  <meta property="post-date-format" content="{{ site.formats.time }}">
23
21
  {% case site.formats.time %}
24
22
  {% when 0 %}
@@ -28,6 +26,21 @@
28
26
  {% else %}
29
27
  <meta property="post-date" content="{{ page.date | date: '%Y年%-m月%-d日 %H:%M:%S %z' }}" />
30
28
  {% endcase %}
29
+ {% if site.calendar %}
30
+ <meta property="calendar-scale" content="{{ site.calendar.scale | default: 'year' }}" />
31
+ <meta property="calendar-scheme" content="{{ site.calendar.scheme | default: 'null' }}" />
32
+ <meta property="calendar-color" content="{{ site.calendar.color | default: 'null' }}" />
33
+ {% endif %}
34
+ <!-- Open Graph -->
35
+ <meta property="og:title"
36
+ content="{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}">
37
+ <meta property="og:type" content="website">
38
+ <meta property="og:url" content="{{ page.url | prepend: site.url }}">
39
+ <meta property="og:baseurl" content="{{ site.baseurl }}">
40
+ <meta property="og:description" content="{{ site.description }}">
41
+ <meta property="og:site_name" content="{{ site.title }}">
42
+ <meta property="og:gray" content="{{ site.gray }}">
43
+ <meta property="og:lang" content="{{ lang }}">
31
44
  {% if site.alivetime %}
32
45
  <meta name="alivestart" content="{{ site.alivestart }}">
33
46
  {% endif %}
@@ -35,29 +48,22 @@
35
48
  <meta name="google-site-verification" content="{{ site.google_search }}" />
36
49
  {% endif %}
37
50
  <meta name="theme-color" content="{{ site.pwa.color }}" />
38
- <link rel="manifest" href="{{ "/manifest.json" | prepend: site.baseurl }}" />
39
- <link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/img/touch/apple-touch-icon.png"/>
51
+ <link rel="manifest" href="{{ " /manifest.json" | prepend: site.baseurl }}" />
52
+ <link rel="apple-touch-icon" href="{{ " /assets/img/touch/apple-touch-icon.png" | prepend: site.baseurl }}" />
40
53
  <link rel="Shortcut Icon" href="{{ site.favicon | prepend: site.baseurl }}">
41
54
  <link rel="icon" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
42
55
  <link rel="bookmark" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
43
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.min.css" />
56
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.min.css" async>
44
57
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css" />
45
58
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5.2.0/github-markdown-light.min.css">
46
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css">
47
- {% assign prisms1 = "coy,dark,funky,okaidia,solarizedlight,tomorrow,twilight" | split: "," %}
48
- {% assign prisms2 = "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" | split: "," %}
49
- {% if prisms1 contains site.prism.theme %}
50
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism-{{site.prism.theme}}.min.css" />
51
- {% else if prisms2 contains site.prism.theme %}
52
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prism-themes@1.9.0/themes/prism-{{site.prism.theme}}.min.css" />
59
+ {% if layout.type == "post" %}
60
+ {% include plugins/others/social_css.html%}
61
+ {% include plugins/markdown/fancybox_css.html %}
53
62
  {% else %}
54
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism.min.css" />
55
- {% endif %}
56
- {% if site.prism.line_numbers %}
57
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/plugins/line-numbers/prism-line-numbers.min.css">
63
+ {% include plugins/others/calendar_css.html %}
58
64
  {% endif %}
59
- <link rel="stylesheet" href="{{ "/assets/css/app.min.css" | prepend: site.baseurl }}">
60
- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.min.css" />
61
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@waline/client/dist/waline.css" />
62
- <script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
63
- </head>
65
+ {% include plugins/markdown/prism_css.html %}
66
+ {% include plugins/comments/waline_css.html %}
67
+ <link rel="stylesheet" href="{{ " /assets/css/app.min.css" | prepend: site.baseurl }}">
68
+ <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
69
+ </head>
@@ -3,6 +3,15 @@
3
3
  <a href="{{ "/" | relative_url }}" aria-label="logo"></a>
4
4
  </div>
5
5
  <!-- <i id="menu-toggle" class="iconfont icon-menu"></i> -->
6
+ {% if site.badges.travelling %}
7
+ <div id="travelling-toggle">
8
+ <a href="https://www.travellings.cn/go.html" aria-label="Travelings" target="_blank">
9
+ <svg class="icon" aria-hidden="true">
10
+ <use xlink:href="#icon-train-subway"></use>
11
+ </svg>
12
+ </a>
13
+ </div>
14
+ {% endif %}
6
15
  <div id="mode-toggle">
7
16
  <svg class="icon icon-day" aria-hidden="true">
8
17
  <use xlink:href="#icon-day"></use>
@@ -19,7 +28,7 @@
19
28
  {% for i in site.nav %}
20
29
  {% if i[1].first %}
21
30
  <li class="dropdown">
22
- <a class="dropdown-toggle"> {{ i[0] }} </a>
31
+ <a class="dropdown-toggle" href="#"> {{ i[0] }} </a>
23
32
  <ul class="dropdown-menu">
24
33
  {% for j in i[1] %}
25
34
  <li>
@@ -38,6 +47,15 @@
38
47
  </li>
39
48
  {% endif %}
40
49
  {% endfor %}
50
+ {% if site.badges.travelling %}
51
+ <li class="travelling">
52
+ <a href="https://www.travellings.cn/go.html" aria-label="Travelings" target="_blank">
53
+ <svg class="icon" aria-hidden="true">
54
+ <use xlink:href="#icon-train-subway"></use>
55
+ </svg>
56
+ </a>
57
+ </li>
58
+ {% endif %}
41
59
  <li class="mode">
42
60
  <svg class="icon day" aria-hidden="true">
43
61
  <use xlink:href="#icon-day"></use>
@@ -0,0 +1,40 @@
1
+ <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.2/dayjs.min.js"></script>
2
+ <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.2/plugin/customParseFormat.js"></script>
3
+ <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.2/plugin/relativeTime.js"></script>
4
+ <script>
5
+ $(document).ready(function () {
6
+ var time_formats = ['YYYY-MM-DD HH:mm:ss ZZ', 'YYYY DD MMM HH:mm:ss ZZ', 'YYYY年MM月DD日 HH:mm:ss ZZ'];
7
+ function dateFormat(date, format) {
8
+ var date_org = dayjs(date, time_formats[format]);
9
+ var date = date_org.format(time_formats[format]);
10
+ return { "date_org": date_org, "date": date }
11
+ }
12
+
13
+ dayjs.extend(window.dayjs_plugin_customParseFormat);
14
+ dayjs.extend(window.dayjs_plugin_relativeTime);
15
+ var post_date = $("meta[property='post-date']").attr('content');
16
+ var post_date_format = $("meta[property='post-date-format']").attr('content');
17
+ var local_post_date = dateFormat(post_date, post_date_format);
18
+
19
+ $(".post time span.create-at").html(local_post_date["date"]);
20
+
21
+ fetch("https://api.github.com/repos/{{ site.github.owner }}/{{ site.github.repository }}/commits?path={{ page.path }}").then((response) => {
22
+ return response.json();
23
+ }).then((commits) => {
24
+ if (commits.length != 0) {
25
+ var update_at = dayjs(commits[0]['commit']['committer']['date']);
26
+ } else {
27
+ var update_at = post_date
28
+ }
29
+
30
+ var local_update_at = dateFormat(update_at, post_date_format);
31
+ $('.post time span.update-at').html(local_update_at["date"]);
32
+
33
+ var relative_time = dayjs().diff(local_update_at["date_org"], 'day');
34
+ $(".post-copyright .tips span").append(relative_time);
35
+ if (relative_time > 365) {
36
+ $(".post-copyright .tips").addClass("active");
37
+ }
38
+ });
39
+ });
40
+ </script>
@@ -1,7 +1,7 @@
1
1
  {% if post.pin %}
2
2
  <article class="article-item keep-top">
3
3
  {% else %}
4
- <article class="article-item keep-top">
4
+ <article class="article-item">
5
5
  {% endif %}
6
6
  {% if post.cover %}
7
7
  <div class="post-cover">
@@ -11,7 +11,14 @@
11
11
  {% endif %}
12
12
  <section class="post-preview">
13
13
  <a class="post-link" href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
14
- <h2 class="post-title">{% if post.pin %}<span class="keep-top">[置顶]</span> {% endif %}{{ post.title }}</h2>
14
+ <h2 class="post-title">
15
+ {% if post.pin %}
16
+ <svg class="icon" aria-hidden="true">
17
+ <use xlink:href="#icon-pin"></use>
18
+ </svg>
19
+ {% endif %}
20
+ {{ post.title }}
21
+ </h2>
15
22
  {% if post.subtitle %}
16
23
  <h3 class="post-subtitle">{{ post.subtitle }}</h3>
17
24
  {% endif %}
@@ -15,13 +15,13 @@
15
15
  {% endif %}
16
16
  {% for i in (unpin_start..unpin_end) %}
17
17
  {% assign post = unpin_posts[i] %}
18
- {% include paginate-article.html %}
18
+ {% include layouts/paginate-article.html %}
19
19
  {% endfor %}
20
20
  {% elsif pin_posts_num < max_num %}
21
21
  {% assign pin_end = pin_posts_num | minus: 1 %}
22
22
  {% for i in (min_num..pin_end) %}
23
23
  {% assign post = pin_posts[i] %}
24
- {% include paginate-article.html %}
24
+ {% include layouts/paginate-article.html %}
25
25
  {% endfor %}
26
26
  {% assign unpin_end = max_num | minus: pin_posts_num | minus: 1 %}
27
27
  {% if unpin_end >= unpin_posts_num %}
@@ -29,13 +29,13 @@
29
29
  {% endif %}
30
30
  {% for i in (0..unpin_end) %}
31
31
  {% assign post = unpin_posts[i] %}
32
- {% include paginate-article.html %}
32
+ {% include layouts/paginate-article.html %}
33
33
  {% endfor %}
34
34
  {% else %}
35
35
  {% assign pin_start = min_num %}
36
36
  {% assign pin_end = max_num | minus: 1 %}
37
37
  {% for i in (pin_start..pin_end) %}
38
38
  {% assign post = pin_posts[i] %}
39
- {% include paginate-article.html %}
39
+ {% include layouts/paginate-article.html %}
40
40
  {% endfor %}
41
- {% endif %}
41
+ {% endif %}
@@ -45,7 +45,9 @@
45
45
  </ul>
46
46
  {% endif %}
47
47
  </section>
48
-
48
+ {% if site.calendar %}
49
+ {% include plugins/others/calendar_block.html %}
50
+ {% endif %}
49
51
  {% if site.recommend-tags and site.tags.size>0 %}
50
52
  {% assign max_tag_count = 0 %}
51
53
  {% for tag in site.tags %}
@@ -54,7 +56,12 @@
54
56
  {% endif %}
55
57
  {% endfor %}
56
58
  <section class="tags-card">
57
- <div class="links" rel="links">{{ panel.hot_tags }}</div>
59
+ <div class="links" rel="links">
60
+ <svg class="icon" aria-hidden="true">
61
+ <use xlink:href="#icon-tags"></use>
62
+ </svg>
63
+ {{ panel.hot_tags }}
64
+ </div>
58
65
  {% assign pnum = 0 %}
59
66
  {% for i in (1..max_tag_count) reversed %}
60
67
  {% for tag in site.tags %}
@@ -75,7 +82,12 @@
75
82
 
76
83
  {% if site.links.size > 0 %}
77
84
  <section class="tags-card">
78
- <div class="links" rel="links">{{ panel.links }}</div>
85
+ <div class="links" rel="links">
86
+ <svg class="icon" aria-hidden="true">
87
+ <use xlink:href="#icon-links"></use>
88
+ </svg>
89
+ {{ panel.links }}
90
+ </div>
79
91
  {% for link in site.links %}
80
92
  <a href="{{ link[1] }}" target="_blank" class="tag" rel="noreferrer"> {{ link[0] }} </a>
81
93
  {% endfor %}
@@ -84,7 +96,12 @@
84
96
 
85
97
  <section class="tags-card">
86
98
  {% assign posts = site.posts | sort: "date" | reverse %}
87
- <div class="links">{{ panel.update }}</div>
99
+ <div class="links">
100
+ <svg class="icon" aria-hidden="true">
101
+ <use xlink:href="#icon-new"></use>
102
+ </svg>
103
+ {{ panel.update }}
104
+ </div>
88
105
  <ul class="latest-articles">
89
106
  {% for post in posts limit:3 %}
90
107
  <li>