jekyll-theme-h2o-ac 1.3.5 → 1.4.0
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/_config.yml +24 -2
- data/_includes/layouts/footer.html +71 -30
- data/_includes/layouts/head.html +3 -2
- data/_includes/layouts/header.html +1 -1
- data/_includes/layouts/metainfo.html +3 -3
- data/_includes/plugins/analytics/busuanzi.html +4 -0
- data/_includes/plugins/comments/artalk_css.html +3 -0
- data/_includes/plugins/comments/artalk_js.html +16 -0
- data/_includes/plugins/comments/comments_block.html +168 -27
- data/_includes/plugins/comments/comments_js.html +10 -9
- data/_includes/plugins/comments/disqus.html +1 -1
- data/_includes/plugins/comments/giscus_js.html +54 -0
- data/_includes/plugins/comments/twikoo_js.html +13 -0
- data/_includes/plugins/comments/utterances_js.html +10 -0
- data/_includes/plugins/comments/waline_js.html +1 -1
- data/_includes/plugins/markdown/fancybox_css.html +1 -1
- data/_includes/plugins/markdown/fancybox_js.html +1 -1
- data/_includes/plugins/markdown/mathjax.html +1 -2
- data/_includes/plugins/markdown/mermaid_js.html +1 -1
- data/_includes/plugins/markdown/prism_css.html +4 -4
- data/_includes/plugins/markdown/prism_js.html +3 -3
- data/_layouts/default.html +1 -1
- data/_layouts/post.html +7 -1
- data/_layouts/tags.html +0 -2
- data/assets/css/app.min.css +1 -1
- data/assets/css/app.min.css.map +1 -1
- data/assets/icons/cloudflare-logo.webp +0 -0
- data/assets/icons/forever_en_default.png +0 -0
- data/assets/icons/netlify-icon-light.svg +22 -0
- data/assets/icons/travellings.gif +0 -0
- data/assets/icons/vercel-logotype-dark.png +0 -0
- data/assets/icons/wormhole_3.gif +0 -0
- data/assets/js/app.min.js +1 -1
- data/assets/js/app.min.js.map +1 -1
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5466d537d2ee649f401585c16ce9194fd405b0e759592fb70fcc92c9f9d341e0
|
4
|
+
data.tar.gz: cb1fb4039283854556cc05fb1ef93c51cf1c5afadd36d74384fd3122cf65f001
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b101f71a2afa8d30008f00553dc23245aa71927d240386cc3d03bb3a8b7b76763bd8c732aaa832c21d452dc1cdcac0fbb70536231ba7b0a4ebd8d8c71c928c
|
7
|
+
data.tar.gz: 1a8cb8127f492b42a8c02dd5a77232d9d793001365545290a3ee1973bcfbdb580cf5f1adb2d61ce38c3b4dedf3af5062cae46d417ea3077aec44187a74d70219
|
data/_config.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# jekyll-theme-h2o-ac
|
2
|
-
version: 1.
|
2
|
+
version: 1.4.0
|
3
3
|
|
4
4
|
# Site settings 配置站点
|
5
5
|
title: 'Mr Li'
|
@@ -73,9 +73,26 @@ comments:
|
|
73
73
|
disqus: false
|
74
74
|
disqus_url: 'https://h2o-ac.disqus.com/embed.js'
|
75
75
|
waline: false
|
76
|
-
waline_url: 'https://h2o-ac-waline.
|
76
|
+
waline_url: 'https://h2o-ac-waline.lisz.top/'
|
77
77
|
waline_reaction: false
|
78
78
|
waline_locale:
|
79
|
+
artalk: false
|
80
|
+
artalk_url: 'https://artalk.lisz.top'
|
81
|
+
artalk_name: 'h2o-ac'
|
82
|
+
artalk_uaBadge: false
|
83
|
+
utterances: false
|
84
|
+
utterances_url: 'https://utteranc.es/client.js'
|
85
|
+
# utterances_repo: 'zhonger/utterances-comments'
|
86
|
+
giscus: false
|
87
|
+
giscus_url: 'https://giscus.app/client.js'
|
88
|
+
# giscus_repo: 'zhonger/giscus-comments'
|
89
|
+
# giscus_repo_id: 'R_kgDONLt80A'
|
90
|
+
# giscus_category_id: 'DIC_kwDONLt80M4CkDnG'
|
91
|
+
giscus_lang: 'zh-CN'
|
92
|
+
twikoo: false
|
93
|
+
twikoo_url: 'https://twikoo.lisz.top'
|
94
|
+
# twikoo_region: 'ap-shanghai'
|
95
|
+
# twikoo_lang: 'zh-CN'
|
79
96
|
|
80
97
|
# MathJax 公式支持 by Ray-Eldath
|
81
98
|
mathjax: true
|
@@ -114,6 +131,9 @@ supports:
|
|
114
131
|
|
115
132
|
# Badges
|
116
133
|
badges:
|
134
|
+
netlify: true # Netlify
|
135
|
+
vercel: true # Vercel
|
136
|
+
cloudflare: true # Cloudflare
|
117
137
|
foreverblog: true # Foreverblog
|
118
138
|
wormhole: true # Wormhole
|
119
139
|
travelling: true # Travelling
|
@@ -125,6 +145,7 @@ alivestart: "12/23/2021"
|
|
125
145
|
|
126
146
|
# Beian 备案号
|
127
147
|
beian: '沪ICP备xxxxxxxx号'
|
148
|
+
# moe_beian: 'xxxxxxxx'
|
128
149
|
|
129
150
|
# CC License
|
130
151
|
cclicense: true
|
@@ -135,6 +156,7 @@ cnzz:
|
|
135
156
|
|
136
157
|
# Busuanzi Analytics
|
137
158
|
busuanzi: true
|
159
|
+
#busuanzi_url: https://busuanzi.lisz.top/js
|
138
160
|
|
139
161
|
# Umami Analytics
|
140
162
|
umami:
|
@@ -6,28 +6,33 @@
|
|
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 }}"
|
10
|
-
|
9
|
+
{% if site.version %} (<a href="https://github.com/zhonger/jekyll-theme-H2O-ac/releases/tag/v{{ site.version }}"
|
10
|
+
target="_blank" class="extlinks">v{{ site.version }}</a>){% endif %}
|
11
|
+
{% if site.supports.webify %} & <a href="https://webify.cloudbase.net/" target="_blank"
|
12
|
+
class="extlinks">CloudBase Webify</a> {% endif %}
|
11
13
|
</section>
|
12
14
|
<section class="links">{{ site.title }} ©
|
13
15
|
{% assign current = "now" | date: "%Y" | plus: 0%}
|
14
16
|
{% unless site.footer.since and site.footer.since == current %}
|
15
|
-
|
16
|
-
|
17
|
+
{{ site.footer.since }}
|
18
|
+
-
|
17
19
|
{% endunless %}
|
18
20
|
{{ current }}
|
19
21
|
{% if site.beian and site.beian != "" %}
|
20
|
-
|
22
|
+
<a href="https://beian.miit.gov.cn/" target="_blank" class="extlinks">{{ site.beian }}</a>
|
23
|
+
{% endif %}
|
24
|
+
{% if site.moe_beian and site.moe_beian != "" %}
|
25
|
+
<a href="https://icp.gov.moe/?keyword={{ site.moe_beian }}" target="_blank" class="extlinks">萌ICP备{{ site.moe_beian }}号</a>
|
21
26
|
{% endif %}
|
22
27
|
<a href="/rss.xml" target="_blank" aria-label="Terms of Service" class="others">
|
23
28
|
<svg class="icon" aria-hidden="true">
|
24
29
|
<use xlink:href="#icon-rss"></use>
|
25
|
-
</svg> RSS
|
30
|
+
</svg> RSS
|
26
31
|
</a>
|
27
32
|
<a href="/tos" target="_blank" aria-label="Terms of Service" class="others">
|
28
33
|
<svg class="icon" aria-hidden="true">
|
29
34
|
<use xlink:href="#icon-tos"></use>
|
30
|
-
</svg> {{footer.tos.name}}
|
35
|
+
</svg> {{footer.tos.name}}
|
31
36
|
</a>
|
32
37
|
</section>
|
33
38
|
{% if site.busuanzi %}
|
@@ -35,63 +40,98 @@
|
|
35
40
|
<span id="busuanzi_container_site_pv">
|
36
41
|
<svg class="icon" aria-hidden="true">
|
37
42
|
<use xlink:href="#icon-pv"></use>
|
38
|
-
</svg> {{ footer.views }}
|
43
|
+
</svg> {{ footer.views }}
|
44
|
+
{% if site.busuanzi_url %}
|
45
|
+
<span id="busuanzi_site_pv">
|
46
|
+
{% else %}
|
47
|
+
<span id="busuanzi_value_site_pv"></span>
|
48
|
+
{% endif %}
|
49
|
+
<b>·</b>
|
50
|
+
</span>
|
39
51
|
</span>
|
40
52
|
<span id="busuanzi_container_site_uv">
|
41
53
|
<svg class="icon" aria-hidden="true">
|
42
54
|
<use xlink:href="#icon-user"></use>
|
43
|
-
</svg> {{ footer.visitors }}
|
55
|
+
</svg> {{ footer.visitors }}
|
56
|
+
{% if site.busuanzi_url %}
|
57
|
+
<span id="busuanzi_site_uv"></span>
|
58
|
+
{% else %}
|
59
|
+
<span id="busuanzi_value_site_uv"></span>
|
60
|
+
{% endif %}
|
44
61
|
</span>
|
45
62
|
</section>
|
46
63
|
{% endif %}
|
47
64
|
<section>
|
48
65
|
{% if site.alivetime %}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
66
|
+
{{ footer.running.info }}
|
67
|
+
<span class="alivetime_days"></span> {{ footer.running.day }}
|
68
|
+
<span class="alivetime_hours"></span> {{ footer.running.hour }}
|
69
|
+
<span class="alivetime_minutes"></span> {{ footer.running.minute }}
|
70
|
+
<span class="alivetime_seconds"></span> {{ footer.running.second }}
|
54
71
|
{% endif %}
|
55
72
|
</section>
|
56
73
|
</div>
|
57
74
|
<div class="g-right">
|
58
75
|
{% if site.supports.upyun %}
|
59
76
|
<section>
|
60
|
-
<a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" class="extlinks">{{
|
77
|
+
<a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="_blank" class="extlinks">{{
|
78
|
+
footer.upyun }} <img src="{{ "/assets/icons/upyun.png" | prepend: site.baseurl }}" class="upyun" alt="upyun" /></a>
|
79
|
+
</section>
|
80
|
+
{% endif %}
|
81
|
+
{% if site.badges.netlify or site.badges.vercel or site.badges.cloudflare %}
|
82
|
+
<section class="badges">
|
83
|
+
{% if site.badges.netlify %}
|
84
|
+
<a href="https://netlify.com" target="_blank" class="netlify" aria-label="netlify">
|
85
|
+
<img src="{{ "/assets/icons/netlify-icon-light.svg" | prepend: site.baseurl }}" alt="netlify">
|
86
|
+
</a>
|
87
|
+
{% endif %}
|
88
|
+
{% if site.badges.vercel %}
|
89
|
+
<a href="https://vercel.com" target="_blank" class="vercel" aria-label="vercel">
|
90
|
+
<img src="{{ "/assets/icons/vercel-logotype-dark.png" | prepend: site.baseurl }}" alt="vercel">
|
91
|
+
</a>
|
92
|
+
{% endif %}
|
93
|
+
{% if site.badges.cloudflare %}
|
94
|
+
<a href="https://www.cloudflare.com" target="_blank" class="cloudflare" aria-label="cloudflare">
|
95
|
+
<img src="{{ "/assets/icons/cloudflare-logo.webp" | prepend: site.baseurl }}" alt="cloudflare">
|
96
|
+
</a>
|
97
|
+
{% endif %}
|
61
98
|
</section>
|
62
99
|
{% endif %}
|
63
100
|
{% if site.badges.foreverblog or site.badges.wormhole or site.badges.travelling or site.badges.notbyAI %}
|
64
101
|
<section class="badges">
|
65
102
|
{% if site.badges.foreverblog %}
|
66
|
-
|
67
|
-
|
68
|
-
|
103
|
+
<a href="https://www.foreverblog.cn/" target="_blank" class="foreverblog" aria-label="foreverblog">
|
104
|
+
<img src="{{ "/assets/icons/forever_en_default.png" | prepend: site.baseurl }}" alt="foreverblog">
|
105
|
+
</a>
|
69
106
|
{% endif %}
|
70
107
|
{% if site.badges.wormhole %}
|
71
|
-
|
72
|
-
|
73
|
-
|
108
|
+
<a href="https://www.foreverblog.cn/go.html" target="_blank" class="wormhole" aria-label="wormhole">
|
109
|
+
<img src="{{ "/assets/icons/wormhole_3.gif" | prepend: site.baseurl }}" alt="" title="穿梭虫洞-随机访问十年之约友链博客">
|
110
|
+
</a>
|
74
111
|
{% endif%}
|
75
112
|
{% if site.badges.travelling %}
|
76
|
-
|
77
|
-
|
78
|
-
|
113
|
+
<a href="https://www.travellings.cn/go.html" target="_blank" class="travelling-badge" aria-label="Travelling"
|
114
|
+
rel="noopener" title="开往-友链接力">
|
115
|
+
<img src="{{ "/assets/icons/travellings.gif" | prepend: site.baseurl }}" alt="开往-友链接力">
|
116
|
+
</a>
|
79
117
|
{% endif %}
|
80
118
|
{% if site.badges.notbyAI %}
|
81
|
-
|
82
|
-
|
83
|
-
|
119
|
+
<a href="https://notbyai.fyi/" target="_blank" class="notbyAI" aria-label="notbyAI">
|
120
|
+
<img src="{{ "/assets/icons/notbyAI-white.png" | prepend: site.baseurl }}" alt="Written by Human, Not by AI">
|
121
|
+
</a>
|
84
122
|
{% endif %}
|
85
123
|
</section>
|
86
124
|
{% endif %}
|
87
125
|
</div>
|
88
126
|
{% if site.cnzz %}
|
89
|
-
<script
|
127
|
+
<script
|
128
|
+
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>
|
90
129
|
{% endif %}
|
91
130
|
</div>
|
92
131
|
</footer>
|
93
132
|
<div class="cookie-tip">
|
94
|
-
{{ cookie.cookieconsent_status }} {{ footer.tos.left }}「 <a href="{{ site.tos | prepend: site.baseurl }}">{{
|
133
|
+
{{ cookie.cookieconsent_status }} {{ footer.tos.left }}「 <a href="{{ site.tos | prepend: site.baseurl }}">{{
|
134
|
+
footer.tos.middle }}</a> 」{{ footer.tos.right }}
|
95
135
|
|
96
136
|
<button id="accept-tos">{{ footer.tos.btn }}</button>
|
97
137
|
</div>
|
@@ -107,7 +147,8 @@
|
|
107
147
|
</svg>
|
108
148
|
</div>
|
109
149
|
{% endif %}
|
110
|
-
{% if page.content contains 'h1' or page.content contains 'h2' or page.content contains 'h3' or page.content contains
|
150
|
+
{% if page.content contains 'h1' or page.content contains 'h2' or page.content contains 'h3' or page.content contains
|
151
|
+
'h4' or page.content contains 'h5' or page.content contains 'h6' and site.toc %}
|
111
152
|
<div class="tool toc">
|
112
153
|
<svg class="icon b1 active" aria-hidden="true">
|
113
154
|
<use xlink:href="#icon-toc"></use>
|
data/_includes/layouts/head.html
CHANGED
@@ -54,8 +54,8 @@
|
|
54
54
|
<link rel="icon" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
|
55
55
|
<link rel="bookmark" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
|
56
56
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.min.css" async>
|
57
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont
|
58
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css
|
57
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont/style.css" />
|
58
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css/github-markdown-light.min.css">
|
59
59
|
{% if layout.type == "post" %}
|
60
60
|
{% include plugins/others/social_css.html%}
|
61
61
|
{% include plugins/markdown/fancybox_css.html %}
|
@@ -64,6 +64,7 @@
|
|
64
64
|
{% endif %}
|
65
65
|
{% include plugins/markdown/prism_css.html %}
|
66
66
|
{% include plugins/comments/waline_css.html %}
|
67
|
+
{% include plugins/comments/artalk_css.html %}
|
67
68
|
{% include plugins/search/docsearch_css.html %}
|
68
69
|
<link rel="stylesheet" href="{{ "/assets/css/app.min.css" | prepend: site.baseurl }}">
|
69
70
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{% for i in site.nav %}
|
32
32
|
{% if i[1].first %}
|
33
33
|
<li class="dropdown">
|
34
|
-
<a class="dropdown-toggle" href="
|
34
|
+
<a class="dropdown-toggle" href="javascript:void(0);"> {{ i[0] }} </a>
|
35
35
|
<ul class="dropdown-menu">
|
36
36
|
{% for j in i[1] %}
|
37
37
|
<li>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
2
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
3
|
-
<script src="https://cdn.jsdelivr.net/npm/dayjs
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/dayjs.min.js"></script>
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/customParseFormat.js"></script>
|
3
|
+
<script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/relativeTime.js"></script>
|
4
4
|
<script>
|
5
5
|
$(document).ready(function () {
|
6
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'];
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{% if page.comments.artalk or site.comments.artalk and layout.type == "post" %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/artalk/dist/Artalk.min.js"></script>
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
if ($("#artalk").length > 0) {
|
6
|
+
Artalk.init({
|
7
|
+
el: '#artalk',
|
8
|
+
pageKey: '{{ page.url }}',
|
9
|
+
server: '{{ site.comments.artalk_url }}',
|
10
|
+
site: '{{ site.comments.artalk_name }}',
|
11
|
+
uaBadge: '{% if site.comments.artalk_uaBadge %}{{ site.comments.artalk_uaBadge }}{% else %}true{% endif %}'
|
12
|
+
});
|
13
|
+
}
|
14
|
+
});
|
15
|
+
</script>
|
16
|
+
{% endif %}
|
@@ -1,5 +1,61 @@
|
|
1
|
+
{% assign page_comments = "" %}
|
2
|
+
{% assign page_comments_num = 0 %}
|
3
|
+
{% if page.comments.disqus %}
|
4
|
+
{% assign page_comments = page_comments | append: "disqus, " %}
|
5
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
6
|
+
{% endif %}
|
7
|
+
{% if page.comments.waline %}
|
8
|
+
{% assign page_comments = page_comments | append: "waline, " %}
|
9
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
10
|
+
{% endif %}
|
11
|
+
{% if page.comments.artalk %}
|
12
|
+
{% assign page_comments = page_comments | append: "artalk, " %}
|
13
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
14
|
+
{% endif %}
|
15
|
+
{% if page.comments.utterances %}
|
16
|
+
{% assign page_comments = page_comments | append: "utterances, " %}
|
17
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
18
|
+
{% endif %}
|
19
|
+
{% if page.comments.giscus %}
|
20
|
+
{% assign page_comments = page_comments | append: "giscus, " %}
|
21
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
22
|
+
{% endif %}
|
23
|
+
{% if page.comments.twikoo %}
|
24
|
+
{% assign page_comments = page_comments | append: "twikoo, " %}
|
25
|
+
{% assign page_comments_num = page_comments_num | plus: 1 %}
|
26
|
+
{% endif %}
|
27
|
+
{% assign page_comments = page_comments | split: ", " %}
|
28
|
+
|
29
|
+
{% assign total_comments = "" %}
|
30
|
+
{% assign total_comments_num = 0 %}
|
31
|
+
{% if page.comments.disqus or site.comments.disqus and page.comments.disqus == nil %}
|
32
|
+
{% assign total_comments = total_comments | append: "disqus, " %}
|
33
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
34
|
+
{% endif %}
|
35
|
+
{% if page.comments.waline or site.comments.waline and page.comments.waline == nil %}
|
36
|
+
{% assign total_comments = total_comments | append: "waline, " %}
|
37
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
38
|
+
{% endif %}
|
39
|
+
{% if page.comments.artalk or site.comments.artalk and page.comments.artalk == nil %}
|
40
|
+
{% assign total_comments = total_comments | append: "artalk, " %}
|
41
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
42
|
+
{% endif %}
|
43
|
+
{% if page.comments.utterances or site.comments.utterances and page.comments.utterances == nil %}
|
44
|
+
{% assign total_comments = total_comments | append: "utterances, " %}
|
45
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
46
|
+
{% endif %}
|
47
|
+
{% if page.comments.giscus or site.comments.giscus and page.comments.giscus == nil %}
|
48
|
+
{% assign total_comments = total_comments | append: "giscus, " %}
|
49
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
50
|
+
{% endif %}
|
51
|
+
{% if page.comments.twikoo or site.comments.twikoo and page.comments.twikoo == nil %}
|
52
|
+
{% assign total_comments = total_comments | append: "twikoo, " %}
|
53
|
+
{% assign total_comments_num = total_comments_num | plus: 1 %}
|
54
|
+
{% endif %}
|
55
|
+
{% assign total_comments = total_comments | split: ", " %}
|
56
|
+
|
1
57
|
{% capture block %}
|
2
|
-
<section class="post-footer-item comment">
|
58
|
+
<section class="post-footer-item comment comment-switch">
|
3
59
|
<div class="comments-headline">
|
4
60
|
<svg class="icon" aria-hidden="true">
|
5
61
|
<use xlink:href="#icon-comment"></use>
|
@@ -7,61 +63,146 @@
|
|
7
63
|
<span>{{ locales.post.comment }}</span>
|
8
64
|
</div>
|
9
65
|
{% if layout.type == "post" %}
|
10
|
-
{% if
|
66
|
+
{% if total_comments_num >= 2 %}
|
11
67
|
<div id="comments-switch">
|
12
|
-
<span class="first-comment">
|
68
|
+
<span class="first-comment">{{ total_comments[0] | capitalize }}</span>
|
13
69
|
<span class="switch-button">
|
14
70
|
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
15
71
|
<label for="cmn-toggle-4"></label>
|
16
72
|
</span>
|
17
|
-
<span class="second-comment">
|
73
|
+
<span class="second-comment">{{ total_comments[1] | capitalize }}</span>
|
18
74
|
</div>
|
19
75
|
{% endif %}
|
20
76
|
{% else %}
|
21
|
-
{% if
|
77
|
+
{% if page_comments_num >= 2 %}
|
22
78
|
<div id="comments-switch">
|
23
|
-
<span class="first-comment">
|
79
|
+
<span class="first-comment">{{ page_comments[0] | capitalize }}</span>
|
24
80
|
<span class="switch-button">
|
25
81
|
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
26
82
|
<label for="cmn-toggle-4"></label>
|
27
83
|
</span>
|
28
|
-
<span class="second-comment">
|
84
|
+
<span class="second-comment">{{ page_comments[1] | capitalize }}</span>
|
29
85
|
</div>
|
30
86
|
{% endif %}
|
31
87
|
{% endif %}
|
32
88
|
</section>
|
33
89
|
{% endcapture %}
|
34
90
|
|
91
|
+
{% capture disqus_block %}
|
92
|
+
<section class="post-footer-item comment">
|
93
|
+
<div id="disqus_thread"></div>
|
94
|
+
</section>
|
95
|
+
{% endcapture %}
|
96
|
+
|
97
|
+
{% capture waline_block %}
|
98
|
+
<section class="post-footer-item comment">
|
99
|
+
<div id="waline"></div>
|
100
|
+
</section>
|
101
|
+
{% endcapture %}
|
102
|
+
|
103
|
+
{% capture artalk_block %}
|
104
|
+
<section class="post-footer-item comment">
|
105
|
+
<div id="artalk"></div>
|
106
|
+
</section>
|
107
|
+
{% endcapture %}
|
108
|
+
|
109
|
+
{% capture utterances_block %}
|
110
|
+
<section class="post-footer-item comment">
|
111
|
+
{% include plugins/comments/utterances_js.html %}
|
112
|
+
</section>
|
113
|
+
{% endcapture %}
|
114
|
+
|
115
|
+
{% capture giscus_block %}
|
116
|
+
<section class="post-footer-item comment">
|
117
|
+
<div class="giscus"></div>
|
118
|
+
</section>
|
119
|
+
{% endcapture %}
|
120
|
+
|
121
|
+
{% capture twikoo_block %}
|
122
|
+
<section class="post-footer-item comment">
|
123
|
+
<div id="twikoo"></div>
|
124
|
+
</section>
|
125
|
+
{% endcapture %}
|
126
|
+
|
35
127
|
{% if layout.type == "post" %}
|
36
|
-
{% if
|
128
|
+
{% if total_comments_num > 0 %}
|
37
129
|
{{ block }}
|
38
130
|
{% endif %}
|
39
131
|
{% else %}
|
40
|
-
{% if
|
132
|
+
{% if page_comments_num > 0 %}
|
41
133
|
{{ block }}
|
42
134
|
{% endif %}
|
43
135
|
{% endif %}
|
44
136
|
|
45
137
|
{% if layout.type == "post" %}
|
46
|
-
{% if
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
138
|
+
{% if total_comments_num >= 2 %}
|
139
|
+
{% for comments in total_comments limit: 2 %}
|
140
|
+
{% if comments == "disqus" %}
|
141
|
+
{{ disqus_block }}
|
142
|
+
{% elsif comments == "waline" %}
|
143
|
+
{{ waline_block }}
|
144
|
+
{% elsif comments == "artalk" %}
|
145
|
+
{{ artalk_block }}
|
146
|
+
{% elsif comments == "utterances" %}
|
147
|
+
{{ utterances_block }}
|
148
|
+
{% elsif comments == "giscus" %}
|
149
|
+
{{ giscus_block }}
|
150
|
+
{% elsif comments == "twikoo" %}
|
151
|
+
{{ twikoo_block }}
|
152
|
+
{% endif %}
|
153
|
+
{% endfor %}
|
154
|
+
{% elsif total_comments_num > 0 %}
|
155
|
+
{% for comments in total_comments %}
|
156
|
+
{% if comments == "disqus" %}
|
157
|
+
{{ disqus_block }}
|
158
|
+
{% elsif comments == "waline" %}
|
159
|
+
{{ waline_block }}
|
160
|
+
{% elsif comments == "artalk" %}
|
161
|
+
{{ artalk_block }}
|
162
|
+
{% elsif comments == "utterances" %}
|
163
|
+
{{ utterances_block }}
|
164
|
+
{% elsif comments == "giscus" %}
|
165
|
+
{{ giscus_block }}
|
166
|
+
{% elsif comments == "twikoo" %}
|
167
|
+
{{ twikoo_block }}
|
168
|
+
{% endif %}
|
169
|
+
{% endfor %}
|
55
170
|
{% endif %}
|
56
171
|
{% else %}
|
57
|
-
{% if
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
172
|
+
{% if page_comments_num >= 2 %}
|
173
|
+
{% for comments in page_comments limit: 2 %}
|
174
|
+
{% if comments == "disqus" %}
|
175
|
+
{{ disqus_block }}
|
176
|
+
{% elsif comments == "waline" %}
|
177
|
+
{{ waline_block }}
|
178
|
+
{% elsif comments == "artalk" %}
|
179
|
+
{{ artalk_block }}
|
180
|
+
{% elsif comments == "utterances" %}
|
181
|
+
{{ utterances_block }}
|
182
|
+
{% elsif comments == "giscus" %}
|
183
|
+
{{ giscus_block }}
|
184
|
+
{% elsif comments == "twikoo" %}
|
185
|
+
{{ twikoo_block }}
|
186
|
+
{% endif %}
|
187
|
+
{% endfor %}
|
188
|
+
{% else %}
|
189
|
+
{% if page.comments.disqus %}
|
190
|
+
{{ disqus_block }}
|
191
|
+
{% endif %}
|
192
|
+
{% if page.comments.waline %}
|
193
|
+
{{ waline_block }}
|
194
|
+
{% endif %}
|
195
|
+
{% if page.comments.artalk %}
|
196
|
+
{{ artalk_block }}
|
197
|
+
{% endif %}
|
198
|
+
{% if page.comments.utterances %}
|
199
|
+
{{ utterances_block }}
|
200
|
+
{% endif %}
|
201
|
+
{% if page.comments.giscus %}
|
202
|
+
{{ giscus_block }}
|
203
|
+
{% endif %}
|
204
|
+
{% if page.comments.twikoo %}
|
205
|
+
{{ twikoo_block }}
|
206
|
+
{% endif %}
|
66
207
|
{% endif %}
|
67
208
|
{% endif %}
|
@@ -1,23 +1,24 @@
|
|
1
1
|
{% include plugins/comments/disqus.html %}
|
2
2
|
{% include plugins/comments/waline_js.html %}
|
3
|
+
{% include plugins/comments/artalk_js.html %}
|
4
|
+
{% include plugins/comments/giscus_js.html %}
|
5
|
+
{% include plugins/comments/twikoo_js.html %}
|
3
6
|
<script>
|
4
7
|
$(document).ready(function () {
|
5
|
-
if ($("
|
8
|
+
if ($(".comment").length == 3) {
|
6
9
|
var comment_status = $("#cmn-toggle-4")[0].checked;
|
7
10
|
if (comment_status) {
|
8
|
-
$("
|
11
|
+
$(".comment:last > div").addClass("active");
|
9
12
|
} else {
|
10
|
-
$("
|
13
|
+
$(".comment:nth-last-child(2) > div").addClass("active");
|
11
14
|
}
|
12
15
|
$("#cmn-toggle-4").click(function () {
|
13
|
-
$("
|
14
|
-
$("
|
16
|
+
$(".comment:nth-last-child(2) > div").toggleClass("active");
|
17
|
+
$(".comment:last > div").toggleClass("active");
|
15
18
|
})
|
16
19
|
} else {
|
17
|
-
if ($("
|
18
|
-
$("
|
19
|
-
} else if ($("#waline").length > 0) {
|
20
|
-
$("#waline").addClass("active");
|
20
|
+
if ($(".comment").length == 2) {
|
21
|
+
$(".comment:last > div").addClass("active")
|
21
22
|
}
|
22
23
|
}
|
23
24
|
})
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{% if
|
1
|
+
{% if page.comments.utterances or site.comments.disqus and layout.type == "post" %}
|
2
2
|
<script>
|
3
3
|
/**
|
4
4
|
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
|