jekyll-theme-chirpy 4.2.0 → 4.2.1

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: 27316a10dd6ae0f3873b7387583c07882a4f7925914ec0230b3e5256d3beff2a
4
- data.tar.gz: 43a5cb6d96da78632899cdd8803f2b690c964efffea87f34797d69d6c6541a3e
3
+ metadata.gz: 6057cfe60ef36b6391d6f4d093ecadf402f90c507f643500bfb1a7145a3e981d
4
+ data.tar.gz: d31319738e5cb098188e39a98d46de969c465594cc404a4d44bd045ceaf4fb8e
5
5
  SHA512:
6
- metadata.gz: 1e6a42ae09f8ae1b0cba266160cf8f4896f7e791c4b636cea2011563c711aaaa8f1be8ed8e3672a414b45fbc501ec212ca5ae562a5996cf7c17832c2079315d5
7
- data.tar.gz: a9f06936e1d5682b2b2986f8b871b923217f13aa0a3cbbb219d16527f60291cb004b83e32c99f0ebbb56e032fed179df9412d57e03c80a5e685868ab174f332b
6
+ metadata.gz: ab09866050405aba805c2e7da16c0b4338b2d89fa04d2918b82c9be4fcf8447c28fe511f9a0046f4479f640a59ea8439124a703bdead1751e70c4c9510b27bea
7
+ data.tar.gz: a804a0436785f0ade31f3382ff95f0bf3b8baff99fff278511d2aa84e90e57f2c80b8366f7b6f5081839991a1c6d1386dfe3a238b67f222663970e0e9b784305
data/_data/locales/en.yml CHANGED
@@ -76,7 +76,11 @@ post:
76
76
  button:
77
77
  next: Newer
78
78
  previous: Older
79
- copy: Copied!
79
+ copy_code:
80
+ succeed: Copied!
81
+ share_link:
82
+ title: Copy link
83
+ succeed: Link copied successfully!
80
84
  # pinned prompt of posts list on homepage
81
85
  pin_prompt: Pinned
82
86
 
@@ -76,7 +76,11 @@ post:
76
76
  button:
77
77
  next: Terbaru
78
78
  previous: Terlama
79
- copy: Disalin!
79
+ copy_code:
80
+ succeed: Disalin!
81
+ share_link:
82
+ title: Salin tautan
83
+ succeed: Tautan berhasil disalin!
80
84
  # pinned prompt of posts list on homepage
81
85
  pin_prompt: Disematkan
82
86
 
@@ -75,7 +75,11 @@ post:
75
75
  button:
76
76
  next: 下一篇
77
77
  previous: 上一篇
78
- copy: 已复制!
78
+ copy_code:
79
+ succeed: 已复制!
80
+ share_link:
81
+ title: 分享链接
82
+ succeed: 链接已复制!
79
83
  # pinned prompt of posts list on homepage
80
84
  pin_prompt: 顶置
81
85
 
@@ -16,9 +16,10 @@
16
16
  </a>
17
17
  {% endfor %}
18
18
 
19
- <i class="fa-fw fas fa-link small" onclick="copyLink('', '{{ site.data.locales[lang].post.button.copy.succeed }}')"
19
+ <i id="copy-link" class="fa-fw fas fa-link small"
20
20
  data-toggle="tooltip" data-placement="top"
21
- title="{{ site.data.locales[lang].post.button.copy.title }}">
21
+ title="{{ site.data.locales[lang].post.button.share_link.title }}"
22
+ title-succeed="{{ site.data.locales[lang].post.button.share_link.succeed }}">
22
23
  </i>
23
24
 
24
25
  </span>
@@ -127,7 +127,7 @@
127
127
  | append: '<div class="code-header" text-data="'
128
128
  | append: _text
129
129
  | append: '"><button data-original-title="'
130
- | append: site.data.locales[lang].post.button.copy
130
+ | append: site.data.locales[lang].post.button.copy_code.succeed
131
131
  | append: '"><i class="far fa-clone"></i></button></div>'
132
132
  | append: '<div class="highlight"><code>'
133
133
  %}
@@ -199,12 +199,12 @@ div {
199
199
  background-color: inherit;
200
200
  color: var(--highlight-lineno-color);
201
201
 
202
- &[locked=true] {
202
+ &[timeout] {
203
203
  color: var(--clipboard-checked-color);
204
204
  border-color: var(--clipboard-checked-color);
205
205
  }
206
206
 
207
- &:not([locked]):hover {
207
+ &:not([timeout]):hover {
208
208
  background-color: gray;
209
209
  color: white;
210
210
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * The styles for Jekyll theme Chirpy
3
3
  *
4
- * Chirpy v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
4
+ * Chirpy v4.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
5
5
  * © 2019 Cotes Chung
6
6
  * MIT Licensed
7
7
  */
@@ -240,7 +240,8 @@
240
240
  }
241
241
  }
242
242
  > i {
243
- padding-top: 0.35rem;
243
+ position: relative;
244
+ bottom: 1px;
244
245
  &:hover {
245
246
  @extend %btn-share-hovor;
246
247
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (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 v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (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 v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (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 v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- $(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),i=$("#search-result-wrapper"),r=$("#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:()=>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(),i.removeClass("unloaded"),s.addClass("unloaded"),e=!0)},off(){e&&(r.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),i.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),e=!1)},isVisible:()=>e}}();function h(){return o.hasClass("loaded")}t.click(function(){p.on(),f.on(),c.focus()}),o.click(function(){p.off(),f.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()?d.removeClass("unloaded"):f.off():""!==c.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),h()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),h()?(d.removeClass("unloaded"),r.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(function(){const e=function(){let e=!1;const t=$("body");return{toggle(){!1===e?t.attr("sidebar-display",""):t.removeAttr("sidebar-display"),e=!e}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const e=$("#topbar-wrapper"),t=$("#toc-wrapper"),o=$(".access"),a=$("#search-input");let s,l=0;const n=5,i=e.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(s=!0)}),setInterval(function(){s&&(!function(){var s=$(this).scrollTop();Math.abs(l-s)<=n||(s>l&&s>i?(e.removeClass("topbar-down").addClass("topbar-up"),t.length>0&&t.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),a.is(":focus")&&a.blur()):s+$(window).height()<$(document).height()&&(e.removeClass("topbar-up").addClass("topbar-down"),t.length>0&&t.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),l=s)}(),s=!1)},250)}),$(function(){const e=$("#topbar-title"),t=$("div.post>h1"),o=e.text().trim();let a=t.length>0?t.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||t.is(":hidden")||e.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?e.text()!==a&&e.text(a):e.text()!==o&&e.text(o)}),e.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(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="#main > div.row:first-child > div:first-child";if($(`${e} img`).length<=0)return;const t=document.querySelectorAll(`${e} img[data-src]`);lozad(t).observe(),$(`${e} p > img[data-src],${e} img[data-src].preview-img`).each(function(){let e=$(this).next();const t="EM"===e.prop("tagName")?e.text():"",o=$(this).attr("data-src");$(this).wrap(`<a href="${o}" 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 e="fas fa-check",t="locked",o=2e3,a=new ClipboardJS(".code-header>button",{target:e=>e.parentNode.nextElementSibling});$(".code-header>button").tooltip({trigger:"click",placement:"left"});const s=$(".code-header>button").children().attr("class");a.on("success",a=>{a.clearSelection(),function(e){return"true"===$(e).attr(t)}(a.trigger)||(function(e){$(e).tooltip("hide").tooltip("show")}(a.trigger),function(e){setTimeout(function(){$(e).tooltip("hide")},o)}(a.trigger),function(o){let a=$(o),s=a.children();a.attr(t,!0),s.attr("class",e)}(a.trigger),function(e){let a=$(e),l=a.children();setTimeout(function(){a.removeAttr(t),l.attr("class",s)},o)}($(a.trigger)))})});
6
+ $(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),i=$("#search-result-wrapper"),c=$("#search-results"),r=$("#search-input"),d=$("#search-hints"),u=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset:()=>t}}(),p={on(){t.addClass("unloaded"),n.addClass("unloaded"),e.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),t.removeClass("unloaded"),n.removeClass("unloaded"),e.removeClass("unloaded")}},f=function(){let t=!1;return{on(){t||(u.block(),i.removeClass("unloaded"),s.addClass("unloaded"),t=!0)},off(){t&&(c.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),i.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),r.val(""),t=!1)},isVisible:()=>t}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),f.on(),r.focus()}),o.click(function(){p.off(),f.off()}),r.focus(function(){l.addClass("input-focus")}),r.focusout(function(){l.removeClass("input-focus")}),r.on("keyup",function(t){8===t.keyCode&&""===r.val()?h()?d.removeClass("unloaded"):f.off():""!==r.val()&&(f.on(),a.hasClass("visible")||a.addClass("visible"),h()&&d.addClass("unloaded"))}),a.on("click",function(){r.val(""),h()?(d.removeClass("unloaded"),c.empty()):f.off(),r.focus(),a.removeClass("visible")})}),$(function(){const t=function(){let t=!1;const e=$("body");return{toggle(){!1===t?e.attr("sidebar-display",""):e.removeAttr("sidebar-display"),t=!t}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#topbar-wrapper"),e=$("#toc-wrapper"),o=$(".access"),a=$("#search-input");let s,n=0;const l=5,i=t.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(s=!0)}),setInterval(function(){s&&(!function(){var s=$(this).scrollTop();Math.abs(n-s)<=l||(s>n&&s>i?(t.removeClass("topbar-down").addClass("topbar-up"),e.length>0&&e.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),a.is(":focus")&&a.blur()):s+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),e.length>0&&e.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),n=s)}(),s=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=e.length>0?e.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?t.text()!==a&&t.text(a):t.text()!==o&&t.text(o)}),t.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(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 t="#main > div.row:first-child > div:first-child";if($(`${t} img`).length<=0)return;const e=document.querySelectorAll(`${t} img[data-src]`);lozad(e).observe(),$(`${t} p > img[data-src],${t} img[data-src].preview-img`).each(function(){let t=$(this).next();const e="EM"===t.prop("tagName")?t.text():"",o=$(this).attr("data-src");$(this).wrap(`<a href="${o}" 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(){const t="fas fa-check",e="timeout",o=2e3;function a(t){if($(t)[0].hasAttribute(e)){let o=$(t).attr(e);if(Number(o)>Date.now())return!0}return!1}function s(t){$(t).attr(e,Date.now()+o)}function n(t){$(t).removeAttr(e)}const l=new ClipboardJS(".code-header>button",{target:t=>t.parentNode.nextElementSibling.querySelector("code .rouge-code")});$(".code-header>button").tooltip({trigger:"click",placement:"left"});const i=$(".code-header>button").children().attr("class");l.on("success",e=>{e.clearSelection();const l=e.trigger;a(l)||(!function(e){$(e).children().attr("class",t),s(e)}(l),function(t){$(t).tooltip("show")}(l),setTimeout(()=>{!function(t){$(t).tooltip("hide"),n(t)}(l),function(t){$(t).children().attr("class",i),n(t)}(l)},o))}),$("#copy-link").click(t=>{let e=$(t.target);if(a(e))return;const l=window.location.href,i=$("<input>");$("body").append(i),i.val(l).select(),document.execCommand("copy"),i.remove();const c=e.attr("data-original-title"),r=e.attr("title-succeed");e.attr("data-original-title",r).tooltip("show"),s(e),setTimeout(()=>{e.attr("data-original-title",c),n(e)},o)})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- $(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),n=$("#main"),s=$("#topbar-title"),l=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset:()=>t}}(),f={on(){t.addClass("unloaded"),s.addClass("unloaded"),e.addClass("unloaded"),l.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),l.removeClass("d-flex"),t.removeClass("unloaded"),s.removeClass("unloaded"),e.removeClass("unloaded")}},h=function(){let t=!1;return{on(){t||(u.block(),r.removeClass("unloaded"),n.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),n.removeClass("unloaded"),u.release(),c.val(""),t=!1)},isVisible:()=>t}}();function p(){return o.hasClass("loaded")}e.click(function(){f.on(),h.on(),c.focus()}),o.click(function(){f.off(),h.off()}),c.focus(function(){l.addClass("input-focus")}),c.focusout(function(){l.removeClass("input-focus")}),c.on("keyup",function(t){8===t.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):h.off():""!==c.val()&&(h.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):h.off(),c.focus(),a.removeClass("visible")})}),$(function(){const t=function(){let t=!1;const e=$("body");return{toggle(){!1===t?e.attr("sidebar-display",""):e.removeAttr("sidebar-display"),t=!t}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#topbar-wrapper"),e=$("#toc-wrapper"),o=$(".access"),a=$("#search-input");let n,s=0;const l=5,r=t.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(!function(){var n=$(this).scrollTop();Math.abs(s-n)<=l||(n>s&&n>r?(t.removeClass("topbar-down").addClass("topbar-up"),e.length>0&&e.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),a.is(":focus")&&a.blur()):n+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),e.length>0&&e.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),s=n)}(),n=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=e.length>0?e.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?t.text()!==a&&t.text(a):t.text()!==o&&t.text(o)}),t.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){const t="#main > div.row:first-child > div:first-child";if($(`${t} img`).length<=0)return;const e=document.querySelectorAll(`${t} img[data-src]`);lozad(e).observe(),$(`${t} p > img[data-src],${t} img[data-src].preview-img`).each(function(){let t=$(this).next();const e="EM"===t.prop("tagName")?t.text():"",o=$(this).attr("data-src");$(this).wrap(`<a href="${o}" 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(){let t=$(".timeago").length,e=void 0;const o=$("meta[name=day-prompt]").attr("content"),a=$("meta[name=hour-prompt]").attr("content"),n=$("meta[name=minute-prompt]").attr("content"),s=$("meta[name=justnow-prompt]").attr("content");function l(){return $(".timeago").each(function(){if($(this).children("i").length>0){let e=$(this).clone().children().remove().end().text(),l=$(this).children("i"),r=l.text();$(this).text(function(e,l){let r=new Date,i=new Date(e);if(i.getFullYear()!==r.getFullYear()||i.getMonth()!==r.getMonth())return l;let c=Math.floor((r-i)/1e3),d=Math.floor(c/86400);if(d>=1)return t-=1,` ${d} ${o}`;let u=Math.floor(c/3600);if(u>=1)return` ${u} ${a}`;let f=Math.floor(c/60);return f>=1?` ${f} ${n}`:s}(r,e)),$(this).append(l)}}),0===t&&void 0!==e&&clearInterval(e),t}0!==t&&l()>0&&(e=setInterval(l,6e4))}),$(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 t="fas fa-check",e="locked",o=2e3,a=new ClipboardJS(".code-header>button",{target:t=>t.parentNode.nextElementSibling});$(".code-header>button").tooltip({trigger:"click",placement:"left"});const n=$(".code-header>button").children().attr("class");a.on("success",a=>{a.clearSelection(),function(t){return"true"===$(t).attr(e)}(a.trigger)||(function(t){$(t).tooltip("hide").tooltip("show")}(a.trigger),function(t){setTimeout(function(){$(t).tooltip("hide")},o)}(a.trigger),function(o){let a=$(o),n=a.children();a.attr(e,!0),n.attr("class",t)}(a.trigger),function(t){let a=$(t),s=a.children();setTimeout(function(){a.removeAttr(e),s.attr("class",n)},o)}($(a.trigger)))})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const e=16,o=decodeURI(this.hash);let a=RegExp(/^#fnref:/).test(o),n=RegExp(/^#fn:/).test(o),s=o.includes(":")?o.replace(/\:/,"\\:"):o,l=$(s);if(l.length){t.preventDefault(),history.pushState&&history.pushState(null,null,o);let s=$(this).offset().top,r=l.offset().top;const i=r<s,c=$("#topbar-wrapper").outerHeight();i&&a&&(r-=c+e/2),$("html,body").animate({scrollTop:r},800,()=>{const t=$(l);t.focus();if($("[scroll-focus=true]").length&&$("[scroll-focus=true]").attr("scroll-focus",!1),$(":target").length&&$(":target").attr("scroll-focus",!1),(n||a)&&t.attr("scroll-focus",!0),t.is(":focus"))return!1;t.attr("tabindex","-1"),t.focus()})}}})});
6
+ $(function(){$(window).scroll(()=>{$(this).scrollTop()>50&&"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(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),n=$("#main"),l=$("#topbar-title"),s=$("#search-wrapper"),r=$("#search-result-wrapper"),i=$("#search-results"),c=$("#search-input"),d=$("#search-hints"),u=function(){let t=0;return{block(){t=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(t)},getOffset:()=>t}}(),f={on(){t.addClass("unloaded"),l.addClass("unloaded"),e.addClass("unloaded"),s.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),s.removeClass("d-flex"),t.removeClass("unloaded"),l.removeClass("unloaded"),e.removeClass("unloaded")}},h=function(){let t=!1;return{on(){t||(u.block(),r.removeClass("unloaded"),n.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),r.addClass("unloaded"),a.removeClass("visible"),n.removeClass("unloaded"),u.release(),c.val(""),t=!1)},isVisible:()=>t}}();function p(){return o.hasClass("loaded")}e.click(function(){f.on(),h.on(),c.focus()}),o.click(function(){f.off(),h.off()}),c.focus(function(){s.addClass("input-focus")}),c.focusout(function(){s.removeClass("input-focus")}),c.on("keyup",function(t){8===t.keyCode&&""===c.val()?p()?d.removeClass("unloaded"):h.off():""!==c.val()&&(h.on(),a.hasClass("visible")||a.addClass("visible"),p()&&d.addClass("unloaded"))}),a.on("click",function(){c.val(""),p()?(d.removeClass("unloaded"),i.empty()):h.off(),c.focus(),a.removeClass("visible")})}),$(function(){const t=function(){let t=!1;const e=$("body");return{toggle(){!1===t?e.attr("sidebar-display",""):e.removeAttr("sidebar-display"),t=!t}}}();$("#sidebar-trigger").click(t.toggle),$("#mask").click(t.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const t=$("#topbar-wrapper"),e=$("#toc-wrapper"),o=$(".access"),a=$("#search-input");let n,l=0;const s=5,r=t.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(n=!0)}),setInterval(function(){n&&(!function(){var n=$(this).scrollTop();Math.abs(l-n)<=s||(n>l&&n>r?(t.removeClass("topbar-down").addClass("topbar-up"),e.length>0&&e.removeClass("topbar-down"),o.length>0&&o.removeClass("topbar-down"),a.is(":focus")&&a.blur()):n+$(window).height()<$(document).height()&&(t.removeClass("topbar-up").addClass("topbar-down"),e.length>0&&e.addClass("topbar-down"),o.length>0&&o.addClass("topbar-down")),l=n)}(),n=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=e.length>0?e.text().trim():$("h1").text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){if($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)return!1;$(this).scrollTop()>=95?t.text()!==a&&t.text(a):t.text()!==o&&t.text(o)}),t.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){const t="#main > div.row:first-child > div:first-child";if($(`${t} img`).length<=0)return;const e=document.querySelectorAll(`${t} img[data-src]`);lozad(e).observe(),$(`${t} p > img[data-src],${t} img[data-src].preview-img`).each(function(){let t=$(this).next();const e="EM"===t.prop("tagName")?t.text():"",o=$(this).attr("data-src");$(this).wrap(`<a href="${o}" 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(){let t=$(".timeago").length,e=void 0;const o=$("meta[name=day-prompt]").attr("content"),a=$("meta[name=hour-prompt]").attr("content"),n=$("meta[name=minute-prompt]").attr("content"),l=$("meta[name=justnow-prompt]").attr("content");function s(){return $(".timeago").each(function(){if($(this).children("i").length>0){let e=$(this).clone().children().remove().end().text(),s=$(this).children("i"),r=s.text();$(this).text(function(e,s){let r=new Date,i=new Date(e);if(i.getFullYear()!==r.getFullYear()||i.getMonth()!==r.getMonth())return s;let c=Math.floor((r-i)/1e3),d=Math.floor(c/86400);if(d>=1)return t-=1,` ${d} ${o}`;let u=Math.floor(c/3600);if(u>=1)return` ${u} ${a}`;let f=Math.floor(c/60);return f>=1?` ${f} ${n}`:l}(r,e)),$(this).append(s)}}),0===t&&void 0!==e&&clearInterval(e),t}0!==t&&s()>0&&(e=setInterval(s,6e4))}),$(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 t="fas fa-check",e="timeout",o=2e3;function a(t){if($(t)[0].hasAttribute(e)){let o=$(t).attr(e);if(Number(o)>Date.now())return!0}return!1}function n(t){$(t).attr(e,Date.now()+o)}function l(t){$(t).removeAttr(e)}const s=new ClipboardJS(".code-header>button",{target:t=>t.parentNode.nextElementSibling.querySelector("code .rouge-code")});$(".code-header>button").tooltip({trigger:"click",placement:"left"});const r=$(".code-header>button").children().attr("class");s.on("success",e=>{e.clearSelection();const s=e.trigger;a(s)||(!function(e){$(e).children().attr("class",t),n(e)}(s),function(t){$(t).tooltip("show")}(s),setTimeout(()=>{!function(t){$(t).tooltip("hide"),l(t)}(s),function(t){$(t).children().attr("class",r),l(t)}(s)},o))}),$("#copy-link").click(t=>{let e=$(t.target);if(a(e))return;const s=window.location.href,r=$("<input>");$("body").append(r),r.val(s).select(),document.execCommand("copy"),r.remove();const i=e.attr("data-original-title"),c=e.attr("title-succeed");e.attr("data-original-title",c).tooltip("show"),n(e),setTimeout(()=>{e.attr("data-original-title",i),l(e)},o)})}),$(function(){$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(t){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const e=16,o=decodeURI(this.hash);let a=RegExp(/^#fnref:/).test(o),n=RegExp(/^#fn:/).test(o),l=o.includes(":")?o.replace(/\:/,"\\:"):o,s=$(l);if(s.length){t.preventDefault(),history.pushState&&history.pushState(null,null,o);let l=$(this).offset().top,r=s.offset().top;const i=r<l,c=$("#topbar-wrapper").outerHeight();i&&a&&(r-=c+e/2),$("html,body").animate({scrollTop:r},800,()=>{const t=$(s);t.focus();if($("[scroll-focus=true]").length&&$("[scroll-focus=true]").attr("scroll-focus",!1),$(":target").length&&$(":target").attr("scroll-focus",!1),(n||a)&&t.attr("scroll-focus",!0),t.is(":focus"))return!1;t.attr("tabindex","-1"),t.focus()})}}})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Chirpy v4.2.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v4.2.1 (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: 4.2.0
4
+ version: 4.2.1
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-09-15 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll