jekyll-theme-chirpy 5.3.2 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e41cb04667d603c381a6aa8e231c57faf6bda11954062aa72af53c4b9f718d4c
4
- data.tar.gz: 4fd7e8955a48fef7aad7419de3a0922eaf560b5e8cd352fe072da9c0992ffbc7
3
+ metadata.gz: 32212ead4cede51287719a6df2db4ca1b4cf74cfbedc5614f9a968247d492546
4
+ data.tar.gz: 77f9aa0fdf8dd3d67a7c79b4aef5d4f9f15a53b5a6760ae42832c8b9c7216650
5
5
  SHA512:
6
- metadata.gz: 2fceeed912b19646cb445f22db8b5e69b3c7e1e12f1441a9f10265e08c018d6d11ba7ec404df00479cc68bdc6df20d8958d88068c879bc43d0f04d18c030a27a
7
- data.tar.gz: 951db9e3015c1d599c982388ba12adbdfa93ce763d93bd82e0994940efaa295a76fbc59c1eefa81ba9ea356b21a6a56910c8725a94a60d3939dcc6d44bc8289f
6
+ metadata.gz: 7004962eddbeec0c295fc5bff0644a4e08c0162a7572d5bbe04e17aca72ba57da12bdea70e0799a94c9cc4367c372be1eb6850ecb80dc449ad9eb2c1366b797b
7
+ data.tar.gz: 4c7a15af9ab52c7af0b0631edb58998ba465715c69a49966b37667076e6a6ad09648fa46b19895c65236f537830a4798f54f7b07bc0b4dd7ed7b77298d216cd0
data/README.md CHANGED
@@ -12,30 +12,31 @@
12
12
 
13
13
  [**Live Demo →**](https://cotes2020.github.io/chirpy-demo)
14
14
 
15
- [![Devices Mockup](https://raw.githubusercontent.com/cotes2020/chirpy-images/main/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
15
+ [![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
16
16
 
17
17
  </div>
18
18
 
19
19
  ## Features
20
20
 
21
- - Localized Layout
22
21
  - Dark/Light Theme Mode
22
+ - Localized UI language
23
23
  - Pinned Posts
24
24
  - Hierarchical Categories
25
- - Last Modified Date for Posts
25
+ - Trending Tags
26
26
  - Table of Contents
27
- - Auto-generated Related Posts
27
+ - Last Modified Date of Posts
28
28
  - Syntax Highlighting
29
29
  - Mathematical Expressions
30
30
  - Mermaid Diagram & Flowchart
31
+ - Dark/Light Mode Images
32
+ - Embed Videos
31
33
  - Disqus/Utterances/Giscus Comments
32
34
  - Search
33
35
  - Atom Feeds
34
36
  - Google Analytics
35
- - GA Pageviews Reporting
37
+ - Page Views Reporting
36
38
  - SEO & Performance Optimization
37
39
 
38
-
39
40
  ## Quick Start
40
41
 
41
42
  Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed.
@@ -16,47 +16,47 @@ webfonts: https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:w
16
16
  # Libraries
17
17
 
18
18
  jquery:
19
- js: https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
19
+ js: https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js
20
20
 
21
21
  bootstrap:
22
- css: https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css
23
- js: https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.bundle.min.js
22
+ css: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css
23
+ js: https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js
24
24
 
25
25
  bootstrap-toc:
26
26
  css: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.css
27
27
  js: https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js
28
28
 
29
29
  fontawesome:
30
- css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css
30
+ css: https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.1/css/all.min.css
31
31
 
32
32
  search:
33
33
  js: https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js
34
34
 
35
35
  mermaid:
36
- js: https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.min.js
36
+ js: https://cdn.jsdelivr.net/npm/mermaid@9.2.2/dist/mermaid.min.js
37
37
 
38
38
  dayjs:
39
39
  js:
40
- common: https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js
41
- locale: https://cdn.jsdelivr.net/npm/dayjs@1/locale/:LOCALE.min.js
42
- relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.min.js
43
- localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1/plugin/localizedFormat.min.js
40
+ common: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/dayjs.min.js
41
+ locale: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/locale/:LOCALE.min.js
42
+ relativeTime: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/relativeTime.min.js
43
+ localizedFormat: https://cdn.jsdelivr.net/npm/dayjs@1.11.6/plugin/localizedFormat.min.js
44
44
 
45
45
  countup:
46
46
  js: https://cdn.jsdelivr.net/npm/countup.js@1.9.3/dist/countUp.min.js
47
47
 
48
48
  magnific-popup:
49
- css: https://cdn.jsdelivr.net/npm/magnific-popup@1/dist/magnific-popup.min.css
50
- js: https://cdn.jsdelivr.net/npm/magnific-popup@1/dist/jquery.magnific-popup.min.js
49
+ css: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/magnific-popup.min.css
50
+ js: https://cdn.jsdelivr.net/npm/magnific-popup@1.1.0/dist/jquery.magnific-popup.min.js
51
51
 
52
- lozad:
53
- js: https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js
52
+ lazysizes:
53
+ js: https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js
54
54
 
55
55
  clipboard:
56
- js: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js
56
+ js: https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js
57
57
 
58
58
  polyfill:
59
59
  js: https://polyfill.io/v3/polyfill.min.js?features=es6
60
60
 
61
61
  mathjax:
62
- js: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js
62
+ js: https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-chtml.js
@@ -38,8 +38,8 @@ magnific-popup:
38
38
  css: /assets/lib/magnific-popup-1.1.0/magnific-popup.css
39
39
  js: /assets/lib/magnific-popup-1.1.0/jquery.magnific-popup.min.js
40
40
 
41
- lozad:
42
- js: /assets/lib/lozad-1.16.0/lozad.min.js
41
+ lazysizes:
42
+ js: /assets/lib/lazysizes-5.3.2/lazysizes.min.js
43
43
 
44
44
  clipboard:
45
45
  js: /assets/lib/clipboard-2.0.9/clipboard.min.js
data/_data/contact.yml CHANGED
@@ -19,7 +19,7 @@
19
19
  # -
20
20
  # type: mastodon
21
21
  # icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
22
- # url: '' # Fill with your mastodon account page
22
+ # url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification
23
23
  # -
24
24
  # type: linkedin
25
25
  # icon: 'fab fa-linkedin' # icons powered by <https://fontawesome.com/>
@@ -5,7 +5,7 @@
5
5
  layout:
6
6
  post: Публикация
7
7
  category: Категория
8
- tag: Тагове
8
+ tag: Таг
9
9
 
10
10
  # The tabs of sidebar
11
11
  tabs:
@@ -43,7 +43,7 @@ copyright:
43
43
  meta: Създадено чрез :PLATFORM и :THEME тема.
44
44
 
45
45
  not_found:
46
- statment: Съжалявам, но този на този URL адрес няма налично съдържание.
46
+ statment: Съжалявам, но на този URL адрес няма налично съдържание.
47
47
 
48
48
  notification:
49
49
  update_found: Налична е нова версия на съдържанието.
@@ -71,7 +71,7 @@ post:
71
71
  title: Копирай линк
72
72
  succeed: Линкът е копиран успешно!
73
73
  # pinned prompt of posts list on homepage
74
- pin_prompt: Прикрепен
74
+ pin_prompt: Прикрепенa
75
75
 
76
76
  # categories page
77
77
  categories:
data/_data/locales/en.yml CHANGED
@@ -40,7 +40,7 @@ copyright:
40
40
  Except where otherwise noted, the blog posts on this site are licensed
41
41
  under the Creative Commons Attribution 4.0 International (CC BY 4.0) License by the author.
42
42
 
43
- meta: Powered by :PLATFORM with :THEME theme.
43
+ meta: Using the :PLATFORM theme :THEME.
44
44
 
45
45
  not_found:
46
46
  statment: Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
@@ -0,0 +1,4 @@
1
+ <iframe class="embed-video twitch lazyload"
2
+ src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}"
3
+ frameborder="0" allowfullscreen="true"
4
+ scrolling="no"></iframe>
@@ -0,0 +1,6 @@
1
+ <iframe class="embed-video youtube lazyload"
2
+ src="https://www.youtube.com/embed/{{ include.id }}"
3
+ title="YouTube video player"
4
+ frameborder="0"
5
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
6
+ allowfullscreen></iframe>
@@ -17,16 +17,16 @@
17
17
  <div class="footer-right">
18
18
  <p class="mb-0">
19
19
 
20
- {% capture _platform %}
20
+ {%- capture _platform -%}
21
21
  <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
22
- {% endcapture %}
22
+ {%- endcapture -%}
23
23
 
24
- {% capture _theme %}
24
+ {%- capture _theme -%}
25
25
  <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
26
- {% endcapture %}
26
+ {%- endcapture -%}
27
27
 
28
28
  {{ site.data.locales[site.lang].meta
29
- | default: 'Powered by :PLATFORM with :THEME theme.'
29
+ | default: 'Using the :PLATFORM theme :THEME.'
30
30
  | replace: ':PLATFORM', _platform | replace: ':THEME', _theme
31
31
  }}
32
32
  </p>
data/_includes/head.html CHANGED
@@ -24,20 +24,25 @@
24
24
 
25
25
  {% if page.image %}
26
26
  {% assign img = page.image.path | default: page.image %}
27
- {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
28
- {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
29
-
30
- {% if site.img_cdn contains '//' %}
31
- <!-- it's a cross-origin URL -->
32
- {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
33
- {% else %}
34
- <!-- it's a local file path -->
35
- {%- capture replacement -%}
36
- "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
37
- {%- endcapture -%}
38
- {% endif %}
39
27
 
40
- {% assign seo_tags = seo_tags | replace: target, replacement %}
28
+ {% unless img contains '://' %}
29
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
30
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
31
+
32
+ {% if site.img_cdn contains '//' %}
33
+ <!-- it's a cross-origin URL -->
34
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
35
+ {% else %}
36
+ <!-- it's a local file path -->
37
+ {%- capture replacement -%}
38
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
39
+ {%- endcapture -%}
40
+ {% endif %}
41
+
42
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
43
+
44
+ {% endunless %}
45
+
41
46
  {% endif %}
42
47
 
43
48
  {{ seo_tags }}
@@ -15,12 +15,11 @@
15
15
  {% if page.layout == 'post' or page.layout == 'page' %}
16
16
  <!-- image lazy-loading & popup & clipboard -->
17
17
  {% assign _urls = site.data.assets[origin].magnific-popup.js
18
- | append: ',' | append: site.data.assets[origin].lozad.js
18
+ | append: ',' | append: site.data.assets[origin].lazysizes.js
19
19
  | append: ',' | append: site.data.assets[origin].clipboard.js
20
20
  %}
21
21
 
22
22
  {% include jsdelivr-combine.html urls=_urls %}
23
-
24
23
  {% endif %}
25
24
 
26
25
  {% if page.layout == 'home'
@@ -6,7 +6,6 @@
6
6
  <span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share }}</span>
7
7
  <span class="share-icons">
8
8
  {% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
9
- {% assign title = title | url_encode %}
10
9
  {% assign url = page.url | absolute_url | url_encode %}
11
10
 
12
11
  {% for share in site.data.share.platforms %}
@@ -51,31 +51,52 @@
51
51
  {% assign _img_content = nil %}
52
52
  {% assign _img_snippets = _content | split: IMG_TAG %}
53
53
 
54
+ <!-- CDN URL -->
55
+ {% if site.img_cdn %}
56
+ {% if site.img_cdn contains '//' %}
57
+ {% assign _path_prefix = site.img_cdn %}
58
+ {% else %}
59
+ {% assign _path_prefix = site.img_cdn | relative_url %}
60
+ {% endif %}
61
+ {% else %}
62
+ {% assign _path_prefix = site.baseurl %}
63
+ {% endif %}
64
+
65
+ <!-- Add image path -->
66
+ {% if page.img_path %}
67
+ {% assign _path = page.img_path | append: '/' | replace: '//', '/' %}
68
+ {% assign _path_prefix = _path_prefix | append: _path %}
69
+ {% endif %}
70
+
54
71
  {% for _img_snippet in _img_snippets %}
55
72
  {% if forloop.first %}
56
73
  {% assign _img_content = _img_snippet %}
57
74
  {% continue %}
58
75
  {% endif %}
59
76
 
60
- {% assign _width = nil %}
61
- {% assign _height = nil %}
62
- {% assign _src = nil %}
63
-
64
77
  {% assign _left = _img_snippet | split: '>' | first %}
65
78
  {% assign _right = _img_snippet | remove: _left %}
66
79
 
67
- {% assign _left = _left | remove: ' /' %}
68
- {% assign _left = _left | replace: ' w=', ' width=' | replace: ' h=', ' height=' %}
69
- {% assign _attrs = _left | split: ' ' %}
80
+ {% unless _left contains 'src=' %}
81
+ {% continue %}
82
+ {% endunless %}
83
+
84
+ {% assign _left = _left | remove: ' /' | replace: ' w=', ' width=' | replace: ' h=', ' height=' %}
85
+ {% assign _attrs = _left | split: '" ' %}
86
+
87
+ {% assign _width = nil %}
88
+ {% assign _height = nil %}
89
+ {% assign _lqip = nil %}
90
+ {% assign _class = nil %}
70
91
 
71
92
  {% for _attr in _attrs %}
72
- {% assign _pair = _attr | split: '=' %}
73
- {% if _pair.size < 2 %}
93
+ {% unless _attr contains '=' %}
74
94
  {% continue %}
75
- {% endif %}
95
+ {% endunless %}
76
96
 
97
+ {% assign _pair = _attr | remove: '"' | split: '=' %}
77
98
  {% capture _key %}{{ _pair | first }}{% endcapture %}
78
- {% capture _value %}{{ _pair | last | replace: '"', '' }}{% endcapture %}
99
+ {% capture _value %}{{ _pair | last }}{% endcapture %}
79
100
 
80
101
  {% case _key %}
81
102
  {% when 'width' %}
@@ -84,62 +105,91 @@
84
105
  {% assign _height = _value %}
85
106
  {% when 'src' %}
86
107
  {% assign _src = _value %}
108
+ {% when 'lqip' %}
109
+ {% assign _lqip = _value %}
110
+ {% when 'class' %}
111
+ {% assign _class = _value %}
87
112
  {% endcase %}
88
113
 
89
- {% if _width and _height and _src %}
90
- {% break %}
91
- {% endif %}
92
114
  {% endfor %}
93
115
 
94
- {% if _src %}
95
- {% unless _src contains '://' %}
96
-
97
- <!-- Add CDN URL -->
98
- {% if site.img_cdn %}
99
- {% if site.img_cdn contains '//' %}
100
- {% assign _src_prefix = site.img_cdn %}
101
- {% else %}
102
- {% assign _src_prefix = site.img_cdn | relative_url %}
103
- {% endif %}
104
- {% else %}
105
- {% assign _src_prefix = site.baseurl %}
106
- {% endif %}
107
-
108
- <!-- Add image path -->
109
- {% if page.img_path %}
110
- {% assign _path = page.img_path | append: '/' | replace: '//', '/' %}
111
- {% assign _src_prefix = _src_prefix | append: _path %}
112
- {% endif %}
113
-
114
- {% assign _final_src = _src_prefix | append: _src %}
115
- {% assign _left = _left | replace: _src, _final_src %}
116
-
117
- {% endunless %}
116
+ <!-- take out classes -->
117
+ {% if _class %}
118
+ {% capture _old_class %}class="{{ _class }}"{% endcapture %}
119
+ {% assign _left = _left | remove: _old_class %}
120
+ {% endif %}
118
121
 
119
- <!-- lazy-load images <https://github.com/ApoorvSaxena/lozad.js#usage> -->
122
+ {% assign _final_src = nil %}
120
123
 
121
- {% assign _left = _left | replace: 'src=', 'data-src=' %}
124
+ {% unless _src contains '//' %}
125
+ {% assign _final_src = _path_prefix | append: _src %}
126
+ {% capture _src_from %}"{{ _src }}"{% endcapture %}
127
+ {% capture _src_to %}"{{ _final_src }}"{% endcapture %}
128
+ {% assign _left = _left | replace: _src_from, _src_to %}
129
+ {% endunless %}
122
130
 
131
+ {% if _lqip %}
132
+ {% unless _lqip contains ':' %}
133
+ {% assign _final_lqip = _path_prefix | append: _lqip %}
134
+ {% capture _lqip_from %}"{{ _lqip }}"{% endcapture %}
135
+ {% capture _lqip_to %}"{{ _final_lqip }}"{% endcapture %}
136
+ {% assign _left = _left | replace: _lqip_from, _lqip_to %}
137
+ {% endunless %}
123
138
  {% endif %}
124
139
 
125
- <!-- Add SVG placehoder to prevent layout reflow -->
126
-
127
- {% if _width and _height %}
128
- {%- capture _svg -%}
129
- src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{ _width }} {{ _height }}'%3E%3C/svg%3E"
130
- {%- endcapture -%}
140
+ <!-- lazy-load images <https://github.com/aFarkas/lazysizes#readme> -->
141
+ {% assign _left = _left | replace: 'src=', 'data-src=' %}
142
+ {% if _left contains 'class=' %}
143
+ {% assign _left = _left | replace: 'class="', 'class="lazyload '%}
144
+ {% else %}
145
+ {% assign _left = _left | append: ' class="lazyload"' %}
146
+ {% endif %}
131
147
 
132
- {% assign _left = _svg | append: ' ' | append: _left %}
148
+ <!-- add image placeholder -->
149
+ {% if _lqip %}
150
+ {% assign _left = _left | replace: ' lqip=', ' data-lqip="true" src=' %}
151
+ {% else %}
152
+ {% if _width and _height %}
153
+ <!-- add SVG placehoder -->
154
+ {%- capture _svg -%}
155
+ src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{ _width }} {{ _height }}'%3E%3C/svg%3E"
156
+ {%- endcapture -%}
157
+ {% assign _left = _svg | append: ' ' | append: _left %}
158
+ {% assign _class = _class | append: ' shimmer' %}
159
+ {% endif %}
133
160
  {% endif %}
134
161
 
135
162
  <!-- Bypass the HTML-proofer test -->
136
163
  {% assign _left = _left | append: ' data-proofer-ignore' %}
137
164
 
165
+ <!-- make sure the `<img>` is wrapped by `<a>` -->
166
+ {% assign _parent = _right | slice: 1, 4 %}
167
+
168
+ {% if _parent == '</a>' %}
169
+ <!-- add class to exist <a> tag -->
170
+ {% assign _size = _img_content | size | minus: 1 %}
171
+ {% capture _class %}
172
+ class="img-link{% unless _lqip %} shimmer{% endunless %}"
173
+ {% endcapture %}
174
+ {% assign _img_content = _img_content | slice: 0, _size | append: _class | append: '>' %}
175
+
176
+ {% else %}
177
+ <!-- create the image wrapper -->
178
+ {%- capture _wrapper_start -%}
179
+ <a href="{{ _final_src | default: _src }}" class="popup img-link {{ _class }}">
180
+ {%- endcapture -%}
181
+ {% assign _img_content = _img_content | append: _wrapper_start %}
182
+ {% assign _right = _right | prepend: '></a' %}
183
+ {% endif %}
184
+
185
+ <!-- combine -->
138
186
  {% assign _img_content = _img_content | append: IMG_TAG | append: _left | append: _right %}
139
187
 
140
188
  {% endfor %}
141
189
 
142
- {% assign _content = _img_content %}
190
+ {% if _img_content %}
191
+ {% assign _content = _img_content %}
192
+ {% endif %}
143
193
 
144
194
  {% endif %}
145
195
 
@@ -81,7 +81,17 @@
81
81
 
82
82
  {% if url %}
83
83
  <a href="{{ url }}" aria-label="{{ entry.type }}"
84
- {% unless entry.noblank %}target="_blank" rel="noopener"{% endunless %}>
84
+ {% assign link_types = nil %}
85
+ {% unless entry.noblank %}
86
+ {% assign link_types = link_types | append: " noopener" %}
87
+ target="_blank"
88
+ {% endunless %}
89
+
90
+ {% if entry.type == 'mastodon' %}
91
+ {% assign link_types = link_types | append: " me" %}
92
+ {% endif %}
93
+
94
+ {% if link_types %}rel="{{ link_types | lstrip }}"{% endif %}>
85
95
  <i class="{{ entry.icon }}"></i>
86
96
  </a>
87
97
  {% endif %}
data/_layouts/post.html CHANGED
@@ -27,30 +27,21 @@ tail_includes:
27
27
  {% endif %}
28
28
 
29
29
  {% if page.image %}
30
- {% capture bg %}
31
- {% unless page.image.no_bg %}{{ 'bg' }}{% endunless %}
32
- {% endcapture %}
33
-
34
- <div class="mt-3 mb-3">
35
- <img src="{{ page.image.path | default: page.image }}" class="preview-img {{ bg | strip }}"
36
- alt="{{ page.image.alt | default: "Preview Image" }}"
30
+ {% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
31
+ {% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
32
+ {% capture alt %}alt="{{ page.image.alt | default: "Preview Image" }}"{% endcapture %}
37
33
 
38
- {% if page.image.width %}
39
- width="{{ page.image.width }}"
40
- {% elsif page.image.w %}
41
- width="{{ page.image.w }}"
34
+ {% capture lqip %}
35
+ {% if page.image.lqip %}
36
+ lqip="{{ page.image.lqip }}"
42
37
  {% endif %}
38
+ {% endcapture %}
43
39
 
44
- {% if page.image.height %}
45
- height="{{ page.image.height }}"
46
- {% elsif page.image.h %}
47
- height="{{ page.image.h }}"
48
- {% endif %}>
49
-
50
- {% if page.image.alt %}
40
+ <div class="mt-3 mb-3">
41
+ <img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip | strip }}>
42
+ {%- if page.image.alt -%}
51
43
  <figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption>
52
- {% endif %}
53
-
44
+ {%- endif -%}
54
45
  </div>
55
46
  {% endif %}
56
47
 
@@ -83,6 +83,47 @@ a {
83
83
  img {
84
84
  max-width: 100%;
85
85
  height: auto;
86
+
87
+ &[data-src] {
88
+ &.lazyloaded {
89
+ z-index: 1;
90
+ -webkit-animation: fade-in 0.4s ease-in;
91
+ animation: fade-in 0.4s ease-in;
92
+ }
93
+
94
+ &[data-lqip="true"] {
95
+ &.lazyload,
96
+ &.lazyloading {
97
+ -webkit-filter: blur(20px);
98
+ filter: blur(20px);
99
+ }
100
+ }
101
+
102
+ &:not([data-lqip="true"]) {
103
+ &.lazyload,
104
+ &.lazyloading {
105
+ background: var(--img-bg);
106
+ }
107
+ }
108
+
109
+ &.shadow {
110
+ -webkit-filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
111
+ filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
112
+ box-shadow: none !important; /* cover the Bootstrap 4.6.1 styles */
113
+ }
114
+
115
+ @extend %img-caption;
116
+ }
117
+
118
+ @-webkit-keyframes fade-in {
119
+ from { opacity: 0; }
120
+ to { opacity: 1; }
121
+ }
122
+
123
+ @keyframes fade-in {
124
+ from { opacity: 0; }
125
+ to { opacity: 1; }
126
+ }
86
127
  }
87
128
 
88
129
  blockquote {
@@ -93,15 +134,19 @@ blockquote {
93
134
  &[class^="prompt-"] {
94
135
  display: flex;
95
136
  border-left: 0;
96
- border-radius: 6px;
97
137
  padding: 1rem;
98
138
  color: var(--prompt-text-color);
99
139
 
140
+ @extend %rounded;
141
+
100
142
  &::before {
101
- font-family: "Font Awesome 5 Free";
102
143
  text-align: center;
103
144
  width: 1.25rem;
104
145
  margin-right: 0.75rem;
146
+ position: relative;
147
+ top: 0.4rem;
148
+ text-rendering: auto;
149
+ -webkit-font-smoothing: antialiased;
105
150
  }
106
151
 
107
152
  > div {
@@ -113,7 +158,7 @@ blockquote {
113
158
  }
114
159
  }
115
160
 
116
- @include prompt("tip", "\f0eb", 400);
161
+ @include prompt("tip", "\f0eb", "regular");
117
162
  @include prompt("info", "\f06a");
118
163
  @include prompt("warning", "\f06a");
119
164
  @include prompt("danger", "\f071");
@@ -180,43 +225,6 @@ i { /* fontawesome icons */
180
225
  }
181
226
  }
182
227
 
183
- @-webkit-keyframes fade-in {
184
- from { opacity: 0; }
185
- to { opacity: 1; }
186
- }
187
-
188
- @keyframes fade-in {
189
- from { opacity: 0; }
190
- to { opacity: 1; }
191
- }
192
-
193
- img[data-src] {
194
- margin: 0.5rem 0;
195
-
196
- &[data-loaded="true"] {
197
- -webkit-animation: fade-in linear 0.5s;
198
- animation: fade-in linear 0.5s;
199
- }
200
-
201
- &.left {
202
- float: left;
203
- margin: 0.75rem 1rem 1rem 0;
204
- }
205
-
206
- &.right {
207
- float: right;
208
- margin: 0.75rem 0 1rem 1rem;
209
- }
210
-
211
- &.shadow {
212
- -webkit-filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
213
- filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
214
- box-shadow: none !important; /* cover the Bootstrap 4.6.1 styles */
215
- }
216
-
217
- @extend %img-caption;
218
- }
219
-
220
228
  /* --- Panels --- */
221
229
 
222
230
  .access {
@@ -397,26 +405,14 @@ img[data-src] {
397
405
  margin-bottom: 1.5rem;
398
406
  }
399
407
 
400
- a {
401
- &.img-link {
402
- @extend %no-cursor;
403
- }
404
-
405
- /* created by `_includes/img-extra.html` */
406
- &.popup {
407
- cursor: zoom-in;
408
-
409
- > img[data-src]:not(.normal):not(.left):not(.right) {
408
+ p {
409
+ > img[data-src],
410
+ > a.popup {
411
+ &:not(.normal):not(.left):not(.right) {
410
412
  @include align-center;
411
413
  }
412
414
  }
413
-
414
- &:hover {
415
- code {
416
- @extend %link-hover;
417
- }
418
- }
419
- } /* a */
415
+ }
420
416
  }
421
417
 
422
418
  .pageviews .fa-spinner {
@@ -448,6 +444,14 @@ img[data-src] {
448
444
  overflow-wrap: break-word;
449
445
 
450
446
  a {
447
+ &.popup {
448
+ @extend %no-cursor;
449
+ @extend %img-caption;
450
+ @include mt-mb(0.5rem);
451
+
452
+ cursor: zoom-in;
453
+ }
454
+
451
455
  &:not(.img-link) {
452
456
  @extend %link-underline;
453
457
 
@@ -455,10 +459,6 @@ img[data-src] {
455
459
  @extend %link-hover;
456
460
  }
457
461
  }
458
-
459
- &.img-link {
460
- @extend %img-caption;
461
- }
462
462
  }
463
463
 
464
464
  ol,
@@ -544,6 +544,58 @@ img[data-src] {
544
544
  }
545
545
  }
546
546
 
547
+ .rounded-10 {
548
+ border-radius: 10px !important;
549
+ }
550
+
551
+ .img-link {
552
+ color: transparent;
553
+ display: inline-flex;
554
+ overflow: hidden;
555
+ }
556
+
557
+ .shimmer {
558
+ overflow: hidden;
559
+ position: relative;
560
+ background: var(--img-bg);
561
+
562
+ &::before {
563
+ content: "";
564
+ position: absolute;
565
+ background: var(--shimmer-bg);
566
+ height: 100%;
567
+ width: 100%;
568
+ -webkit-animation: shimmer 1s infinite;
569
+ animation: shimmer 1s infinite;
570
+ }
571
+
572
+ @-webkit-keyframes shimmer {
573
+ 0% { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
574
+ 100% { -webkit-transform: translateX(100%); transform: translateX(100%); }
575
+ }
576
+
577
+ @keyframes shimmer {
578
+ 0% { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
579
+ 100% { -webkit-transform: translateX(100%); transform: translateX(100%); }
580
+ }
581
+ }
582
+
583
+ .embed-video {
584
+ width: 100%;
585
+ height: 100%;
586
+ margin-bottom: 1rem;
587
+
588
+ @extend %rounded;
589
+
590
+ &.youtube {
591
+ aspect-ratio: 16 / 9;
592
+ }
593
+
594
+ &.twitch {
595
+ aspect-ratio: 310 / 189;
596
+ }
597
+ }
598
+
547
599
  /* --- buttons --- */
548
600
  .btn-lang {
549
601
  border: 1px solid !important;
@@ -613,6 +665,16 @@ img[data-src] {
613
665
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
614
666
  }
615
667
 
668
+ .left {
669
+ float: left;
670
+ margin: 0.75rem 1rem 1rem 0 !important;
671
+ }
672
+
673
+ .right {
674
+ float: right;
675
+ margin: 0.75rem 0 1rem 1rem !important;
676
+ }
677
+
616
678
  /* --- Overriding --- */
617
679
 
618
680
  /* magnific-popup */
@@ -754,7 +816,7 @@ $sidebar-display: "sidebar-display";
754
816
  &:last-child {
755
817
  a {
756
818
  position: relative;
757
- left: $cursor-width / 2;
819
+ left: calc($cursor-width / 2);
758
820
  width: 100%;
759
821
  }
760
822
 
@@ -780,7 +842,7 @@ $sidebar-display: "sidebar-display";
780
842
 
781
843
  @for $i from 1 through $tab-count {
782
844
  $offset: $tab-count - $i;
783
- $top: -$offset * $tab-height + ($tab-height - $tab-cursor-height) / 2;
845
+ $top: -$offset * $tab-height + calc(($tab-height - $tab-cursor-height) / 2);
784
846
 
785
847
  @if $i < $tab-count {
786
848
  > li.active:nth-child(#{$i}),
@@ -1193,6 +1255,7 @@ $sidebar-display: "sidebar-display";
1193
1255
 
1194
1256
  div.d-flex {
1195
1257
  padding: 1.5rem 0;
1258
+ line-height: 1.65;
1196
1259
  flex-wrap: wrap;
1197
1260
  justify-content: space-around !important;
1198
1261
  }
@@ -90,6 +90,10 @@
90
90
  font-style: normal;
91
91
  }
92
92
 
93
+ %rounded {
94
+ border-radius: 6px;
95
+ }
96
+
93
97
  %img-caption {
94
98
  + em {
95
99
  display: block;
@@ -114,6 +118,11 @@
114
118
  text-decoration: none;
115
119
  }
116
120
 
121
+ @mixin mt-mb($value) {
122
+ margin-top: $value;
123
+ margin-bottom: $value;
124
+ }
125
+
117
126
  @mixin ml-mr($value) {
118
127
  margin-left: $value;
119
128
  margin-right: $value;
@@ -141,14 +150,14 @@
141
150
  transform: translateX(-50%);
142
151
  }
143
152
 
144
- @mixin prompt($type, $fw-icon, $icon-weight: 900) {
153
+ @mixin prompt($type, $fa-content, $fa-style: "solid") {
145
154
  &.prompt-#{$type} {
146
155
  background-color: var(--prompt-#{$type}-bg);
147
156
 
148
157
  &::before {
149
- content: $fw-icon;
158
+ content: $fa-content;
150
159
  color: var(--prompt-#{$type}-icon-color);
151
- font-weight: $icon-weight;
160
+ font: var(--fa-font-#{$fa-style});
152
161
  }
153
162
  }
154
163
  }
@@ -29,18 +29,12 @@ html {
29
29
  }
30
30
  }
31
31
 
32
- /* -- Codes Snippet -- */
33
-
34
- $code-radius: 6px;
32
+ /* -- code snippets -- */
35
33
 
36
34
  %code-snippet-bg {
37
35
  background: var(--highlight-bg-color);
38
36
  }
39
37
 
40
- %code-snippet-radius {
41
- border-radius: $code-radius;
42
- }
43
-
44
38
  %code-snippet-padding {
45
39
  padding-left: 1rem;
46
40
  padding-right: 1.5rem;
@@ -48,7 +42,7 @@ $code-radius: 6px;
48
42
 
49
43
  .highlighter-rouge {
50
44
  @extend %code-snippet-bg;
51
- @extend %code-snippet-radius;
45
+ @extend %rounded;
52
46
 
53
47
  color: var(--highlighter-rouge-color);
54
48
  margin-top: 0.5rem;
@@ -56,7 +50,7 @@ $code-radius: 6px;
56
50
  }
57
51
 
58
52
  .highlight {
59
- @extend %code-snippet-radius;
53
+ @extend %rounded;
60
54
  @extend %code-snippet-bg;
61
55
 
62
56
  @at-root figure#{&} {
@@ -173,8 +167,6 @@ div {
173
167
 
174
168
  $code-header-height: 2.25rem;
175
169
 
176
- border-top-left-radius: $code-radius;
177
- border-top-right-radius: $code-radius;
178
170
  display: flex;
179
171
  justify-content: space-between;
180
172
  align-items: center;
@@ -226,9 +218,9 @@ div {
226
218
  /* clipboard */
227
219
  button {
228
220
  @extend %cursor-pointer;
221
+ @extend %rounded;
229
222
 
230
223
  border: 1px solid transparent;
231
- border-radius: $code-radius;
232
224
  height: $code-header-height;
233
225
  width: $code-header-height;
234
226
  padding: 0;
@@ -26,6 +26,14 @@
26
26
  --label-color: rgb(108, 117, 125);
27
27
  --checkbox-color: rgb(118, 120, 121);
28
28
  --checkbox-checked-color: var(--link-color);
29
+ --img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%);
30
+ --shimmer-bg:
31
+ linear-gradient(
32
+ 90deg,
33
+ rgba(255, 255, 255, 0) 0%,
34
+ rgba(58, 55, 55, 0.4) 50%,
35
+ rgba(255, 255, 255, 0) 100%
36
+ );
29
37
 
30
38
  /* Sidebar */
31
39
  --sidebar-bg: radial-gradient(circle, #242424 0%, #1d1f27 100%);
@@ -65,7 +73,6 @@
65
73
  --card-bg: rgb(39, 40, 43);
66
74
  --card-border-color: rgb(53, 53, 60);
67
75
  --card-box-shadow: var(--main-bg);
68
- --preview-img-bg: radial-gradient(circle, rgb(22, 22, 24) 0%, rgb(32, 32, 32) 100%);
69
76
  --kbd-wrap-color: #6a6a6a;
70
77
  --kbd-text-color: #d3d3d3;
71
78
  --kbd-bg-color: #242424;
@@ -96,8 +103,14 @@
96
103
  --timeline-year-dot-color: var(--timeline-color);
97
104
 
98
105
  .post img[data-src] {
99
- -webkit-filter: brightness(95%);
100
- filter: brightness(95%);
106
+ &.lazyloaded {
107
+ -webkit-filter: brightness(95%);
108
+ filter: brightness(95%);
109
+ }
110
+ }
111
+
112
+ .light {
113
+ display: none;
101
114
  }
102
115
 
103
116
  hr {
@@ -24,6 +24,14 @@
24
24
  --btn-box-shadow: #eaeaea;
25
25
  --checkbox-color: #c5c5c5;
26
26
  --checkbox-checked-color: #07a8f7;
27
+ --img-bg: radial-gradient(circle, rgb(255, 255, 255) 0%, rgb(249, 249, 249) 100%);
28
+ --shimmer-bg:
29
+ linear-gradient(
30
+ 90deg,
31
+ rgba(250, 250, 250, 0) 0%,
32
+ rgba(232, 230, 230, 1) 50%,
33
+ rgba(250, 250, 250, 0) 100%
34
+ );
27
35
 
28
36
  /* Sidebar */
29
37
  --sidebar-bg: #eeeeee;
@@ -64,7 +72,6 @@
64
72
  --tb-odd-bg: #fbfcfd;
65
73
  --tb-border-color: #eaeaea;
66
74
  --dash-color: silver;
67
- --preview-img-bg: radial-gradient(circle, rgb(255, 255, 255) 0%, rgb(249, 249, 249) 100%);
68
75
  --kbd-wrap-color: #bdbdbd;
69
76
  --kbd-text-color: var(--text-color);
70
77
  --kbd-bg-color: white;
@@ -82,6 +89,10 @@
82
89
  --link-underline-color: rgb(219, 216, 216);
83
90
  }
84
91
 
92
+ .dark {
93
+ display: none;
94
+ }
95
+
85
96
  /* Categories */
86
97
  --categories-hover-bg: var(--btn-border-color);
87
98
  --categories-icon-hover-color: darkslategray;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -26,12 +26,30 @@
26
26
  color: var(--text-color);
27
27
  }
28
28
 
29
- img.preview-img {
29
+ %preview-margin {
30
30
  margin: 0;
31
- border-radius: 6px;
31
+ }
32
+
33
+ .preview-img {
34
+ @include align-center;
35
+ @extend %preview-margin;
36
+ @extend %rounded;
37
+
38
+ max-width: 100%;
39
+
40
+ &:not(.no-bg) {
41
+ img.lazyloaded {
42
+ background: var(--img-bg);
43
+ }
44
+ }
45
+
46
+ img {
47
+ aspect-ratio: 40 / 21;
48
+ -o-object-fit: cover;
49
+ object-fit: cover;
32
50
 
33
- &.bg[data-loaded="true"] {
34
- background: var(--preview-img-bg);
51
+ @extend %preview-margin;
52
+ @extend %rounded;
35
53
  }
36
54
  }
37
55
 
data/assets/feed.xml CHANGED
@@ -15,7 +15,7 @@ permalink: /feed.xml
15
15
  <uri>{{ "/" | absolute_url }}</uri>
16
16
  </author>
17
17
  <link rel="self" type="application/atom+xml" href="{{ page.url | absolute_url }}"/>
18
- <link rel="alternate" type="text/html" hreflang="{{ site.lang }}"
18
+ <link rel="alternate" type="text/html" hreflang="{{ site.alt_lang | default: site.lang }}"
19
19
  href="{{ '/' | absolute_url }}"/>
20
20
  <generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
21
21
  <rights> © {{ 'now' | date: '%Y' }} {{ site.social.name }} </rights>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- $(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(e=>{e=$(e.target);(e.prop("tagName")==="button".toUpperCase()?e:e.parent()).blur(),flipMode()})});const ScrollHelper=function(){const e=$("body"),t="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let r=0,a=!1,l=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{r+=1,a=a||!0},popScrollUpTask:()=>--r,hasScrollUpTask:()=>0<r,topbarLocked:()=>!0===a,unlockTopbar:()=>a=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}();$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),r=$("#main"),a=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),i=$("#search-results"),s=$("#search-input"),c=$("#search-hints"),d=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),p={on(){e.addClass("unloaded"),a.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),a.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),r.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),r.removeClass("unloaded"),d.release(),s.val(""),e=!1)},isVisible(){return e}}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),s.focus()}),o.click(function(){p.off(),u.off()}),s.focus(function(){l.addClass("input-focus")}),s.focusout(function(){l.removeClass("input-focus")}),s.on("input",()=>{""===s.val()?h()?c.removeClass("unloaded"):u.off():(u.on(),h()&&c.addClass("unloaded"))})}),$(function(){var e=function(){const e="sidebar-display";let t=!1;const o=$("body");return{toggle(){!1===t?o.attr(e,""):o.removeAttr(e),t=!t}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#search-input"),o=ScrollHelper.getTopbarHeight();let e,r=0;function a(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||a()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&a()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(r-e)<=o)){if(e>r)ScrollHelper.hideTopbar(),t.is(":focus")&&t.blur();else if(e+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}r=e}}(),e=!1)},250)}),$(function(){var e="div.post>h1:first-of-type",t=$(e);const n=$("#topbar-title");if(0!==t.length&&!t.hasClass("dynamic-title")&&!n.is(":hidden")){const i=n.text().trim();let r=t.text().trim(),a=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(r)&&(r=r.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(r);new IntersectionObserver(e=>{var t,o;a?(o=$(window).scrollTop(),t=l<o,l=o,o=e[0],t?0===o.intersectionRatio&&n.text(r):1===o.intersectionRatio&&n.text(i)):a=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$(function(){var e,t="#main > div.row:first-child > div:first-child";$(t+" img").length<=0||(e=document.querySelectorAll(t+" img[data-src]"),lozad(e).observe(),$(t+` p > img[data-src], ${t} img[data-src].preview-img`).each(function(){var e=$(this).next(),e="EM"===e.prop("tagName")?e.text():"",t=$(this).attr("data-src");$(this).wrap(`<a href="${t}" title="${e}" class="popup"></a>`)}),$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),$(t+" a").has("img").addClass("img-link"))}),$(function(){var e=".code-header>button";const t="timeout",a="data-title-succeed",l="data-original-title";function n(e){if($(e)[0].hasAttribute(t)){e=$(e).attr(t);if(Number(e)>Date.now())return 1}}function i(e){$(e).attr(t,Date.now()+2e3)}function s(e){$(e).removeAttr(t)}var o=new ClipboardJS(e,{target(e){return e.parentNode.nextElementSibling.querySelector("code .rouge-code")}});$(e).tooltip({trigger:"hover",placement:"left"});const r=$(e).children().attr("class");o.on("success",e=>{e.clearSelection();const t=e.trigger;var o;n(t)||(e=t,$(e).children().attr("class","fas fa-check"),e=t,o=$(e).attr(a),$(e).attr(l,o).tooltip("show"),i(t),setTimeout(()=>{var e;e=t,$(e).tooltip("hide").removeAttr(l),e=t,$(e).children().attr("class",r),s(t)},2e3))}),$("#copy-link").click(e=>{let t=$(e.target);if(!n(t)){var e=window.location.href,o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove();const r=t.attr(l);e=t.attr(a);t.attr(l,e).tooltip("show"),i(t),setTimeout(()=>{t.attr(l,r),s(t)},2e3)}})}),$(function(){const e=$("#topbar-title"),s="scroll-focus";$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(a){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var l=decodeURI(this.hash);let t=RegExp(/^#fnref:/).test(l),o=!t&&RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/:/g,"\\:"):l;let r=$(n);var n=e.is(":visible"),i=$(window).width()<$(window).height();if(void 0!==r){a.preventDefault(),history.pushState&&history.pushState(null,null,l);a=$(window).scrollTop();let e=r.offset().top-=8;e<a&&(ScrollHelper.hideTopbar(),ScrollHelper.addScrollUpTask()),n&&i&&(e-=ScrollHelper.getTopbarHeight()),$("html").animate({scrollTop:e},500,()=>{if(r.focus(),$(`[${s}=true]`).length&&$(`[${s}=true]`).attr(s,!1),$(":target").length&&$(":target").attr(s,!1),(o||t)&&r.attr(s,!0),r.is(":focus"))return!1;r.attr("tabindex","-1"),r.focus(),ScrollHelper.hasScrollUpTask()&&ScrollHelper.popScrollUpTask()})}}})});
6
+ $(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(e=>{e=$(e.target);(e.prop("tagName")==="button".toUpperCase()?e:e.parent()).blur(),flipMode()})});const ScrollHelper=function(){const e=$("body"),t="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let r=0,a=!1,l=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{r+=1,a=a||!0},popScrollUpTask:()=>--r,hasScrollUpTask:()=>0<r,topbarLocked:()=>!0===a,unlockTopbar:()=>a=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}();$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),r=$("#main"),a=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),i=$("#search-results"),s=$("#search-input"),c=$("#search-hints"),d=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),p={on(){e.addClass("unloaded"),a.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),a.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),r.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),r.removeClass("unloaded"),d.release(),s.val(""),e=!1)},isVisible(){return e}}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),s.focus()}),o.click(function(){p.off(),u.off()}),s.focus(function(){l.addClass("input-focus")}),s.focusout(function(){l.removeClass("input-focus")}),s.on("input",()=>{""===s.val()?h()?c.removeClass("unloaded"):u.off():(u.on(),h()&&c.addClass("unloaded"))})}),$(function(){var e=function(){const e="sidebar-display";let t=!1;const o=$("body");return{toggle(){!1===t?o.attr(e,""):o.removeAttr(e),t=!t}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#search-input"),o=ScrollHelper.getTopbarHeight();let e,r=0;function a(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||a()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&a()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(r-e)<=o)){if(e>r)ScrollHelper.hideTopbar(),t.is(":focus")&&t.blur();else if(e+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}r=e}}(),e=!1)},250)}),$(function(){var e="div.post>h1:first-of-type",t=$(e);const n=$("#topbar-title");if(0!==t.length&&!t.hasClass("dynamic-title")&&!n.is(":hidden")){const i=n.text().trim();let r=t.text().trim(),a=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(r)&&(r=r.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(r);new IntersectionObserver(e=>{var t,o;a?(o=$(window).scrollTop(),t=l<o,l=o,o=e[0],t?0===o.intersectionRatio&&n.text(r):1===o.intersectionRatio&&n.text(i)):a=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$("#core-wrapper img[data-src]")<=0||($(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),document.addEventListener("lazyloaded",function(e){$(e.target).parent().removeClass("shimmer")})),$(function(){var e=".code-header>button";const t="timeout",a="data-title-succeed",l="data-original-title";function n(e){if($(e)[0].hasAttribute(t)){e=$(e).attr(t);if(Number(e)>Date.now())return 1}}function i(e){$(e).attr(t,Date.now()+2e3)}function s(e){$(e).removeAttr(t)}var o=new ClipboardJS(e,{target(e){return e.parentNode.nextElementSibling.querySelector("code .rouge-code")}});$(e).tooltip({trigger:"hover",placement:"left"});const r=$(e).children().attr("class");o.on("success",e=>{e.clearSelection();const t=e.trigger;var o;n(t)||(e=t,$(e).children().attr("class","fas fa-check"),e=t,o=$(e).attr(a),$(e).attr(l,o).tooltip("show"),i(t),setTimeout(()=>{var e;e=t,$(e).tooltip("hide").removeAttr(l),e=t,$(e).children().attr("class",r),s(t)},2e3))}),$("#copy-link").click(e=>{let t=$(e.target);if(!n(t)){var e=window.location.href,o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove();const r=t.attr(l);e=t.attr(a);t.attr(l,e).tooltip("show"),i(t),setTimeout(()=>{t.attr(l,r),s(t)},2e3)}})}),$(function(){const e=$("#topbar-title"),s="scroll-focus";$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(a){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var l=decodeURI(this.hash);let t=RegExp(/^#fnref:/).test(l),o=!t&&RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/:/g,"\\:"):l;let r=$(n);var n=e.is(":visible"),i=$(window).width()<$(window).height();if(void 0!==r){a.preventDefault(),history.pushState&&history.pushState(null,null,l);a=$(window).scrollTop();let e=r.offset().top-=8;e<a&&(ScrollHelper.hideTopbar(),ScrollHelper.addScrollUpTask()),n&&i&&(e-=ScrollHelper.getTopbarHeight()),$("html").animate({scrollTop:e},500,()=>{if(r.focus(),$(`[${s}=true]`).length&&$(`[${s}=true]`).attr(s,!1),$(":target").length&&$(":target").attr(s,!1),(o||t)&&r.attr(s,!0),r.is(":focus"))return!1;r.attr("tabindex","-1"),r.focus(),ScrollHelper.hasScrollUpTask()&&ScrollHelper.popScrollUpTask()})}}})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- $(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(t=>{t=$(t.target);(t.prop("tagName")==="button".toUpperCase()?t:t.parent()).blur(),flipMode()})});const ScrollHelper=function(){const t=$("body"),e="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let a=0,r=!1,l=!1;return{hideTopbar:()=>t.attr(e,!1),showTopbar:()=>t.attr(e,!0),addScrollUpTask:()=>{a+=1,r=r||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===r,unlockTopbar:()=>r=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}(),LocaleHelper=($(function(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#main"),r=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),i=$("#search-results"),s=$("#search-input"),c=$("#search-hints"),d=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset(){return t}}}(),p={on(){t.addClass("unloaded"),r.addClass("unloaded"),e.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),t.removeClass("unloaded"),r.removeClass("unloaded"),e.removeClass("unloaded")}},u=function(){let t=!1;return{on(){t||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),s.val(""),t=!1)},isVisible(){return t}}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),u.on(),s.focus()}),o.click(function(){p.off(),u.off()}),s.focus(function(){l.addClass("input-focus")}),s.focusout(function(){l.removeClass("input-focus")}),s.on("input",()=>{""===s.val()?h()?c.removeClass("unloaded"):u.off():(u.on(),h()&&c.addClass("unloaded"))})}),$(function(){var t=function(){const t="sidebar-display";let e=!1;const o=$("body");return{toggle(){!1===e?o.attr(t,""):o.removeAttr(t),e=!e}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#search-input"),o=ScrollHelper.getTopbarHeight();let t,a=0;function r(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var t=screen.orientation.type;"landscape-primary"!==t&&"landscape-secondary"!==t||r()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&r()}),$(window).scroll(()=>{t=t||!0}),setInterval(()=>{t&&(!function(){var t=$(this).scrollTop();if(!(Math.abs(a-t)<=o)){if(t>a)ScrollHelper.hideTopbar(),e.is(":focus")&&e.blur();else if(t+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}a=t}}(),t=!1)},250)}),$(function(){var t="div.post>h1:first-of-type",e=$(t);const n=$("#topbar-title");if(0!==e.length&&!e.hasClass("dynamic-title")&&!n.is(":hidden")){const i=n.text().trim();let a=e.text().trim(),r=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),e.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(t=>{var e,o;r?(o=$(window).scrollTop(),e=l<o,l=o,o=t[0],e?0===o.intersectionRatio&&n.text(a):1===o.intersectionRatio&&n.text(i)):r=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(t)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$(function(){var t,e="#main > div.row:first-child > div:first-child";$(e+" img").length<=0||(t=document.querySelectorAll(e+" img[data-src]"),lozad(t).observe(),$(e+` p > img[data-src], ${e} img[data-src].preview-img`).each(function(){var t=$(this).next(),t="EM"===t.prop("tagName")?t.text():"",e=$(this).attr("data-src");$(this).wrap(`<a href="${e}" title="${t}" class="popup"></a>`)}),$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),$(e+" a").has("img").addClass("img-link"))}),function(){const t=$("html").attr("lang").substr(0,2),e="data-ts",o="data-df";return{locale:()=>t,attrTimestamp:()=>e,attrDateFormat:()=>o,getTimestamp:t=>Number(t.attr(e)),getDateFormat:t=>t.attr(o)}}());$(function(){dayjs.locale(LocaleHelper.locale()),dayjs.extend(window.dayjs_plugin_localizedFormat),$(`[${LocaleHelper.attrTimestamp()}]`).each(function(){var t=dayjs.unix(LocaleHelper.getTimestamp($(this))),e=t.format(LocaleHelper.getDateFormat($(this))),e=($(this).text(e),$(this).removeAttr(LocaleHelper.attrTimestamp()),$(this).removeAttr(LocaleHelper.attrDateFormat()),$(this).attr("data-toggle"));void 0!==e&&"tooltip"===e&&(e=t.format("llll"),$(this).attr("data-original-title",e))})}),$(function(){var t=".code-header>button";const e="timeout",r="data-title-succeed",l="data-original-title";function n(t){if($(t)[0].hasAttribute(e)){t=$(t).attr(e);if(Number(t)>Date.now())return 1}}function i(t){$(t).attr(e,Date.now()+2e3)}function s(t){$(t).removeAttr(e)}var o=new ClipboardJS(t,{target(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});$(t).tooltip({trigger:"hover",placement:"left"});const a=$(t).children().attr("class");o.on("success",t=>{t.clearSelection();const e=t.trigger;var o;n(e)||(t=e,$(t).children().attr("class","fas fa-check"),t=e,o=$(t).attr(r),$(t).attr(l,o).tooltip("show"),i(e),setTimeout(()=>{var t;t=e,$(t).tooltip("hide").removeAttr(l),t=e,$(t).children().attr("class",a),s(e)},2e3))}),$("#copy-link").click(t=>{let e=$(t.target);if(!n(e)){var t=window.location.href,o=$("<input>");$("body").append(o),o.val(t).select(),document.execCommand("copy"),o.remove();const a=e.attr(l);t=e.attr(r);e.attr(l,t).tooltip("show"),i(e),setTimeout(()=>{e.attr(l,a),s(e)},2e3)}})}),$(function(){const t=$("#topbar-title"),s="scroll-focus";$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(r){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var l=decodeURI(this.hash);let e=RegExp(/^#fnref:/).test(l),o=!e&&RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/:/g,"\\:"):l;let a=$(n);var n=t.is(":visible"),i=$(window).width()<$(window).height();if(void 0!==a){r.preventDefault(),history.pushState&&history.pushState(null,null,l);r=$(window).scrollTop();let t=a.offset().top-=8;t<r&&(ScrollHelper.hideTopbar(),ScrollHelper.addScrollUpTask()),n&&i&&(t-=ScrollHelper.getTopbarHeight()),$("html").animate({scrollTop:t},500,()=>{if(a.focus(),$(`[${s}=true]`).length&&$(`[${s}=true]`).attr(s,!1),$(":target").length&&$(":target").attr(s,!1),(o||e)&&a.attr(s,!0),a.is(":focus"))return!1;a.attr("tabindex","-1"),a.focus(),ScrollHelper.hasScrollUpTask()&&ScrollHelper.popScrollUpTask()})}}})});
6
+ $(function(){$(window).scroll(()=>{50<$(this).scrollTop()&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()}),$("#back-to-top").click(()=>($("body,html").animate({scrollTop:0},800),!1))}),$(function(){$(".mode-toggle").click(t=>{t=$(t.target);(t.prop("tagName")==="button".toUpperCase()?t:t.parent()).blur(),flipMode()})});const ScrollHelper=function(){const t=$("body"),e="data-topbar-visible",o=$("#topbar-wrapper").outerHeight();let a=0,r=!1,l=!1;return{hideTopbar:()=>t.attr(e,!1),showTopbar:()=>t.attr(e,!0),addScrollUpTask:()=>{a+=1,r=r||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===r,unlockTopbar:()=>r=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===l,lockOrientation:()=>l=!0,unLockOrientation:()=>l=!1}}(),LocaleHelper=($(function(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#main"),r=$("#topbar-title"),l=$("#search-wrapper"),n=$("#search-result-wrapper"),i=$("#search-results"),s=$("#search-input"),c=$("#search-hints"),d=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset(){return t}}}(),p={on(){t.addClass("unloaded"),r.addClass("unloaded"),e.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),t.removeClass("unloaded"),r.removeClass("unloaded"),e.removeClass("unloaded")}},u=function(){let t=!1;return{on(){t||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),s.val(""),t=!1)},isVisible(){return t}}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),u.on(),s.focus()}),o.click(function(){p.off(),u.off()}),s.focus(function(){l.addClass("input-focus")}),s.focusout(function(){l.removeClass("input-focus")}),s.on("input",()=>{""===s.val()?h()?c.removeClass("unloaded"):u.off():(u.on(),h()&&c.addClass("unloaded"))})}),$(function(){var t=function(){const t="sidebar-display";let e=!1;const o=$("body");return{toggle(){!1===e?o.attr(t,""):o.removeAttr(t),e=!e}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#search-input"),o=ScrollHelper.getTopbarHeight();let t,a=0;function r(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var t=screen.orientation.type;"landscape-primary"!==t&&"landscape-secondary"!==t||r()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&r()}),$(window).scroll(()=>{t=t||!0}),setInterval(()=>{t&&(!function(){var t=$(this).scrollTop();if(!(Math.abs(a-t)<=o)){if(t>a)ScrollHelper.hideTopbar(),e.is(":focus")&&e.blur();else if(t+$(window).height()<$(document).height()){if(ScrollHelper.hasScrollUpTask())return;ScrollHelper.topbarLocked()?ScrollHelper.unlockTopbar():ScrollHelper.orientationLocked()?ScrollHelper.unLockOrientation():ScrollHelper.showTopbar()}a=t}}(),t=!1)},250)}),$(function(){var t="div.post>h1:first-of-type",e=$(t);const n=$("#topbar-title");if(0!==e.length&&!e.hasClass("dynamic-title")&&!n.is(":hidden")){const i=n.text().trim();let a=e.text().trim(),r=!1,l=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),e.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(t=>{var e,o;r?(o=$(window).scrollTop(),e=l<o,l=o,o=t[0],e?0===o.intersectionRatio&&n.text(a):1===o.intersectionRatio&&n.text(i)):r=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(t)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),$("#core-wrapper img[data-src]")<=0||($(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),document.addEventListener("lazyloaded",function(t){$(t.target).parent().removeClass("shimmer")})),function(){const t=$("html").attr("lang").substr(0,2),e="data-ts",o="data-df";return{locale:()=>t,attrTimestamp:()=>e,attrDateFormat:()=>o,getTimestamp:t=>Number(t.attr(e)),getDateFormat:t=>t.attr(o)}}());$(function(){dayjs.locale(LocaleHelper.locale()),dayjs.extend(window.dayjs_plugin_localizedFormat),$(`[${LocaleHelper.attrTimestamp()}]`).each(function(){var t=dayjs.unix(LocaleHelper.getTimestamp($(this))),e=t.format(LocaleHelper.getDateFormat($(this))),e=($(this).text(e),$(this).removeAttr(LocaleHelper.attrTimestamp()),$(this).removeAttr(LocaleHelper.attrDateFormat()),$(this).attr("data-toggle"));void 0!==e&&"tooltip"===e&&(e=t.format("llll"),$(this).attr("data-original-title",e))})}),$(function(){var t=".code-header>button";const e="timeout",r="data-title-succeed",l="data-original-title";function n(t){if($(t)[0].hasAttribute(e)){t=$(t).attr(e);if(Number(t)>Date.now())return 1}}function i(t){$(t).attr(e,Date.now()+2e3)}function s(t){$(t).removeAttr(e)}var o=new ClipboardJS(t,{target(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});$(t).tooltip({trigger:"hover",placement:"left"});const a=$(t).children().attr("class");o.on("success",t=>{t.clearSelection();const e=t.trigger;var o;n(e)||(t=e,$(t).children().attr("class","fas fa-check"),t=e,o=$(t).attr(r),$(t).attr(l,o).tooltip("show"),i(e),setTimeout(()=>{var t;t=e,$(t).tooltip("hide").removeAttr(l),t=e,$(t).children().attr("class",a),s(e)},2e3))}),$("#copy-link").click(t=>{let e=$(t.target);if(!n(e)){var t=window.location.href,o=$("<input>");$("body").append(o),o.val(t).select(),document.execCommand("copy"),o.remove();const a=e.attr(l);t=e.attr(r);e.attr(l,t).tooltip("show"),i(e),setTimeout(()=>{e.attr(l,a),s(e)},2e3)}})}),$(function(){const t=$("#topbar-title"),s="scroll-focus";$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(r){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var l=decodeURI(this.hash);let e=RegExp(/^#fnref:/).test(l),o=!e&&RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/:/g,"\\:"):l;let a=$(n);var n=t.is(":visible"),i=$(window).width()<$(window).height();if(void 0!==a){r.preventDefault(),history.pushState&&history.pushState(null,null,l);r=$(window).scrollTop();let t=a.offset().top-=8;t<r&&(ScrollHelper.hideTopbar(),ScrollHelper.addScrollUpTask()),n&&i&&(t-=ScrollHelper.getTopbarHeight()),$("html").animate({scrollTop:t},500,()=>{if(a.focus(),$(`[${s}=true]`).length&&$(`[${s}=true]`).attr(s,!1),$(":target").length&&$(":target").attr(s,!1),(o||e)&&a.attr(s,!0),a.is(":focus"))return!1;a.attr("tabindex","-1"),a.focus(),ScrollHelper.hasScrollUpTask()&&ScrollHelper.popScrollUpTask()})}}})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v5.3.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.4.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-chirpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.2
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-22 00:00:00.000000000 Z
11
+ date: 2022-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '4.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.1'
26
+ version: '4.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-paginate
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.4'
97
- description:
97
+ description:
98
98
  email:
99
99
  - cotes.chung@gmail.com
100
100
  executables: []
@@ -129,6 +129,8 @@ files:
129
129
  - _includes/comments/giscus.html
130
130
  - _includes/comments/utterances.html
131
131
  - _includes/datetime.html
132
+ - _includes/embed/twitch.html
133
+ - _includes/embed/youtube.html
132
134
  - _includes/favicons.html
133
135
  - _includes/footer.html
134
136
  - _includes/google-analytics.html
@@ -213,7 +215,7 @@ metadata:
213
215
  source_code_uri: https://github.com/cotes2020/jekyll-theme-chirpy
214
216
  wiki_uri: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
215
217
  plugin_type: theme
216
- post_install_message:
218
+ post_install_message:
217
219
  rdoc_options: []
218
220
  require_paths:
219
221
  - lib
@@ -222,14 +224,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
224
  - - ">="
223
225
  - !ruby/object:Gem::Version
224
226
  version: '2.5'
227
+ - - "<"
228
+ - !ruby/object:Gem::Version
229
+ version: '3.2'
225
230
  required_rubygems_version: !ruby/object:Gem::Requirement
226
231
  requirements:
227
232
  - - ">="
228
233
  - !ruby/object:Gem::Version
229
234
  version: '0'
230
235
  requirements: []
231
- rubygems_version: 3.1.6
232
- signing_key:
236
+ rubygems_version: 3.3.26
237
+ signing_key:
233
238
  specification_version: 4
234
239
  summary: Chirpy is a minimal, sidebar, responsive web design Jekyll theme that focuses
235
240
  on text presentation.