jekyll-theme-chirpy 5.3.2 → 5.5.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 +7 -6
- data/_data/assets/cross_origin.yml +15 -15
- data/_data/assets/self_host.yml +2 -2
- data/_data/contact.yml +1 -1
- data/_data/locales/ar.yml +93 -0
- data/_data/locales/bg-BG.yml +3 -3
- data/_data/locales/cs-CZ.yml +91 -0
- data/_data/locales/en.yml +1 -1
- data/_data/locales/fi-FI.yml +92 -0
- data/_data/locales/it-IT.yml +93 -0
- data/_includes/embed/twitch.html +4 -0
- data/_includes/embed/youtube.html +6 -0
- data/_includes/footer.html +5 -5
- data/_includes/head.html +18 -13
- data/_includes/js-selector.html +1 -2
- data/_includes/post-sharing.html +1 -1
- data/_includes/refactor-content.html +98 -96
- data/_includes/sidebar.html +11 -1
- data/_layouts/post.html +11 -20
- data/_sass/addon/commons.scss +133 -73
- data/_sass/addon/module.scss +12 -3
- data/_sass/addon/syntax.scss +11 -19
- data/_sass/colors/dark-typography.scss +16 -3
- data/_sass/colors/light-typography.scss +12 -1
- data/_sass/jekyll-theme-chirpy.scss +1 -1
- data/_sass/layout/post.scss +22 -4
- data/assets/feed.xml +1 -1
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +1 -1
- data/assets/js/dist/misc.min.js +1 -1
- 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 +1 -1
- metadata +16 -10
data/_sass/addon/syntax.scss
CHANGED
@@ -29,18 +29,12 @@ html {
|
|
29
29
|
}
|
30
30
|
}
|
31
31
|
|
32
|
-
/* --
|
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 %
|
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 %
|
53
|
+
@extend %rounded;
|
60
54
|
@extend %code-snippet-bg;
|
61
55
|
|
62
56
|
@at-root figure#{&} {
|
@@ -72,6 +66,13 @@ $code-radius: 6px;
|
|
72
66
|
font-size: $code-font-size;
|
73
67
|
line-height: 1.4rem;
|
74
68
|
word-wrap: normal; /* Fixed Safari overflow-x */
|
69
|
+
|
70
|
+
/* set the dollar sign to non-selectable */
|
71
|
+
>.gp:first-child {
|
72
|
+
-webkit-user-select: none;
|
73
|
+
-moz-user-select: none;
|
74
|
+
user-select: none;
|
75
|
+
}
|
75
76
|
}
|
76
77
|
|
77
78
|
table {
|
@@ -91,13 +92,6 @@ $code-radius: 6px;
|
|
91
92
|
-o-user-select: none;
|
92
93
|
user-select: none;
|
93
94
|
}
|
94
|
-
|
95
|
-
/* set the dollar sign to non-selectable */
|
96
|
-
.gp {
|
97
|
-
-webkit-user-select: none;
|
98
|
-
-moz-user-select: none;
|
99
|
-
user-select: none;
|
100
|
-
}
|
101
95
|
} /* .highlight */
|
102
96
|
|
103
97
|
code {
|
@@ -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
|
-
|
100
|
-
|
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;
|
data/_sass/layout/post.scss
CHANGED
@@ -26,12 +26,30 @@
|
|
26
26
|
color: var(--text-color);
|
27
27
|
}
|
28
28
|
|
29
|
-
|
29
|
+
%preview-margin {
|
30
30
|
margin: 0;
|
31
|
-
|
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
|
-
|
34
|
-
|
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>
|
data/assets/js/dist/home.min.js
CHANGED
data/assets/js/dist/misc.min.js
CHANGED
data/assets/js/dist/page.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.
|
2
|
+
* Chirpy v5.5.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)})}}),$(
|
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()})}}})});
|
data/assets/js/dist/post.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Chirpy v5.
|
2
|
+
* Chirpy v5.5.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)})}}),$(
|
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()})}}})});
|
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.
|
4
|
+
version: 5.5.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:
|
11
|
+
date: 2023-01-29 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.
|
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.
|
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: []
|
@@ -107,13 +107,17 @@ files:
|
|
107
107
|
- _data/assets/self_host.yml
|
108
108
|
- _data/authors.yml
|
109
109
|
- _data/contact.yml
|
110
|
+
- _data/locales/ar.yml
|
110
111
|
- _data/locales/bg-BG.yml
|
112
|
+
- _data/locales/cs-CZ.yml
|
111
113
|
- _data/locales/de-DE.yml
|
112
114
|
- _data/locales/en.yml
|
113
115
|
- _data/locales/es-ES.yml
|
116
|
+
- _data/locales/fi-FI.yml
|
114
117
|
- _data/locales/fr-FR.yml
|
115
118
|
- _data/locales/hu-HU.yml
|
116
119
|
- _data/locales/id-ID.yml
|
120
|
+
- _data/locales/it-IT.yml
|
117
121
|
- _data/locales/ko-KR.yml
|
118
122
|
- _data/locales/my-MM.yml
|
119
123
|
- _data/locales/pt-BR.yml
|
@@ -129,6 +133,8 @@ files:
|
|
129
133
|
- _includes/comments/giscus.html
|
130
134
|
- _includes/comments/utterances.html
|
131
135
|
- _includes/datetime.html
|
136
|
+
- _includes/embed/twitch.html
|
137
|
+
- _includes/embed/youtube.html
|
132
138
|
- _includes/favicons.html
|
133
139
|
- _includes/footer.html
|
134
140
|
- _includes/google-analytics.html
|
@@ -213,7 +219,7 @@ metadata:
|
|
213
219
|
source_code_uri: https://github.com/cotes2020/jekyll-theme-chirpy
|
214
220
|
wiki_uri: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
|
215
221
|
plugin_type: theme
|
216
|
-
post_install_message:
|
222
|
+
post_install_message:
|
217
223
|
rdoc_options: []
|
218
224
|
require_paths:
|
219
225
|
- lib
|
@@ -221,15 +227,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
227
|
requirements:
|
222
228
|
- - ">="
|
223
229
|
- !ruby/object:Gem::Version
|
224
|
-
version: '2.
|
230
|
+
version: '2.6'
|
225
231
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
232
|
requirements:
|
227
233
|
- - ">="
|
228
234
|
- !ruby/object:Gem::Version
|
229
235
|
version: '0'
|
230
236
|
requirements: []
|
231
|
-
rubygems_version: 3.1
|
232
|
-
signing_key:
|
237
|
+
rubygems_version: 3.4.1
|
238
|
+
signing_key:
|
233
239
|
specification_version: 4
|
234
240
|
summary: Chirpy is a minimal, sidebar, responsive web design Jekyll theme that focuses
|
235
241
|
on text presentation.
|