jekyll-theme-chirpy 3.2.2 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -20
- data/_config.yml +3 -3
- data/_includes/disqus.html +1 -1
- data/_includes/js-selector.html +19 -2
- data/_includes/timeago.html +5 -1
- data/_layouts/post.html +5 -6
- data/_sass/addon/commons.scss +4 -0
- data/_sass/addon/module.scss +1 -0
- data/_sass/colors/dark-typography.scss +1 -0
- data/_sass/colors/light-syntax.scss +1 -1
- data/_sass/colors/light-typography.scss +2 -1
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/post.scss +4 -0
- data/assets/js/data/cache-list.js +11 -15
- data/assets/js/dist/categories.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
- data/feed.xml +3 -3
- data/sw.js +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d833e4ed6f7e8ec68aa2d3089a0c78378c80a67ff45f9a6bcbcf84e7f2c41d85
|
4
|
+
data.tar.gz: 51944aab8a026e3003b2eeb7e2fe7b1f2ea228f5773f4c03f287e4ef193ec1f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7579ca6f1d93877c8676d8bea15653f6c6d47f9080cd0eaecb3f4fc99c21dfb992dd4d9e8db4083428e56e82f87fb820fd56be914e672f7e118a7d67993a1193
|
7
|
+
data.tar.gz: e9de76b82c78fefde54aa7b8e27b69e0c88f20aaf14bfdabedda0c97d32a553944003a7907e4eddb403875036e9ae72f972f1b154e1b4af3617858a9ba2d982e
|
data/README.md
CHANGED
@@ -12,18 +12,6 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
|
|
12
12
|
|
13
13
|
[![Devices Mockup](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/commons/devices-mockup.png)](https://chirpy.cotes.info)
|
14
14
|
|
15
|
-
## Table of Contents
|
16
|
-
|
17
|
-
- [Features](#features)
|
18
|
-
- [Prerequisites](#prerequisites)
|
19
|
-
- [Installation](#installation)
|
20
|
-
- [Usage](#usage)
|
21
|
-
- [Documentation](#documentation)
|
22
|
-
- [Contributing](#contributing)
|
23
|
-
- [Credits](#credits)
|
24
|
-
- [Support](#support)
|
25
|
-
- [License](#license)
|
26
|
-
|
27
15
|
## Features
|
28
16
|
|
29
17
|
- Pinned Posts
|
@@ -155,7 +143,7 @@ For security reasons, GitHub Pages build runs on `safe` mode, which restricts us
|
|
155
143
|
Quickly check the files needed for GitHub Actions build:
|
156
144
|
|
157
145
|
- Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`. Otherwise, create a new one and fill in the contents of the [workflow file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name.
|
158
|
-
-
|
146
|
+
- Ensure your Jekyll site has file `tools/test.sh` and `tools/deploy.sh`. Otherwise, copy them from this repo to your Jekyll site.
|
159
147
|
|
160
148
|
And then rename your repoistory to `<GH-USERNAME>.github.io` on GitHub.
|
161
149
|
|
@@ -207,15 +195,13 @@ This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Boot
|
|
207
195
|
|
208
196
|
Also, thank [JetBrains][jb] for providing the open source license.
|
209
197
|
|
210
|
-
|
211
|
-
|
212
|
-
## Support
|
198
|
+
## Sponsoring
|
213
199
|
|
214
200
|
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!
|
215
201
|
|
216
|
-
[![Buy Me a Coffee](https://img.shields.io/badge
|
217
|
-
[![Wechat Pay](https://img.shields.io/badge
|
218
|
-
[![Alipay](https://img.shields.io/badge
|
202
|
+
[![Buy Me a Coffee](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff813f?logo=buy-me-a-coffee&logoColor=white)](https://www.buymeacoffee.com/coteschung)
|
203
|
+
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][cn-donation]
|
204
|
+
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
|
219
205
|
|
220
206
|
## License
|
221
207
|
|
@@ -229,4 +215,3 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
|
|
229
215
|
|
230
216
|
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
231
217
|
[cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
|
232
|
-
|
data/_config.yml
CHANGED
@@ -27,8 +27,6 @@ description: >- # used by seo meta and the atom feed
|
|
27
27
|
# fill in the protocol & hostname for your site, e.g., 'https://username.github.io'
|
28
28
|
url: ''
|
29
29
|
|
30
|
-
author: your_full_name # change to your full name
|
31
|
-
|
32
30
|
github:
|
33
31
|
username: github_username # change to your github username
|
34
32
|
|
@@ -36,7 +34,9 @@ twitter:
|
|
36
34
|
username: twitter_username # change to your twitter username
|
37
35
|
|
38
36
|
social:
|
39
|
-
|
37
|
+
# Change to your full name.
|
38
|
+
# It will be displayed as the default author of the posts and the copyright owner in the Footer
|
39
|
+
name: your_full_name
|
40
40
|
email: example@doamin.com # change to your email address
|
41
41
|
links:
|
42
42
|
# The first element serves as the copyright owner's link
|
data/_includes/disqus.html
CHANGED
data/_includes/js-selector.html
CHANGED
@@ -23,8 +23,25 @@
|
|
23
23
|
|
24
24
|
{% if page.math %}
|
25
25
|
<!-- MathJax -->
|
26
|
-
<script
|
27
|
-
|
26
|
+
<script>
|
27
|
+
// see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options>
|
28
|
+
MathJax = {
|
29
|
+
tex: {
|
30
|
+
inlineMath: [ // start/end delimiter pairs for in-line math
|
31
|
+
['$','$'],
|
32
|
+
['\\(','\\)']
|
33
|
+
],
|
34
|
+
displayMath: [ // start/end delimiter pairs for display math
|
35
|
+
['$$', '$$'],
|
36
|
+
['\\[', '\\]']
|
37
|
+
]
|
38
|
+
}
|
39
|
+
};
|
40
|
+
</script>
|
41
|
+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
42
|
+
<script type="text/javascript" id="MathJax-script" async
|
43
|
+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
44
|
+
</script>
|
28
45
|
{% endif %}
|
29
46
|
|
30
47
|
{% if jekyll.environment == 'production' %}
|
data/_includes/timeago.html
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
<!--
|
2
2
|
Date format snippet
|
3
|
+
See: /assets/js/_utils/timeage.js
|
3
4
|
-->
|
4
5
|
|
5
6
|
{% assign tooltip_df = site.data.date_format.tooltip | default: '%a, %b %e, %Y, %l:%M %p %z' %}
|
@@ -11,7 +12,10 @@
|
|
11
12
|
data-toggle="tooltip"
|
12
13
|
data-placement="bottom"
|
13
14
|
title="{{ include.date | date: tooltip_df }}"
|
14
|
-
{% endif %}
|
15
|
+
{% endif %}
|
16
|
+
|
17
|
+
{% if include.prefix %}prefix="{{ include.prefix }} "{% endif%}
|
18
|
+
{% if include.prep %}prep="{{ include.prep }}"{% endif %} >
|
15
19
|
|
16
20
|
{% assign this_year = site.time | date: "%Y" %}
|
17
21
|
{% assign post_year = include.date | date: "%Y" %}
|
data/_layouts/post.html
CHANGED
@@ -14,19 +14,18 @@ layout: default
|
|
14
14
|
<div class="post-meta text-muted d-flex flex-column">
|
15
15
|
<!-- Published date and author -->
|
16
16
|
<div>
|
17
|
-
|
18
|
-
|
19
|
-
<span class="author">
|
20
|
-
{{ page.author | default: site.author }}
|
17
|
+
<span class="semi-bold">
|
18
|
+
{{ page.author | default: site.social.name }}
|
21
19
|
</span>
|
20
|
+
{% include timeago.html date=page.date prep="on" tooltip=true %}
|
22
21
|
</div>
|
23
22
|
|
24
23
|
<div>
|
25
24
|
<!-- lastmod -->
|
26
25
|
{% if page.last_modified_at %}
|
27
26
|
<span>
|
28
|
-
|
29
|
-
|
27
|
+
{% include timeago.html date=page.last_modified_at
|
28
|
+
class="lastmod" prefix="Updated" tooltip=true %}
|
30
29
|
</span>
|
31
30
|
{% endif %}
|
32
31
|
|
data/_sass/addon/commons.scss
CHANGED
data/_sass/addon/module.scss
CHANGED
@@ -68,7 +68,7 @@
|
|
68
68
|
|
69
69
|
/* --- custom light colors --- */
|
70
70
|
--highlight-bg-color: #f7f7f7;
|
71
|
-
--highlighter-rouge-color: #
|
71
|
+
--highlighter-rouge-color: #505050;
|
72
72
|
--highlight-lineno-color: #c2c6cc;
|
73
73
|
--highlight-lineno-border-color: #e9ecef;
|
74
74
|
--inline-code-bg: #f3f3f3;
|
@@ -9,7 +9,8 @@
|
|
9
9
|
--main-wrapper-bg: white;
|
10
10
|
--main-border-color: #f3f3f3;
|
11
11
|
--btn-border-color: #e9ecef;
|
12
|
-
--text-color: #
|
12
|
+
--text-color: #4a4a4a;
|
13
|
+
--heading-color: black;
|
13
14
|
--blockquote-border-color: #eee;
|
14
15
|
--blockquote-text-color: #9a9a9a;
|
15
16
|
--link-color: #2a408e;
|
data/_sass/layout/post.scss
CHANGED
@@ -5,24 +5,28 @@ layout: compress
|
|
5
5
|
---
|
6
6
|
|
7
7
|
const include = [
|
8
|
+
/* --- CSS --- */
|
8
9
|
|
9
|
-
/*--- CSS ---*/
|
10
10
|
'{{ "/assets/css/style.css" | relative_url }}',
|
11
11
|
|
12
|
-
|
12
|
+
/* --- Javascripts --- */
|
13
13
|
'{{ "/assets/js/dist/home.min.js" | relative_url }}',
|
14
14
|
'{{ "/assets/js/dist/page.min.js" | relative_url }}',
|
15
15
|
'{{ "/assets/js/dist/post.min.js" | relative_url }}',
|
16
16
|
'{{ "/assets/js/dist/categories.min.js" | relative_url }}',
|
17
|
+
'{{ "/assets/js/data/search.json" | relative_url }}',
|
18
|
+
'{{ "/app.js" | relative_url }}',
|
19
|
+
'{{ "/sw.js" | relative_url }}',
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
/* --- HTML --- */
|
22
|
+
'{{ "/index.html" | relative_url }}',
|
23
|
+
'{{ "/404.html" | relative_url }}',
|
21
24
|
{% for tab in site.tabs %}
|
22
25
|
'{{ tab.url }}',
|
23
26
|
{% endfor %}
|
24
27
|
|
25
|
-
|
28
|
+
|
29
|
+
/* --- Icons --- */
|
26
30
|
|
27
31
|
{%- capture icon_url -%}
|
28
32
|
{{ "/assets/img/favicons" | relative_url }}
|
@@ -45,15 +49,7 @@ const include = [
|
|
45
49
|
'{{ icon_url }}/favicon-16x16.png',
|
46
50
|
'{{ icon_url }}/ms-icon-144x144.png',
|
47
51
|
'{{ icon_url }}/manifest.json',
|
48
|
-
'{{ icon_url }}/browserconfig.xml'
|
49
|
-
|
50
|
-
/*--- Others ---*/
|
51
|
-
|
52
|
-
'{{ "/assets/js/data/search.json" | relative_url }}',
|
53
|
-
'{{ "/404.html" | relative_url }}',
|
54
|
-
|
55
|
-
'{{ "/app.js" | relative_url }}',
|
56
|
-
'{{ "/sw.js" | relative_url }}'
|
52
|
+
'{{ icon_url }}/browserconfig.xml'
|
57
53
|
];
|
58
54
|
|
59
55
|
const exclude = [
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v3.
|
2
|
+
* Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{
|
6
|
+
function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),d=$("#search-results"),c=$("#search-input"),i=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),f={on(){e.addClass("unloaded"),l.addClass("unloaded"),o.addClass("unloaded"),n.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),o.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(d.empty(),i.hasClass("unloaded")&&i.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),a.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function h(){return t.hasClass("loaded")}o.click(function(){f.on(),p.on(),c.focus()}),t.click(function(){f.off(),p.off()}),c.focus(function(){n.addClass("input-focus")}),c.focusout(function(){n.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?h()?i.removeClass("unloaded"):p.off():""!==c.val()&&(p.on(),s.hasClass("visible")||s.addClass("visible"),h()&&i.addClass("unloaded"))}),s.on("click",function(){c.val(""),h()?(i.removeClass("unloaded"),d.empty()):p.off(),c.focus(),s.removeClass("visible")})}),$(function(){var e=function(){const e="sidebar-display";let o=!1;const t=$("body");return{toggle(){!1===o?t.attr(e,""):t.removeAttr(e),o=!o}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const o=$("#topbar-wrapper"),t=$("#toc-wrapper"),s=$(".access"),a=$("#search-input");let l,n=0;const r=o.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(l=!0)}),setInterval(function(){l&&(function(){var e=$(this).scrollTop();Math.abs(n-e)<=5||(e>n&&e>r?(o.removeClass("topbar-down").addClass("topbar-up"),0<t.length&&t.removeClass("topbar-down"),0<s.length&&s.removeClass("topbar-down"),a.is(":focus")&&a.blur()):e+$(window).height()<$(document).height()&&(o.removeClass("topbar-up").addClass("topbar-down"),0<t.length&&t.addClass("topbar-down"),0<s.length&&s.addClass("topbar-down")),n=e)}(),l=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),t=e.text().trim();let s=(0<o.length?o:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==s&&e.text(s):e.text()!==t&&e.text(t))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){const e=$(".collapse");e.on("hide.bs.collapse",function(){var e="h_"+$(this).attr("id").substring("l_".length);e&&($(`#${e} .far.fa-folder-open`).attr("class","far fa-folder fa-fw"),$(`#${e} i.fas`).addClass("rotate"),$(`#${e}`).removeClass("hide-border-bottom"))}),e.on("show.bs.collapse",function(){var e="h_"+$(this).attr("id").substring("l_".length);e&&($(`#${e} .far.fa-folder`).attr("class","far fa-folder-open fa-fw"),$(`#${e} i.fas`).removeClass("rotate"),$(`#${e}`).addClass("hide-border-bottom"))})});
|
data/assets/js/dist/home.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v3.
|
2
|
+
* Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
function copyLink(e){e&&0!==e.length||(e=window.location.href);const
|
6
|
+
function copyLink(e){e&&0!==e.length||(e=window.location.href);const o=$("<input>");$("body").append(o),o.val(e).select(),document.execCommand("copy"),o.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),t=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),o.addClass("unloaded"),l.addClass("d-flex"),t.addClass("loaded")},off(){t.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),o.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),s.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function p(){return t.hasClass("loaded")}o.click(function(){h.on(),f.on(),c.focus()}),t.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(function(){var e=function(){const e="sidebar-display";let o=!1;const t=$("body");return{toggle(){!1===o?t.attr(e,""):t.removeAttr(e),o=!o}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const o=$("#topbar-wrapper"),t=$("#toc-wrapper"),a=$(".access"),s=$("#search-input");let n,l=0;const r=o.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(function(){var e=$(this).scrollTop();Math.abs(l-e)<=5||(e>l&&e>r?(o.removeClass("topbar-down").addClass("topbar-up"),0<t.length&&t.removeClass("topbar-down"),0<a.length&&a.removeClass("topbar-down"),s.is(":focus")&&s.blur()):e+$(window).height()<$(document).height()&&(o.removeClass("topbar-up").addClass("topbar-down"),0<t.length&&t.addClass("topbar-down"),0<a.length&&a.addClass("topbar-down")),l=e)}(),n=!1)},250)}),$(function(){const e=$("#topbar-title"),o=$("div.post>h1"),t=e.text().trim();let a=(0<o.length?o:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||o.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==a&&e.text(a):e.text()!==t&&e.text(t))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let s=$(".timeago").length,e=void 0;function o(){return $(".timeago").each(function(){if(0<$(this).children("i").length){let e=$(this).children("i");var o=e.text();$(this).text(function(e,o){let t=new Date,a=new Date(e);return e=void 0!==o?`${o} `:"",a.getFullYear()!==t.getFullYear()?(--s,e+a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})):a.getMonth()!==t.getMonth()?(--s,e+a.toLocaleString("en-US",{month:"short",day:"numeric"})):(o=Math.floor((t-a)/1e3),1<=(e=Math.floor(o/86400))?(--s,e+" day"+(1<e?"s":"")+" ago"):1<=(e=Math.floor(o/3600))?e+" hour"+(1<e?"s":"")+" ago":1<=(o=Math.floor(o/60))?o+" minute"+(1<o?"s":"")+" ago":"just now")}(o,$(this).attr("prep"))),$(this).append(e)}}),0===s&&void 0!==e&&clearInterval(e),s}0!==s&&0<o()&&(e=setInterval(o,6e4))});
|
data/assets/js/dist/page.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v3.
|
2
|
+
* Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{
|
6
|
+
function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),s=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),c=$("#search-results"),i=$("#search-input"),d=$("#search-hints"),u=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"),l.addClass("unloaded"),t.addClass("unloaded"),n.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(c.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),s.removeClass("visible"),a.removeClass("unloaded"),u.release(),i.val(""),e=!1)},isVisible(){return e}}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),f.on(),i.focus()}),o.click(function(){p.off(),f.off()}),i.focus(function(){n.addClass("input-focus")}),i.focusout(function(){n.removeClass("input-focus")}),i.on("keyup",function(e){8===e.keyCode&&""===i.val()?h()?d.removeClass("unloaded"):f.off():""!==i.val()&&(f.on(),s.hasClass("visible")||s.addClass("visible"),h()&&d.addClass("unloaded"))}),s.on("click",function(){i.val(""),h()?(d.removeClass("unloaded"),c.empty()):f.off(),i.focus(),s.removeClass("visible")})}),$(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=$("#topbar-wrapper"),o=$("#toc-wrapper"),s=$(".access"),a=$("#search-input");let l,n=0;const r=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(l=!0)}),setInterval(function(){l&&(function(){var e=$(this).scrollTop();Math.abs(n-e)<=5||(e>n&&e>r?(t.removeClass("topbar-down").addClass("topbar-up"),0<o.length&&o.removeClass("topbar-down"),0<s.length&&s.removeClass("topbar-down"),a.is(":focus")&&a.blur()):e+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),0<o.length&&o.addClass("topbar-down"),0<s.length&&s.addClass("topbar-down")),n=e)}(),l=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let s=(0<t.length?t:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(s)&&(s=s.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==s&&e.text(s):e.text()!==o&&e.text(o))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const n=decodeURI(this.hash);let o=RegExp(/^#fnref:/).test(n),s=RegExp(/^#fn:/).test(n);var l=n.includes(":")?n.replace(/\:/,"\\:"):n;let a=$(l);if(a.length){t.preventDefault(),history.pushState&&history.pushState(null,null,n);l=$(this).offset().top;let e=a.offset().top;t=e<l,l=$("#topbar-wrapper").outerHeight();t&&o&&(e-=l+8),$("html,body").animate({scrollTop:e},800,()=>{const e=$(a);e.focus();var t="scroll-focus";if($(`[${t}=true]`).length&&$(`[${t}=true]`).attr(t,!1),$(":target").length&&$(":target").attr(t,!1),(s||o)&&e.attr(t,!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
|
data/assets/js/dist/post.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v3.
|
2
|
+
* Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(function(){$(window).scroll(()=>{
|
6
|
+
function copyLink(e){e&&0!==e.length||(e=window.location.href);const t=$("<input>");$("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied successfully!")}$(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(){$("input[type=checkbox]").addClass("unloaded"),$("input[type=checkbox][checked]").before('<i class="fas fa-check-circle checked"></i>'),$("input[type=checkbox]:not([checked])").before('<i class="far fa-circle"></i>')}),$(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),h={on(){e.addClass("unloaded"),n.addClass("unloaded"),t.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),e.removeClass("unloaded"),n.removeClass("unloaded"),t.removeClass("unloaded")}},f=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),s.addClass("unloaded"),e=!0)},off(){e&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible(){return e}}}();function p(){return o.hasClass("loaded")}t.click(function(){h.on(),f.on(),c.focus()}),o.click(function(){h.off(),f.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(e){8===e.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(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=$("#topbar-wrapper"),o=$("#toc-wrapper"),a=$(".access"),s=$("#search-input");let n,l=0;const r=t.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(function(){var e=$(this).scrollTop();Math.abs(l-e)<=5||(e>l&&e>r?(t.removeClass("topbar-down").addClass("topbar-up"),0<o.length&&o.removeClass("topbar-down"),0<a.length&&a.removeClass("topbar-down"),s.is(":focus")&&s.blur()):e+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),0<o.length&&o.addClass("topbar-down"),0<a.length&&a.addClass("topbar-down")),l=e)}(),n=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let a=(0<t.length?t:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?e.text()!==a&&e.text(a):e.text()!==o&&e.text(o))}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){let s=$(".timeago").length,e=void 0;function t(){return $(".timeago").each(function(){if(0<$(this).children("i").length){let e=$(this).children("i");var t=e.text();$(this).text(function(e,t){let o=new Date,a=new Date(e);return e=void 0!==t?`${t} `:"",a.getFullYear()!==o.getFullYear()?(--s,e+a.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric"})):a.getMonth()!==o.getMonth()?(--s,e+a.toLocaleString("en-US",{month:"short",day:"numeric"})):(t=Math.floor((o-a)/1e3),1<=(e=Math.floor(t/86400))?(--s,e+" day"+(1<e?"s":"")+" ago"):1<=(e=Math.floor(t/3600))?e+" hour"+(1<e?"s":"")+" ago":1<=(t=Math.floor(t/60))?t+" minute"+(1<t?"s":"")+" ago":"just now")}(t,$(this).attr("prep"))),$(this).append(e)}}),0===s&&void 0!==e&&clearInterval(e),s}0!==s&&0<t()&&(e=setInterval(t,6e4))}),$(function(){$("a:has(img)").addClass("img-hyperlink")}),$(function(){const t="language-",o=new RegExp(`^${t}([a-z])+$`);$(`div[class^=${t}`).each(function(){let e=$(this).attr("class").split(" ");e.forEach(e=>{o.test(e)&&(e=e.substring(t.length),$(this).attr("lang",`${e}`))})})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const l=decodeURI(this.hash);let o=RegExp(/^#fnref:/).test(l),a=RegExp(/^#fn:/).test(l);var n=l.includes(":")?l.replace(/\:/,"\\:"):l;let s=$(n);if(s.length){t.preventDefault(),history.pushState&&history.pushState(null,null,l);n=$(this).offset().top;let e=s.offset().top;t=e<n,n=$("#topbar-wrapper").outerHeight();t&&o&&(e-=n+8),$("html,body").animate({scrollTop:e},800,()=>{const e=$(s);e.focus();var t="scroll-focus";if($(`[${t}=true]`).length&&$(`[${t}=true]`).attr(t,!1),$(":target").length&&$(":target").attr(t,!1),(a||o)&&e.attr(t,!0),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})}}})});
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v3.
|
2
|
+
* Chirpy v3.3.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
3
3
|
* © 2019 Cotes Chung
|
4
4
|
* MIT Licensed
|
5
5
|
*/
|
6
|
-
const getInitStatus=function(){let
|
6
|
+
const getInitStatus=function(){let t=!1;return()=>{var e=t;return t=t||!0,e}}(),PvOpts={isEnabled(){return"true"===$("meta[name=pv-cache-enabled]").attr("content")},getProxyEndpoint(){return $("meta[name=pv-proxy-endpoint]").attr("content")},getLocalData(){return $("meta[name=pv-cache-data]").attr("content")}},PvCache=function(){const t="pv",a="pv_created_date",r="pv_source",n={ORIGIN:"origin",PROXY:"proxy"};function o(e){return localStorage.getItem(e)}function i(e,t){localStorage.setItem(e,t)}return{getData(){return JSON.parse(localStorage.getItem(t))},saveOriginCache(e){i(t,e),i(r,n.ORIGIN),i(a,(new Date).toJSON())},saveProxyCache(e){i(t,e),i(r,n.PROXY),i(a,(new Date).toJSON())},isFromOrigin(){return o(r)===n.ORIGIN},isFromProxy(){return o(r)===n.PROXY},isExpired(){if(PvCache.isFromOrigin()){let e=new Date(o(a));return e.setDate(e.getDate()+1),Date.now()>=e.getTime()}if(PvCache.isFromProxy()){let e=new Date(o(a));return e.setHours(e.getHours()+1),Date.now()>=e.getTime()}return!1},getAllPageviews(){return PvCache.getData().totalsForAllResults["ga:pageviews"]},newerThan(e){return PvCache.getAllPageviews()>e.totalsForAllResults["ga:pageviews"]},inspectKeys(){null!==localStorage.getItem(t)&&null!==localStorage.getItem(r)&&null!==localStorage.getItem(a)||localStorage.clear()}}}();function countUp(t,a,r){if(t<a){let e=new CountUp(r,t,a);e.error?console.error(e.error):e.start()}}function countPV(t,a){let r=0;if(void 0!==a)for(let e=0;e<a.length;++e)if(a[parseInt(e,10)][0]===t){r+=parseInt(a[parseInt(e,10)][1],10);break}return r}function tacklePV(e,t,a,r){let n=countPV(t,e);n=0===n?1:n,r?(r=parseInt(a.text().replace(/,/g,""),10),n>r&&countUp(r,n,a.attr("id"))):a.text((new Intl.NumberFormat).format(n))}function displayPageviews(e){if(void 0!==e){let t=getInitStatus();const a=e.rows;0<$("#post-list").length?$(".post-preview").each(function(){var e=$(this).find("a").attr("href");tacklePV(a,e,$(this).find(".pageviews"),t)}):0<$(".post").length&&(e=window.location.pathname,tacklePV(a,e,$("#pv"),t))}}function fetchProxyPageviews(){$.ajax({type:"GET",url:PvOpts.getProxyEndpoint(),dataType:"jsonp",jsonpCallback:"displayPageviews",success:(e,t,a)=>{PvCache.saveProxyCache(JSON.stringify(e))},error:(e,t,a)=>{console.log("Failed to load pageviews from proxy server: "+a)}})}function fetchPageviews(e=!0,t=!1){PvOpts.isEnabled()&&e?fetch(PvOpts.getLocalData()).then(e=>e.json()).then(e=>{t&&PvCache.newerThan(e)||(displayPageviews(e),PvCache.saveOriginCache(JSON.stringify(e)))}).then(()=>fetchProxyPageviews()):fetchProxyPageviews()}$(function(){var e;0<$(".pageviews").length&&(PvCache.inspectKeys(),(e=PvCache.getData())?(displayPageviews(e),PvCache.isExpired()?fetchPageviews(!0,PvCache.isFromProxy()):PvCache.isFromOrigin()&&fetchPageviews(!1)):fetchPageviews())});
|
data/feed.xml
CHANGED
@@ -10,14 +10,14 @@ layout: compress
|
|
10
10
|
<subtitle>{{ site.description }}</subtitle>
|
11
11
|
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
12
12
|
<author>
|
13
|
-
<name>{{ site.
|
13
|
+
<name>{{ site.social.name }}</name>
|
14
14
|
<uri>{{ "/" | absolute_url }}</uri>
|
15
15
|
</author>
|
16
16
|
<link rel="self" type="application/atom+xml" href="{{ page.url | absolute_url }}"/>
|
17
17
|
<link rel="alternate" type="text/html" hreflang="{{ site.lang | default: 'en' }}"
|
18
18
|
href="{{ '/' | absolute_url }}"/>
|
19
19
|
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
|
20
|
-
<rights> © {{ 'now' | date: '%Y' }} {{ site.
|
20
|
+
<rights> © {{ 'now' | date: '%Y' }} {{ site.social.name }} </rights>
|
21
21
|
<icon>{{ site.baseurl }}/assets/img/favicons/favicon.ico</icon>
|
22
22
|
<logo>{{ site.baseurl }}/assets/img/favicons/favicon-96x96.png</logo>
|
23
23
|
|
@@ -35,7 +35,7 @@ layout: compress
|
|
35
35
|
<id>{{ post_absolute_url }}</id>
|
36
36
|
<content src="{{ post_absolute_url }}" />
|
37
37
|
<author>
|
38
|
-
<name>{{ site.
|
38
|
+
<name>{{ site.social.name }}</name>
|
39
39
|
</author>
|
40
40
|
|
41
41
|
{% if post.categories %}
|
data/sw.js
CHANGED
@@ -7,7 +7,6 @@ self.importScripts('{{ "/assets/js/data/cache-list.js" | relative_url }}');
|
|
7
7
|
|
8
8
|
var cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M" }}';
|
9
9
|
|
10
|
-
|
11
10
|
function isExcluded(url) {
|
12
11
|
const regex = /(^http(s)?|^\/)/; /* the regex for CORS url or relative url */
|
13
12
|
for (const rule of exclude) {
|
@@ -19,7 +18,6 @@ function isExcluded(url) {
|
|
19
18
|
return false;
|
20
19
|
}
|
21
20
|
|
22
|
-
|
23
21
|
self.addEventListener('install', (e) => {
|
24
22
|
self.skipWaiting();
|
25
23
|
e.waitUntil(
|
@@ -29,25 +27,26 @@ self.addEventListener('install', (e) => {
|
|
29
27
|
);
|
30
28
|
});
|
31
29
|
|
32
|
-
|
33
30
|
self.addEventListener('fetch', (e) => {
|
34
31
|
e.respondWith(
|
35
32
|
caches.match(e.request).then((r) => {
|
36
|
-
/* console.log(
|
33
|
+
/* console.log(`[sw] method: ${e.request.method}, fetching: ${e.request.url}`); */
|
37
34
|
return r || fetch(e.request).then((response) => {
|
38
35
|
return caches.open(cacheName).then((cache) => {
|
39
36
|
if (!isExcluded(e.request.url)) {
|
40
|
-
|
41
|
-
|
37
|
+
if (e.request.method === "GET") {
|
38
|
+
/* console.log('[sw] Caching new resource: ' + e.request.url); */
|
39
|
+
cache.put(e.request, response.clone());
|
40
|
+
}
|
42
41
|
}
|
43
42
|
return response;
|
44
43
|
});
|
44
|
+
|
45
45
|
});
|
46
46
|
})
|
47
47
|
);
|
48
48
|
});
|
49
49
|
|
50
|
-
|
51
50
|
self.addEventListener('activate', (e) => {
|
52
51
|
e.waitUntil(
|
53
52
|
caches.keys().then((keyList) => {
|
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: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cotes Chung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|