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.
- checksums.yaml +4 -4
- data/_config.yml +12 -17
- data/_data/collections.yml +2 -2
- data/_includes/{footer.html → layouts/footer.html} +9 -4
- data/_includes/{post-head.html → layouts/head.html} +36 -29
- data/_includes/{header.html → layouts/header.html} +24 -0
- data/_includes/layouts/metainfo.html +40 -0
- data/_includes/{paginate-article.html → layouts/paginate-article.html} +8 -1
- data/_includes/{paginate.html → layouts/paginate.html} +5 -5
- data/_includes/{sidebar.html → layouts/sidebar.html} +10 -9
- data/_includes/layouts/submenu.html +30 -0
- data/_includes/plugins/analytics/analytics.html +3 -0
- data/_includes/{analytics.html → plugins/analytics/google.html} +1 -2
- data/_includes/plugins/comments/comments_block.html +67 -0
- data/_includes/plugins/comments/comments_js.html +24 -0
- data/_includes/plugins/comments/disqus.html +19 -0
- data/_includes/plugins/comments/waline_css.html +3 -0
- data/_includes/plugins/comments/waline_js.html +14 -0
- data/_includes/plugins/i18n.html +32 -0
- data/_includes/plugins/markdown/fancybox_css.html +1 -0
- data/_includes/plugins/markdown/fancybox_js.html +24 -0
- data/_includes/plugins/markdown/hotkeys.html +31 -0
- data/_includes/plugins/markdown/markdown.html +7 -0
- data/_includes/plugins/markdown/mermaid_block.html +10 -0
- data/_includes/plugins/markdown/mermaid_js.html +12 -0
- data/_includes/plugins/markdown/prism_css.html +16 -0
- data/_includes/plugins/markdown/prism_js.html +3 -0
- data/_includes/{calendar.html → plugins/others/calendar_block.html} +1 -1
- data/_includes/plugins/others/calendar_css.html +3 -0
- data/_includes/plugins/others/calendar_js.html +8 -0
- data/_includes/plugins/others/social_block.html +5 -0
- data/_includes/plugins/others/social_css.html +1 -0
- data/_includes/plugins/others/social_js.html +15 -0
- data/_includes/plugins/search/docsearch_css.html +3 -0
- data/_includes/plugins/search/docsearch_js.html +19 -0
- data/_layouts/404.html +17 -0
- data/_layouts/archives.html +70 -65
- data/_layouts/blog.html +4 -10
- data/_layouts/categories.html +3 -1
- data/_layouts/default.html +64 -54
- data/_layouts/page.html +17 -87
- data/_layouts/post.html +145 -434
- data/_layouts/stats.html +32 -2
- data/_layouts/tags.html +2 -2
- data/assets/css/app.min.css +1 -1
- data/assets/css/app.min.css.map +1 -1
- data/assets/js/app.min.js +1 -1
- data/assets/js/app.min.js.map +1 -1
- metadata +42 -22
- data/_includes/comments.html +0 -53
- data/_includes/head.html +0 -51
- data/_includes/mermaid.html +0 -12
- data/_includes/submenu.html +0 -20
- data/_includes/waline.html +0 -3
- /data/_includes/{pageNav.html → layouts/pageNav.html} +0 -0
- /data/_includes/{toc.html → layouts/toc.html} +0 -0
- /data/_includes/{busuanzi.html → plugins/analytics/busuanzi.html} +0 -0
- /data/_includes/{umami.html → plugins/analytics/umami.html} +0 -0
- /data/_includes/{mathjax.html → plugins/markdown/mathjax.html} +0 -0
- /data/_includes/{pwa.html → plugins/others/pwa.html} +0 -0
- /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,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,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 @@
|
|
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,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
|
+
|
data/_layouts/archives.html
CHANGED
@@ -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">
|
62
|
+
<span class="text">{{panel.calendar_less}}</span>
|
60
63
|
<div id="ex-ghDay-legend2"></div>
|
61
|
-
<span class="text">
|
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
|
-
|
69
|
-
|
70
|
-
<
|
71
|
-
|
72
|
-
|
73
|
-
<
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
{
|
78
|
-
|
79
|
-
{
|
80
|
-
|
81
|
-
{
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
{%
|
89
|
-
|
90
|
-
|
91
|
-
{%
|
92
|
-
{%
|
93
|
-
|
94
|
-
|
95
|
-
{%
|
96
|
-
|
97
|
-
|
98
|
-
<
|
99
|
-
<
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
<
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
<
|
112
|
-
<
|
113
|
-
|
114
|
-
|
115
|
-
{
|
116
|
-
|
117
|
-
{
|
118
|
-
|
119
|
-
{
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
{%
|
127
|
-
|
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
|
-
|
28
|
-
|
29
|
-
</main>
|
30
|
-
|
31
|
-
{% include footer.html %}
|
24
|
+
{% include layouts/sidebar.html %}
|
25
|
+
</main>
|
data/_layouts/categories.html
CHANGED
@@ -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>
|
data/_layouts/default.html
CHANGED
@@ -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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
{%
|
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
|
-
{%
|
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
|
-
|
106
|
-
|
107
|
-
</main>
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
{% include footer.html %}
|
40
|
+
{% include layouts/sidebar.html %}
|
41
|
+
</main>
|