jekyll-theme-h2o-ac 1.2.0 → 1.2.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.
- checksums.yaml +4 -4
- data/README.md +17 -20
- data/_config.yml +5 -5
- data/_data/locales/en.yml +2 -1
- data/_data/locales/ja.yml +2 -1
- data/_data/locales/zh-Hans.yml +2 -1
- data/_data/locales/zh-Hant.yml +2 -1
- data/_includes/footer.html +67 -55
- data/_includes/header.html +1 -1
- data/_includes/toc.html +2 -2
- data/_layouts/default.html +2 -2
- data/_layouts/manifest.html +35 -0
- data/_layouts/page.html +31 -0
- data/_layouts/post.html +79 -8
- data/_layouts/search.html +7 -0
- data/_layouts/sw.js +4 -4
- data/_layouts/tags.html +2 -2
- data/assets/css/app.min.css +1181 -1086
- data/assets/css/app.min.css.map +1 -1
- data/assets/icons/notbyAI-white.png +0 -0
- data/assets/js/app.min.js +103 -107
- data/assets/js/app.min.js.map +1 -1
- metadata +9 -9
- data/_layouts/manifest.json +0 -35
- data/assets/search.json +0 -13
- data/blog/index.html +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e8adcaaf4e554babff373944b6f8ca485909faf610b0bfcca931a869fa43490
|
4
|
+
data.tar.gz: 280099e22c19eafcbbba41fcfe96e8656892c05b0de17351be14ccd9a1007ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1328cc5cce2252750106589a34f19ccb7dd7f2b81ce1114c65375a191b41e2d61c4af3b51b1bc8d4683f7549684df7666e27deeb2cd182dbccd9889a26306d7
|
7
|
+
data.tar.gz: 2a2a1a7462813ddaba76b0357a032da6c034daa992dabdf08a1241c5f54e50c08a6f7f198df9b83cd32ae7cecbf59d555de353fee84dfc1695b7bc48b74e90db
|
data/README.md
CHANGED
@@ -1,27 +1,24 @@
|
|
1
|
-
<div align="center">
|
2
|
-
|
3
1
|
# jekyll-theme-H2O-ac
|
4
2
|
|
5
|
-
|
6
|
-
|
3
|
+

|
4
|
+

|
7
5
|
[](https://www.codacy.com/gh/zhonger/jekyll-theme-H2O-ac/dashboard?utm_source=github.com&utm_medium=referral&utm_content=zhonger/jekyll-theme-H2O-ac&utm_campaign=Badge_Grade)
|
8
6
|
[](https://github.com/zhonger/jekyll-theme-H2O-ac/blob/master/LICENSE)
|
9
7
|

|
10
8
|

|
11
9
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fzhonger%2Fjekyll-theme-H2O-ac?ref=badge_shield)
|
10
|
+

|
12
11
|
|
13
12
|
基于 Jekyll 和 [H2O](https://github.com/kaeyleo/jekyll-theme-H2O) 主题、适合学术研究人员和运维开发人员的博客主题模板。
|
14
13
|
|
15
14
|
A Jekyll theme for researchers and maintainers based on Jekyll and [H2O](https://github.com/kaeyleo/jekyll-theme-H2O) theme.
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
### Preview
|
16
|
+
## Preview
|
20
17
|
|
21
|
-
|
18
|
+
### [在线预览 Live Demo →](https://h2o-ac.pages.dev/)
|
22
19
|
|
23
|
-

|
21
|
+

|
25
22
|
|
26
23
|
如果你喜欢这个博客模板,请在右上角star一下,非常感谢~
|
27
24
|
|
@@ -29,13 +26,13 @@ If you like this theme or using it, please give a ⭐️ for motivation ;)
|
|
29
26
|
|
30
27
|
如果想体验手机浏览效果,可以扫一下二维码:
|
31
28
|
|
32
|
-
|
29
|
+
Using your smartphone to scan the QR Code for preview
|
33
30
|
|
34
|
-
|
31
|
+
<img src="https://i.vgy.me/0zuPYl.png" width=200 />
|
35
32
|
|
36
|
-
|
33
|
+
## New Features compared with H2O, 与 H2O 不同的新特性
|
37
34
|
|
38
|
-
|
35
|
+
### CN
|
39
36
|
|
40
37
|
- 学术首页
|
41
38
|
- 归档页
|
@@ -55,7 +52,7 @@ Using your smartphone to scan the QR Code
|
|
55
52
|
- 文章置顶
|
56
53
|
- 版权显式声明
|
57
54
|
|
58
|
-
|
55
|
+
### EN
|
59
56
|
|
60
57
|
- Academic Home Page
|
61
58
|
- Archive Page
|
@@ -75,19 +72,19 @@ Using your smartphone to scan the QR Code
|
|
75
72
|
- Top article pin
|
76
73
|
- Copyright statement for articles
|
77
74
|
|
78
|
-
|
75
|
+
## Usage 快速开始
|
79
76
|
|
80
77
|
请访问 [H2O-ac theme for Jekyll](https://lisz.me/tech/webmaster/new-theme-h2o-ac.html) 查看详情。
|
81
78
|
|
82
79
|
Please refer to [H2O-ac theme for Jekyll](https://lisz.me/tech/webmaster/new-theme-h2o-ac.html) for details.
|
83
80
|
|
84
|
-
|
81
|
+
## Contribution 贡献
|
85
82
|
|
86
83
|
Any types of contribution are welcome. Thanks.
|
87
84
|
|
88
85
|
接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的 ```Pull Request```。
|
89
86
|
|
90
|
-
|
87
|
+
## Thanks 感谢参与 H2O 代码贡献的伙伴
|
91
88
|
|
92
89
|
- [kaeyleo](https://github.com/kaeyleo/)
|
93
90
|
- [Ray-Eldath](https://github.com/Ray-Eldath)
|
@@ -96,11 +93,11 @@ Any types of contribution are welcome. Thanks.
|
|
96
93
|
- [moycat](https://github.com/moycat)
|
97
94
|
- More
|
98
95
|
|
99
|
-
|
96
|
+
## Contributors 贡献者
|
100
97
|
|
101
98
|

|
102
99
|
|
103
|
-
|
100
|
+
## License 许可证
|
104
101
|
|
105
102
|
Jekyll-Theme-H2O-ac is licensed under [MIT](https://github.com/zhonger/jekyll-theme-H2O-ac/blob/master/LICENSE).
|
106
103
|
|
data/_config.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# jekyll-theme-h2o-ac
|
2
|
-
version: 1.2.
|
2
|
+
version: 1.2.1
|
3
3
|
|
4
4
|
# Site settings 配置站点
|
5
5
|
title: 'Mr Li'
|
@@ -32,9 +32,6 @@ pwa:
|
|
32
32
|
color: '#81BBFF'
|
33
33
|
short_name: 'lisz'
|
34
34
|
|
35
|
-
# International
|
36
|
-
language: zh-cn
|
37
|
-
|
38
35
|
# Navigation links
|
39
36
|
nav:
|
40
37
|
home: '/'
|
@@ -155,7 +152,7 @@ pagination:
|
|
155
152
|
sort_field: 'date'
|
156
153
|
sort_reverse: true
|
157
154
|
|
158
|
-
exclude: ['node_modules', 'dev', 'package.json', '
|
155
|
+
exclude: ['node_modules', 'dev', 'package.json', 'webpack.config.js', '.gitignore', 'README.md', '*.gemspec', '*.gem']
|
159
156
|
|
160
157
|
# Markdown
|
161
158
|
markdown: kramdown
|
@@ -195,6 +192,9 @@ foreverblog: false
|
|
195
192
|
# Wormhole
|
196
193
|
wormhole: false
|
197
194
|
|
195
|
+
# NotByAI
|
196
|
+
notbyAI: false
|
197
|
+
|
198
198
|
# Alive time
|
199
199
|
alivetime: false
|
200
200
|
alivestart: "12/23/2021"
|
data/_data/locales/en.yml
CHANGED
data/_data/locales/ja.yml
CHANGED
data/_data/locales/zh-Hans.yml
CHANGED
data/_data/locales/zh-Hant.yml
CHANGED
data/_includes/footer.html
CHANGED
@@ -2,62 +2,74 @@
|
|
2
2
|
{% assign locales = site.data.locales[lang] %}
|
3
3
|
{% assign footer = locales.footer%}
|
4
4
|
<footer class="g-footer">
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
<
|
5
|
+
<div class="g-container">
|
6
|
+
<div class="g-left">
|
7
|
+
<section class="links">
|
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 %}
|
10
|
+
{% if site.supports.webify %} & <a href="https://webify.cloudbase.net/" target="_blank" class="extlinks">CloudBase Webify</a> {% endif %}
|
11
|
+
</section>
|
12
|
+
<section class="links">{{ site.title }} ©
|
13
|
+
{% assign current = "now" | date: "%Y" | plus: 0%}
|
14
|
+
{% unless site.footer.since and site.footer.since == current %}
|
15
|
+
{{ site.footer.since }}
|
16
|
+
-
|
17
|
+
{% endunless %}
|
18
|
+
{{ current }}
|
19
|
+
{% if site.beian %}
|
20
|
+
<a href="https://beian.miit.gov.cn/" target="_blank" class="extlinks">{{ site.beian }}</a>
|
21
|
+
{% endif %}
|
22
|
+
</section>
|
23
|
+
{% if site.busuanzi %}
|
24
|
+
<section>
|
25
|
+
<span id="busuanzi_container_site_pv">
|
26
|
+
👁️ {{ footer.views }} <span id="busuanzi_value_site_pv"></span> <b>·</b>
|
27
|
+
</span>
|
28
|
+
<span id="busuanzi_container_site_uv">
|
29
|
+
👤 {{ footer.visitors }} <span id="busuanzi_value_site_uv"></span>
|
30
|
+
</span>
|
31
|
+
</section>
|
32
|
+
{% endif %}
|
33
|
+
<section>
|
34
|
+
{% if site.alivetime %}
|
35
|
+
{{ footer.running.info }}
|
36
|
+
<span class="alivetime_days"></span> {{ footer.running.day }}
|
37
|
+
<span class="alivetime_hours"></span> {{ footer.running.hour }}
|
38
|
+
<span class="alivetime_minutes"></span> {{ footer.running.minute }}
|
39
|
+
<span class="alivetime_seconds"></span> {{ footer.running.second }}
|
40
|
+
{% endif %}
|
41
|
+
</section>
|
42
|
+
</div>
|
43
|
+
<div class="g-right">
|
44
|
+
{% if site.supports.upyun %}
|
45
|
+
<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>
|
47
|
+
</section>
|
48
|
+
{% endif %}
|
49
|
+
{% if site.foreverblog or site.wormhole or site.notbyAI %}
|
50
|
+
<section class="badges">
|
51
|
+
{% if site.foreverblog %}
|
52
|
+
<a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog">
|
53
|
+
<img src="https://img.foreverblog.cn/logo_en_default.png" alt="">
|
54
|
+
</a>
|
55
|
+
{% endif %}
|
56
|
+
{% if site.wormhole %}
|
57
|
+
<a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole">
|
58
|
+
<img src="https://img.foreverblog.cn/wormhole_3.gif" alt="" title="穿梭虫洞-随机访问十年之约友链博客">
|
59
|
+
</a>
|
60
|
+
{% endif%}
|
61
|
+
{% if site.notbyAI %}
|
62
|
+
<a href="https://notbyai.fyi/" target="_blank" class="notbyAI">
|
63
|
+
<img src="{{ "/assets/icons/notbyAI-white.png" | prepend: site.baseurl }}" alt="Written by Human, Not by AI">
|
64
|
+
</a>
|
65
|
+
{% endif %}
|
66
|
+
</section>
|
67
|
+
{% endif %}
|
68
|
+
</div>
|
69
|
+
{% if site.cnzz %}
|
70
|
+
<script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_{{ site.cnzz }}'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D{{ site.cnzz }}%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
|
46
71
|
{% endif %}
|
47
|
-
|
48
|
-
<br/>
|
49
|
-
{% endif %}
|
50
|
-
{% if site.foreverblog %}
|
51
|
-
<a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog">
|
52
|
-
<img src="https://img.foreverblog.cn/logo_en_default.png" alt="">
|
53
|
-
</a>
|
54
|
-
{% endif %}
|
55
|
-
{% if site.wormhole %}
|
56
|
-
<a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole">
|
57
|
-
<img src="https://img.foreverblog.cn/wormhole_3.gif" alt="" title="穿梭虫洞-随机访问十年之约友链博客">
|
58
|
-
</a>
|
59
|
-
{% endif%}
|
60
|
-
</section>
|
72
|
+
</div>
|
61
73
|
</footer>
|
62
74
|
<div class="cookie-tip">
|
63
75
|
{{ cookie.cookieconsent_status }} {{ footer.tos.left }}「 <a href="{{ site.tos | prepend: site.baseurl }}">{{ footer.tos.middle }}</a> 」{{ footer.tos.right }}
|
data/_includes/header.html
CHANGED
data/_includes/toc.html
CHANGED
@@ -130,8 +130,8 @@
|
|
130
130
|
{% if include.anchor_class %}
|
131
131
|
{% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
|
132
132
|
{% endif %}
|
133
|
-
|
134
|
-
{% capture listItem %}<a{{
|
133
|
+
{% assign anchorBody2 = anchorBody | remove: ":" | replace: " ", "-" | downcase %}
|
134
|
+
{% capture listItem %}<a onclick="scrollToAdjust('{{ anchorBody2 }}')">{{ anchorBody }}</a>{% endcapture %}
|
135
135
|
{% elsif skipNoIDs == true %}
|
136
136
|
{% continue %}
|
137
137
|
{% else %}
|
data/_layouts/default.html
CHANGED
@@ -12,9 +12,9 @@
|
|
12
12
|
<div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
|
13
13
|
<![endif]-->
|
14
14
|
{% if site.gray %}
|
15
|
-
<div id=all class="gray">
|
15
|
+
<div id=all class="gray" data-theme="{{ site.theme-color }}">
|
16
16
|
{% else %}
|
17
|
-
<div id="all">
|
17
|
+
<div id="all" data-theme="{{ site.theme-color }}">
|
18
18
|
{% endif %}
|
19
19
|
<input id="nm-switch" type="hidden" value="{{ site.nightMode }}">
|
20
20
|
<div class="visible">
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"lang": "{{ site.language }}",
|
3
|
+
"dir": "{{ site.baseurl }}",
|
4
|
+
"name": {{ site.title | smartify | jsonify }},
|
5
|
+
"short_name": {{ site.pwa.short_name | smartify | jsonify }},
|
6
|
+
"icons": [
|
7
|
+
{
|
8
|
+
"src": "{{ "/assets/img/touch/android-chrome-192x192.png" | prepend: site.baseurl }}",
|
9
|
+
"sizes": "192x192",
|
10
|
+
"type": "image/png"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"src": "{{ "/assets/img/touch/android-chrome-512x512.png" | prepend: site.baseurl }}",
|
14
|
+
"sizes": "512x512",
|
15
|
+
"type": "image/png"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"src": "{{ "/assets/img/touch/android-chrome-maskable-192x192.png" | prepend: site.baseurl }}",
|
19
|
+
"sizes": "192x192",
|
20
|
+
"type": "image/png",
|
21
|
+
"purpose": "maskable"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"src": "{{ "/assets/img/touch/android-chrome-maskable-512x512.png" | prepend: site.baseurl }}",
|
25
|
+
"sizes": "512x512",
|
26
|
+
"type": "image/png",
|
27
|
+
"purpose": "maskable"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
"theme_color": "{{ site.pwa.color }}",
|
31
|
+
"background_color": "{{ site.pwa.color }}",
|
32
|
+
"start_url": "{{ "/" | prepend: site.baseurl }}",
|
33
|
+
"display": "standalone",
|
34
|
+
"orientation": "natural"
|
35
|
+
}
|
data/_layouts/page.html
CHANGED
@@ -32,6 +32,37 @@ description: 或许是最漂亮的Jekyll主题
|
|
32
32
|
<div class="article-list">
|
33
33
|
<div class="post-content" style="padding-left: 30px;padding-right: 30px;width: auto;">
|
34
34
|
<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 %}
|
35
66
|
{{ content | extlinks }}
|
36
67
|
</article>
|
37
68
|
</div>
|
data/_layouts/post.html
CHANGED
@@ -18,9 +18,9 @@
|
|
18
18
|
<div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
|
19
19
|
<![endif]-->
|
20
20
|
{% if site.gray %}
|
21
|
-
<div id=all class="post gray">
|
21
|
+
<div id=all class="post gray" data-theme="{{ site.theme-color }}">
|
22
22
|
{% else %}
|
23
|
-
<div id="all" class="post">
|
23
|
+
<div id="all" class="post" data-theme="{{ site.theme-color }}">
|
24
24
|
{% endif %}
|
25
25
|
<div class="alert-tip" id="no-previous">
|
26
26
|
{{ post.tips.left }}
|
@@ -111,13 +111,42 @@
|
|
111
111
|
{% if site.toc %}
|
112
112
|
<div class="container">
|
113
113
|
<div class="contents">
|
114
|
-
<article class="markdown-body">
|
115
|
-
|
114
|
+
<article class="markdown-body post">
|
115
|
+
{% if page.langs %}
|
116
|
+
<p><b>{{ locales.langs }}</b>
|
117
|
+
{% assign langs = "zh-Hans, zh-Hant, en, ja" | split: ", " %}
|
118
|
+
{% assign langnames = "简中, 繁中, EN, 日本語" | split: ", " %}
|
119
|
+
{% if lang == site.default_lang %}
|
120
|
+
{% assign url = page.url %}
|
121
|
+
{% else %}
|
122
|
+
{% assign urls = page.url | split: '/' %}
|
123
|
+
{% assign url = "" %}
|
124
|
+
{% for u in urls offset:2 %}
|
125
|
+
{% assign url = url | append: "/" | append: u %}
|
126
|
+
{% endfor %}
|
127
|
+
{% endif %}
|
128
|
+
{% for l in page.langs %}
|
129
|
+
{% for i in (0..4) %}
|
130
|
+
{% if langs[i] == l %}
|
131
|
+
{% if l == page.lang %}
|
132
|
+
{{ langnames[i] }}
|
133
|
+
{% elsif l == site.default_lang %}
|
134
|
+
<a href="{{ url }}">{{ langnames[i] }}</a>
|
135
|
+
{% else %}
|
136
|
+
{% assign prefix = "/" | append: l %}
|
137
|
+
<a href="{{ url | prepend: prefix }}">{{ langnames[i] }}</a>
|
138
|
+
{% endif %}
|
139
|
+
{% endif %}
|
140
|
+
{% endfor %}
|
141
|
+
{% endfor %}
|
142
|
+
</p>
|
143
|
+
{% endif %}
|
144
|
+
{{ page.content | extlinks }}
|
116
145
|
<div class="post-copyright">
|
117
146
|
<p>
|
118
147
|
<span>{{ copyright.statement.name }}:</span>
|
119
148
|
{{ copyright.statement.left }}
|
120
|
-
<a href="{{ site.url }}">{{ site.title }}</a>
|
149
|
+
<a href="{{ site.url }}" class="cplink">{{ site.title }}</a>
|
121
150
|
{{ copyright.statement.middle }}
|
122
151
|
</p>
|
123
152
|
{% if site.cclicense %}
|
@@ -128,7 +157,7 @@
|
|
128
157
|
</p>
|
129
158
|
{% endif %}
|
130
159
|
<p><span>{{ copyright.title }}:</span>《 {{ page.title }} 》</p>
|
131
|
-
<p><span>{{ copyright.link }}:</span><a href="{{ page.url | prepend: site.url }}">{{ page.url | prepend: site.url }}</a></p>
|
160
|
+
<p><span>{{ copyright.link }}:</span><a href="{{ page.url | prepend: site.url }}" class="cplink">{{ page.url | prepend: site.url }}</a></p>
|
132
161
|
<p class="tips">{{ copyright.statement.outdate1 }} <span></span> {{ copyright.statement.outdate2 }}</p>
|
133
162
|
</div>
|
134
163
|
</article>
|
@@ -140,13 +169,42 @@
|
|
140
169
|
</div>
|
141
170
|
{% else %}
|
142
171
|
<article class="markdown-body">
|
172
|
+
{% if page.langs %}
|
173
|
+
<p><b>{{ locales.langs }}</b>
|
174
|
+
{% assign langs = "zh-Hans, zh-Hant, en, ja" | split: ", " %}
|
175
|
+
{% assign langnames = "简中, 繁中, EN, 日本語" | split: ", " %}
|
176
|
+
{% if lang == site.default_lang %}
|
177
|
+
{% assign url = page.url %}
|
178
|
+
{% else %}
|
179
|
+
{% assign urls = page.url | split: '/' %}
|
180
|
+
{% assign url = "" %}
|
181
|
+
{% for u in urls offset:2 %}
|
182
|
+
{% assign url = url | append: "/" | append: u %}
|
183
|
+
{% endfor %}
|
184
|
+
{% endif %}
|
185
|
+
{% for l in page.langs %}
|
186
|
+
{% for i in (0..4) %}
|
187
|
+
{% if langs[i] == l %}
|
188
|
+
{% if l == page.lang %}
|
189
|
+
{{ langnames[i] }}
|
190
|
+
{% elsif l == site.default_lang %}
|
191
|
+
<a href="{{ url }}">{{ langnames[i] }}</a>
|
192
|
+
{% else %}
|
193
|
+
{% assign prefix = "/" | append: l %}
|
194
|
+
<a href="{{ url | prepend: prefix }}">{{ langnames[i] }}</a>
|
195
|
+
{% endif %}
|
196
|
+
{% endif %}
|
197
|
+
{% endfor %}
|
198
|
+
{% endfor %}
|
199
|
+
</p>
|
200
|
+
{% endif %}
|
143
201
|
{{ page.content }}
|
144
202
|
<div class="post-copyright">
|
145
203
|
{% assign copyright = post.copyright %}
|
146
204
|
<p>
|
147
205
|
<span>{{ copyright.statement.name }}:</span>
|
148
206
|
{{ copyright.statement.left }}
|
149
|
-
<a href="{{ site.url }}">{{ site.title }}</a>
|
207
|
+
<a href="{{ site.url }}" class="cplink">{{ site.title }}</a>
|
150
208
|
{{ copyright.statement.middle }}
|
151
209
|
</p>
|
152
210
|
{% if site.cclicense %}
|
@@ -157,7 +215,7 @@
|
|
157
215
|
</p>
|
158
216
|
{% endif %}
|
159
217
|
<p><span>{{ copyright.title }}:</span>《 {{ page.title }} 》</p>
|
160
|
-
<p><span>{{ copyright.link }}:</span><a href="{{ page.url | prepend: site.url }}">{{ page.url | prepend: site.url }}</a></p>
|
218
|
+
<p><span>{{ copyright.link }}:</span><a href="{{ page.url | prepend: site.url }}" class="cplink">{{ page.url | prepend: site.url }}</a></p>
|
161
219
|
<p class="tips">{{ copyright.statement.outdate1 }} <span></span> {{ copyright.statement.outdate2 }}</p>
|
162
220
|
</div>
|
163
221
|
</article>
|
@@ -321,6 +379,19 @@
|
|
321
379
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.2/plugin/customParseFormat.js"></script>
|
322
380
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.2/plugin/relativeTime.js"></script>
|
323
381
|
<script>
|
382
|
+
/**
|
383
|
+
* Better Scroll Experience
|
384
|
+
*/
|
385
|
+
function scrollToAdjust(id){
|
386
|
+
var element = document.getElementById(id);
|
387
|
+
var headerOffset = 90;
|
388
|
+
var elementPosition = element.getBoundingClientRect().top;
|
389
|
+
var offsetPosition = elementPosition + window.scrollY - headerOffset;
|
390
|
+
window.scrollTo({
|
391
|
+
top: offsetPosition,
|
392
|
+
behavior: "smooth"
|
393
|
+
});
|
394
|
+
}
|
324
395
|
// 给图片添加链接
|
325
396
|
$(document).ready(function() {
|
326
397
|
var baseurl = $("meta[property='og:baseurl']").attr('content');
|
@@ -0,0 +1,7 @@
|
|
1
|
+
[{% for post in site.posts %}
|
2
|
+
{
|
3
|
+
"title" : "{{ post.title | escape }}",
|
4
|
+
"tags" : "{% for tag in post.tags %}{% if forloop.rindex != 1 %}{{ tag }} {% else %}{{ tag }}{% endif %}{% endfor %}",
|
5
|
+
"url" : "{{ post.url | relative_url }}"
|
6
|
+
} {% unless forloop.last %},{% endunless %}
|
7
|
+
{% endfor %}]
|
data/_layouts/sw.js
CHANGED
@@ -4,11 +4,11 @@ const offlineFallbackPage = "index.html";
|
|
4
4
|
|
5
5
|
// Install stage sets up the index page (home page) in the cache and opens a new cache
|
6
6
|
self.addEventListener("install", function (event) {
|
7
|
-
console.log("Install Event processing");
|
7
|
+
// console.log("Install Event processing");
|
8
8
|
|
9
9
|
event.waitUntil(
|
10
10
|
caches.open(CACHE).then(function (cache) {
|
11
|
-
console.log("Cached offline page during install");
|
11
|
+
// console.log("Cached offline page during install");
|
12
12
|
|
13
13
|
if (offlineFallbackPage === "ToDo-replace-this-name.html") {
|
14
14
|
return cache.add(new Response("Update the value of the offlineFallbackPage constant in the serviceworker."));
|
@@ -26,7 +26,7 @@ if (event.request.method !== "GET") return;
|
|
26
26
|
event.respondWith(
|
27
27
|
fetch(event.request)
|
28
28
|
.then(function (response) {
|
29
|
-
console.log("Add page to offline cache: " + response.url);
|
29
|
+
// console.log("Add page to offline cache: " + response.url);
|
30
30
|
|
31
31
|
// If request was success, add or update it in the cache
|
32
32
|
event.waitUntil(updateCache(event.request, response.clone()));
|
@@ -34,7 +34,7 @@ event.respondWith(
|
|
34
34
|
return response;
|
35
35
|
})
|
36
36
|
.catch(function (error) {
|
37
|
-
console.log("Network request Failed. Serving content from cache: " + error);
|
37
|
+
// console.log("Network request Failed. Serving content from cache: " + error);
|
38
38
|
return fromCache(event.request);
|
39
39
|
})
|
40
40
|
);
|
data/_layouts/tags.html
CHANGED
@@ -5,7 +5,7 @@ layout: default
|
|
5
5
|
|
6
6
|
{% include header.html %}
|
7
7
|
|
8
|
-
<div class="g-banner tags-banner {{ site.postPatterns | prepend: 'post-pattern-' }}
|
8
|
+
<div class="g-banner tags-banner {{ site.postPatterns | prepend: 'post-pattern-' }}" data-theme="{{ site.theme-color }}">
|
9
9
|
<h2>TAGS</h2>
|
10
10
|
</div>
|
11
11
|
|
@@ -24,7 +24,7 @@ layout: default
|
|
24
24
|
{% for i in (1..max_tag_count) reversed %}
|
25
25
|
{% for tag in site.tags %}
|
26
26
|
{% if tag[1].size == i %}
|
27
|
-
<a href="{{ page.url }}
|
27
|
+
<a href="{{ page.url }}#{{ tag[0] }}" class="tag">
|
28
28
|
{{ tag[0] }}<sup>{{ i }}</sup>
|
29
29
|
</a>
|
30
30
|
{% endif %}
|