jekyll-theme-chirpy 4.3.4 → 5.0.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/README.md +5 -5
- data/_config.yml +9 -5
- data/_data/locales/en.yml +2 -1
- data/_data/locales/id-ID.yml +2 -1
- data/_data/locales/ko-KR.yml +91 -0
- data/_data/locales/zh-CN.yml +2 -1
- data/_includes/{disqus.html → comments/disqus.html} +4 -4
- data/_includes/comments/utterances.html +51 -0
- data/_includes/comments.html +5 -0
- data/_includes/footer.html +1 -1
- data/_includes/js-selector.html +1 -1
- data/_includes/mermaid.html +28 -0
- data/_includes/mode-toggle.html +48 -65
- data/_includes/read-time.html +3 -3
- data/_includes/refactor-content.html +109 -35
- data/_includes/related-posts.html +1 -1
- data/_includes/search-results.html +0 -8
- data/_includes/sidebar.html +10 -11
- data/_includes/timeago.html +11 -12
- data/_includes/toc.html +16 -0
- data/_includes/topbar.html +1 -1
- data/_includes/trending-tags.html +14 -0
- data/_includes/update-list.html +16 -0
- data/_layouts/default.html +6 -2
- data/_layouts/home.html +12 -9
- data/_layouts/page.html +45 -22
- data/_layouts/post.html +128 -127
- data/_sass/addon/commons.scss +154 -175
- data/_sass/addon/module.scss +48 -28
- data/_sass/addon/syntax.scss +55 -44
- data/_sass/addon/variables.scss +1 -1
- data/_sass/colors/dark-syntax.scss +3 -4
- data/_sass/colors/dark-typography.scss +11 -8
- data/_sass/colors/light-syntax.scss +3 -3
- data/_sass/colors/light-typography.scss +4 -5
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/home.scss +6 -2
- data/_sass/layout/post.scss +52 -46
- data/assets/js/dist/categories.min.js +2 -2
- data/assets/js/dist/commons.min.js +2 -2
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +2 -2
- metadata +7 -4
- data/_includes/panel.html +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fded96e3d7dfaafecb7d2af83d0018f303650108f335e81bad7d092d6dd6a29c
|
4
|
+
data.tar.gz: 1fd6bef006b5c74a6cd130a1ccb31bedb35ffcb4e4ce94e51d9954ac828e00eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ab039f7c14fefecc792ed1ca2838c13f72620cebf1a4d03e9b1eb4dc5c44dfe565a4e69af8aa0b0b386463ca44acd22eabdf53f7ca1504b02ffbc0e44143aa
|
7
|
+
data.tar.gz: ffbcc3c8332a960882acbd84d7cee887de4a097a598cce2e479f0936212b95547fea96ccdf3f17f8d650bc1808ccdab46fffb61711c9b3fd00397a7a0cdf82c1
|
data/README.md
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
17
17
|
[](https://996.icu)
|
18
18
|
|
19
|
-
[**Live Demo →**](https://
|
19
|
+
[**Live Demo →**](https://cotes2020.github.io/chirpy-demo)
|
20
20
|
|
21
|
-
[](https://cotes2020.github.io/chirpy-demo)
|
22
22
|
|
23
23
|
</div>
|
24
24
|
|
@@ -158,7 +158,7 @@ Now publish your Jekyll site by:
|
|
158
158
|
|
159
159
|
2. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar, and then in the section **Source** of _GitHub Pages_, select the `/(root)` directory of branch `gh-pages` as the [publishing source][pages-src]. Remember to click <kbd>Save</kbd> before leaving.
|
160
160
|
|
161
|
-

|
162
162
|
|
163
163
|
3. Visit your website at the address indicated by GitHub.
|
164
164
|
|
@@ -208,7 +208,7 @@ The merge is likely to conflict with your local modifications. Please be patient
|
|
208
208
|
|
209
209
|
## Documentation
|
210
210
|
|
211
|
-
For more details and a better reading experience, please check out the [tutorials on the demo site](https://
|
211
|
+
For more details and a better reading experience, please check out the [tutorials on the demo site](https://cotes2020.github.io/chirpy-demo/categories/tutorial/). In the meanwhile, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Please note that the tutorials on the demo website or Wiki are based on the latest release, and the features of `master` branch are usually ahead of the documentation.
|
212
212
|
|
213
213
|
## Contributing
|
214
214
|
|
@@ -226,7 +226,7 @@ Last but not least, thank [JetBrains][jb] for providing the open source license.
|
|
226
226
|
|
227
227
|
If you like this theme or find it helpful, please consider sponsoring me, because it will encourage and help me better maintain the project, I will be very grateful!
|
228
228
|
|
229
|
-
[](https://ko-fi.com/coteschung)
|
230
230
|
[][cn-donation]
|
231
231
|
[][cn-donation]
|
232
232
|
|
data/_config.yml
CHANGED
@@ -87,9 +87,15 @@ avatar:
|
|
87
87
|
# boolean type, the global switch for ToC in posts.
|
88
88
|
toc: true
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
comments:
|
91
|
+
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
|
92
|
+
# The active options are as follows:
|
93
|
+
disqus:
|
94
|
+
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
|
95
|
+
# utterances settings › https://utteranc.es/
|
96
|
+
utterances:
|
97
|
+
repo: # <gh-username>/<repo>
|
98
|
+
issue_term: # < url | pathname | title | ...>
|
93
99
|
|
94
100
|
paginate: 10
|
95
101
|
|
@@ -111,7 +117,6 @@ collections:
|
|
111
117
|
output: true
|
112
118
|
sort_by: order
|
113
119
|
|
114
|
-
|
115
120
|
defaults:
|
116
121
|
-
|
117
122
|
scope:
|
@@ -136,7 +141,6 @@ defaults:
|
|
136
141
|
values:
|
137
142
|
layout: page
|
138
143
|
permalink: /:title/
|
139
|
-
dynamic_title: true # Hide title in mobile screens.
|
140
144
|
|
141
145
|
sass:
|
142
146
|
style: compressed
|
data/_data/locales/en.yml
CHANGED
data/_data/locales/id-ID.yml
CHANGED
@@ -0,0 +1,91 @@
|
|
1
|
+
# The layout text of site
|
2
|
+
|
3
|
+
# ----- Commons label -----
|
4
|
+
|
5
|
+
layout:
|
6
|
+
post: 포스트
|
7
|
+
category: 카테고리
|
8
|
+
tag: 태그
|
9
|
+
|
10
|
+
# The tabs of sidebar
|
11
|
+
tabs:
|
12
|
+
# format: <filename_without_extension>: <value>
|
13
|
+
home: 홈
|
14
|
+
categories: 카테고리
|
15
|
+
tags: 태그
|
16
|
+
archives: 아카이브
|
17
|
+
about: 정보
|
18
|
+
|
19
|
+
# the text displayed in the search bar & search results
|
20
|
+
search:
|
21
|
+
hint: 검색
|
22
|
+
cancel: 취소
|
23
|
+
no_results: 검색 결과가 없습니다.
|
24
|
+
|
25
|
+
panel:
|
26
|
+
lastmod: 최근 업데이트
|
27
|
+
trending_tags: 인기 태그
|
28
|
+
toc: 바로가기
|
29
|
+
|
30
|
+
# The liquid date format › http://strftime.net/
|
31
|
+
date_format:
|
32
|
+
tooltip: '%F, %R %z'
|
33
|
+
post:
|
34
|
+
long: '%Y년 %m월 %d일'
|
35
|
+
short: '%m월 %d일'
|
36
|
+
archive_month: '%b월'
|
37
|
+
|
38
|
+
copyright:
|
39
|
+
# Shown at the bottom of the post
|
40
|
+
license:
|
41
|
+
template: 이 기사는 저작권자의 :LICENSE_NAME 라이센스를 따릅니다.
|
42
|
+
name: CC BY 4.0
|
43
|
+
link: https://creativecommons.org/licenses/by/4.0/
|
44
|
+
|
45
|
+
# Displayed in the footer
|
46
|
+
brief: 일부 권리 보유
|
47
|
+
verbose: >-
|
48
|
+
명시되지 않는 한 이 사이트의 블로그 게시물은 작성자의
|
49
|
+
Creative Commons Attribution 4.0 International(CC BY 4.0) 라이선스에 따라 사용이 허가되었습니다.
|
50
|
+
|
51
|
+
meta: Powered by :PLATFORM with :THEME theme.
|
52
|
+
|
53
|
+
not_found:
|
54
|
+
statment: 해당 URL은 존재하지 않습니다.
|
55
|
+
hint_template: :HEAD_BAK을 눌러 다시 찾거나 :ARCHIVES_PAGE에서 검색해 주세요.
|
56
|
+
head_back: 홈으로 돌아가기
|
57
|
+
archives_page: 아카이브 페이지
|
58
|
+
|
59
|
+
# ----- Posts related labels -----
|
60
|
+
|
61
|
+
post:
|
62
|
+
written_by: By
|
63
|
+
posted: 게시
|
64
|
+
updated: 업데이트
|
65
|
+
timeago:
|
66
|
+
day: 일 전
|
67
|
+
hour: 시간 전
|
68
|
+
minute: 분 전
|
69
|
+
just_now: 방금
|
70
|
+
words: 단어
|
71
|
+
pageview_measure: 조회
|
72
|
+
read_time:
|
73
|
+
unit: 분
|
74
|
+
prompt: 읽는 시간
|
75
|
+
relate_posts: 관련된 글
|
76
|
+
share: 공유하기
|
77
|
+
button:
|
78
|
+
next: 다음 글
|
79
|
+
previous: 이전 글
|
80
|
+
copy_code:
|
81
|
+
succeed: 복사되었습니다!
|
82
|
+
share_link:
|
83
|
+
title: 링크 복사하기
|
84
|
+
succeed: 링크가 복사되었습니다!
|
85
|
+
# pinned prompt of posts list on homepage
|
86
|
+
pin_prompt: 핀
|
87
|
+
|
88
|
+
# categories page
|
89
|
+
categories:
|
90
|
+
category_measure: 카테고리
|
91
|
+
post_measure: 포스트
|
data/_data/locales/zh-CN.yml
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
<!--
|
2
2
|
The Disqus lazy loading.
|
3
3
|
-->
|
4
|
-
|
5
4
|
<div id="disqus_thread" class="pt-2 pb-2">
|
6
5
|
<p class="text-center text-muted small">
|
7
6
|
Comments powered by <a href="https://disqus.com/">Disqus</a>.
|
@@ -9,6 +8,7 @@
|
|
9
8
|
</div>
|
10
9
|
|
11
10
|
<script type="text/javascript">
|
11
|
+
|
12
12
|
var disqus_config = function () {
|
13
13
|
this.page.url = '{{ page.url | absolute_url }}';
|
14
14
|
this.page.identifier = '{{ page.url }}';
|
@@ -20,7 +20,7 @@
|
|
20
20
|
if(entries[0].isIntersecting) {
|
21
21
|
(function () {
|
22
22
|
var d = document, s = d.createElement('script');
|
23
|
-
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
|
23
|
+
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
24
24
|
s.setAttribute('data-timestamp', +new Date());
|
25
25
|
(d.head || d.body).appendChild(s);
|
26
26
|
})();
|
@@ -46,8 +46,8 @@
|
|
46
46
|
|
47
47
|
const modeToggle = document.querySelector(".mode-toggle");
|
48
48
|
|
49
|
-
if (modeToggle !==
|
50
|
-
modeToggle.addEventListener('click', reloadDisqus);
|
49
|
+
if (typeof modeToggle !== "undefined") {
|
50
|
+
/* modeToggle.addEventListener('click', reloadDisqus); // not pretty for 'color-scheme' */
|
51
51
|
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', reloadDisqus);
|
52
52
|
}
|
53
53
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<!-- https://utteranc.es/ -->
|
2
|
+
<script src="https://utteranc.es/client.js"
|
3
|
+
repo="{{ site.comments.utterances.repo }}"
|
4
|
+
issue-term="{{ site.comments.utterances.issue_term }}"
|
5
|
+
crossorigin="anonymous"
|
6
|
+
async>
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
$(function() {
|
11
|
+
const origin = "https://utteranc.es";
|
12
|
+
const iframe = "iframe.utterances-frame";
|
13
|
+
const lightTheme = "github-light";
|
14
|
+
const darkTheme = "github-dark";
|
15
|
+
let initTheme = lightTheme;
|
16
|
+
|
17
|
+
if ($("html[mode=dark]").length > 0
|
18
|
+
|| ($("html[mode]").length == 0
|
19
|
+
&& window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
20
|
+
initTheme = darkTheme;
|
21
|
+
}
|
22
|
+
|
23
|
+
addEventListener("message", (event) => {
|
24
|
+
let theme;
|
25
|
+
|
26
|
+
/* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
|
27
|
+
if (event.origin === origin) {
|
28
|
+
/* page initial */
|
29
|
+
theme = initTheme;
|
30
|
+
|
31
|
+
} else if (event.source === window && event.data &&
|
32
|
+
event.data.direction === ModeToggle.ID) {
|
33
|
+
/* global theme mode changed */
|
34
|
+
const mode = event.data.message;
|
35
|
+
theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
|
36
|
+
|
37
|
+
} else {
|
38
|
+
return;
|
39
|
+
}
|
40
|
+
|
41
|
+
const message = {
|
42
|
+
type: "set-theme",
|
43
|
+
theme: theme
|
44
|
+
};
|
45
|
+
|
46
|
+
const utterances = document.querySelector(iframe).contentWindow;
|
47
|
+
utterances.postMessage(message, origin);
|
48
|
+
});
|
49
|
+
|
50
|
+
});
|
51
|
+
</script>
|
data/_includes/footer.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
-->
|
4
4
|
|
5
5
|
<footer class="d-flex w-100 justify-content-center">
|
6
|
-
<div class="d-flex justify-content-between align-items-center">
|
6
|
+
<div class="d-flex justify-content-between align-items-center text-muted">
|
7
7
|
<div class="footer-left">
|
8
8
|
<p class="mb-0">
|
9
9
|
© {{ 'now' | date: "%Y" }}
|
data/_includes/js-selector.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<!-- layout specified -->
|
6
6
|
|
7
|
-
{% if page.layout == '
|
7
|
+
{% if page.layout == 'post' %}
|
8
8
|
{% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
|
9
9
|
<!-- pv-report needs countup.js -->
|
10
10
|
<script async src="https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js"></script>
|
data/_includes/mermaid.html
CHANGED
@@ -3,8 +3,34 @@
|
|
3
3
|
-->
|
4
4
|
|
5
5
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js"></script>
|
6
|
+
|
6
7
|
<script>
|
7
8
|
$(function() {
|
9
|
+
function updateMermaid(event) {
|
10
|
+
if (event.source === window && event.data &&
|
11
|
+
event.data.direction === ModeToggle.ID) {
|
12
|
+
|
13
|
+
const mode = event.data.message;
|
14
|
+
|
15
|
+
if (typeof mermaid === "undefined") {
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
let expectedTheme = (mode === ModeToggle.DARK_MODE? "dark" : "default");
|
20
|
+
let config = { theme: expectedTheme };
|
21
|
+
|
22
|
+
/* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
|
23
|
+
$(".mermaid").each(function() {
|
24
|
+
let svgCode = $(this).prev().children().html();
|
25
|
+
$(this).removeAttr("data-processed");
|
26
|
+
$(this).html(svgCode);
|
27
|
+
});
|
28
|
+
|
29
|
+
mermaid.initialize(config);
|
30
|
+
mermaid.init(undefined, ".mermaid");
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
8
34
|
let initTheme = "default";
|
9
35
|
|
10
36
|
if ($("html[mode=dark]").length > 0
|
@@ -25,5 +51,7 @@
|
|
25
51
|
});
|
26
52
|
|
27
53
|
mermaid.initialize(mermaidConf);
|
54
|
+
|
55
|
+
window.addEventListener("message", updateMermaid);
|
28
56
|
});
|
29
57
|
</script>
|
data/_includes/mode-toggle.html
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
Switch the mode between dark and light.
|
3
3
|
-->
|
4
4
|
|
5
|
-
<i class="mode-toggle fas fa-adjust"></i>
|
6
|
-
|
7
5
|
<script type="text/javascript">
|
8
|
-
|
9
6
|
class ModeToggle {
|
10
7
|
static get MODE_KEY() { return "mode"; }
|
11
8
|
static get DARK_MODE() { return "dark"; }
|
12
9
|
static get LIGHT_MODE() { return "light"; }
|
10
|
+
static get ID() { return "mode-toggle"; }
|
13
11
|
|
14
12
|
constructor() {
|
15
13
|
if (this.hasMode) {
|
@@ -24,10 +22,10 @@
|
|
24
22
|
}
|
25
23
|
}
|
26
24
|
|
27
|
-
|
25
|
+
let self = this;
|
28
26
|
|
29
27
|
/* always follow the system prefers */
|
30
|
-
this.sysDarkPrefers.
|
28
|
+
this.sysDarkPrefers.addEventListener("change", () => {
|
31
29
|
if (self.hasMode) {
|
32
30
|
if (self.isDarkMode) {
|
33
31
|
if (!self.isSysDarkPrefer) {
|
@@ -43,34 +41,19 @@
|
|
43
41
|
self.clearMode();
|
44
42
|
}
|
45
43
|
|
46
|
-
self.
|
44
|
+
self.notify();
|
45
|
+
|
47
46
|
});
|
48
47
|
|
49
48
|
} /* constructor() */
|
50
49
|
|
51
|
-
|
52
|
-
setDark() {
|
53
|
-
$('html').attr(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
|
54
|
-
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
|
55
|
-
}
|
56
|
-
|
57
|
-
setLight() {
|
58
|
-
$('html').attr(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
|
59
|
-
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
|
60
|
-
}
|
61
|
-
|
62
|
-
clearMode() {
|
63
|
-
$('html').removeAttr(ModeToggle.MODE_KEY);
|
64
|
-
sessionStorage.removeItem(ModeToggle.MODE_KEY);
|
65
|
-
}
|
66
|
-
|
67
50
|
get sysDarkPrefers() { return window.matchMedia("(prefers-color-scheme: dark)"); }
|
68
51
|
|
69
52
|
get isSysDarkPrefer() { return this.sysDarkPrefers.matches; }
|
70
53
|
|
71
|
-
get isDarkMode() { return this.mode
|
54
|
+
get isDarkMode() { return this.mode === ModeToggle.DARK_MODE; }
|
72
55
|
|
73
|
-
get isLightMode() { return this.mode
|
56
|
+
get isLightMode() { return this.mode === ModeToggle.LIGHT_MODE; }
|
74
57
|
|
75
58
|
get hasMode() { return this.mode != null; }
|
76
59
|
|
@@ -79,67 +62,67 @@
|
|
79
62
|
/* get the current mode on screen */
|
80
63
|
get modeStatus() {
|
81
64
|
if (this.isDarkMode
|
82
|
-
|| (!this.hasMode && this.isSysDarkPrefer)
|
65
|
+
|| (!this.hasMode && this.isSysDarkPrefer)) {
|
83
66
|
return ModeToggle.DARK_MODE;
|
84
67
|
} else {
|
85
68
|
return ModeToggle.LIGHT_MODE;
|
86
69
|
}
|
87
70
|
}
|
88
71
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
72
|
+
setDark() {
|
73
|
+
$('html').attr(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
|
74
|
+
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.DARK_MODE);
|
75
|
+
}
|
76
|
+
|
77
|
+
setLight() {
|
78
|
+
$('html').attr(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
|
79
|
+
sessionStorage.setItem(ModeToggle.MODE_KEY, ModeToggle.LIGHT_MODE);
|
80
|
+
}
|
93
81
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
$(this).html(svgCode);
|
99
|
-
});
|
82
|
+
clearMode() {
|
83
|
+
$('html').removeAttr(ModeToggle.MODE_KEY);
|
84
|
+
sessionStorage.removeItem(ModeToggle.MODE_KEY);
|
85
|
+
}
|
100
86
|
|
101
|
-
|
102
|
-
|
103
|
-
|
87
|
+
/* Notify another plugins that the theme mode has changed */
|
88
|
+
notify() {
|
89
|
+
window.postMessage({
|
90
|
+
direction: ModeToggle.ID,
|
91
|
+
message: this.modeStatus
|
92
|
+
}, "*");
|
104
93
|
}
|
105
94
|
|
106
|
-
|
107
|
-
if (this.hasMode) {
|
108
|
-
if (this.isSysDarkPrefer) {
|
109
|
-
if (this.isLightMode) {
|
110
|
-
this.clearMode();
|
111
|
-
} else {
|
112
|
-
this.setLight();
|
113
|
-
}
|
95
|
+
} /* ModeToggle */
|
114
96
|
|
97
|
+
const toggle = new ModeToggle();
|
98
|
+
|
99
|
+
function flipMode() {
|
100
|
+
if (toggle.hasMode) {
|
101
|
+
if (toggle.isSysDarkPrefer) {
|
102
|
+
if (toggle.isLightMode) {
|
103
|
+
toggle.clearMode();
|
115
104
|
} else {
|
116
|
-
|
117
|
-
this.clearMode();
|
118
|
-
} else {
|
119
|
-
this.setDark();
|
120
|
-
}
|
105
|
+
toggle.setLight();
|
121
106
|
}
|
122
107
|
|
123
108
|
} else {
|
124
|
-
if (
|
125
|
-
|
109
|
+
if (toggle.isDarkMode) {
|
110
|
+
toggle.clearMode();
|
126
111
|
} else {
|
127
|
-
|
112
|
+
toggle.setDark();
|
128
113
|
}
|
129
114
|
}
|
130
115
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
$(".mode-toggle").click(function() {
|
116
|
+
} else {
|
117
|
+
if (toggle.isSysDarkPrefer) {
|
118
|
+
toggle.setLight();
|
119
|
+
} else {
|
120
|
+
toggle.setDark();
|
121
|
+
}
|
122
|
+
}
|
140
123
|
|
141
|
-
toggle.
|
124
|
+
toggle.notify();
|
142
125
|
|
143
|
-
})
|
126
|
+
} /* flipMode() */
|
144
127
|
|
145
128
|
</script>
|
data/_includes/read-time.html
CHANGED
@@ -22,9 +22,9 @@
|
|
22
22
|
<!-- return element -->
|
23
23
|
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
24
24
|
title="{{ words }} {{ site.data.locales[lang].post.words }}">
|
25
|
-
{{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}
|
25
|
+
<em>{{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}</em>
|
26
26
|
{%- if include.prompt -%}
|
27
|
-
{
|
28
|
-
{
|
27
|
+
{%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
|
28
|
+
{%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
|
29
29
|
{%- endif -%}
|
30
30
|
</span>
|