jekyll-theme-chirpy 6.2.2 → 6.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  /*!
2
- * Chirpy v6.2.2 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
2
+ * Chirpy v6.2.3 | © 2019 Cotes Chung | MIT Licensed | https://github.com/cotes2020/jekyll-theme-chirpy/
3
3
  */
4
- !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,i(o.key),o)}}function n(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var s=$("body"),c="sidebar-display",u=function(){function e(){t(this,e)}return n(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?s.attr(c,""):s.removeAttr(c),e.isExpanded=!e.isExpanded}}]),e}();o(u,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),m=$("#search-cancel"),p=$("#main-wrapper>.container>.row"),g=$("#topbar-title"),v=$("search"),h=$("#search-result-wrapper"),b=$("#search-results"),y=$("#search-input"),w=$("#search-hints"),C=$("html,body"),k="loaded",S="unloaded",T="input-focus",A="d-flex",j=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){e.offset=window.scrollY,C.scrollTop(0)}},{key:"off",value:function(){C.scrollTop(e.offset)}}]),e}();o(j,"offset",0),o(j,"resultVisible",!1);var x=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){f.addClass(S),g.addClass(S),d.addClass(S),v.addClass(A),m.addClass(k)}},{key:"off",value:function(){m.removeClass(k),v.removeClass(A),f.removeClass(S),g.removeClass(S),d.removeClass(S)}}]),e}(),E=function(){function e(){t(this,e)}return n(e,null,[{key:"on",value:function(){j.resultVisible||(j.on(),h.removeClass(S),p.addClass(S),j.resultVisible=!0)}},{key:"off",value:function(){j.resultVisible&&(b.empty(),w.hasClass(S)&&w.removeClass(S),h.addClass(S),p.removeClass(S),j.off(),y.val(""),j.resultVisible=!1)}}]),e}();function D(){return m.hasClass(k)}$(".collapse");var O=".code-header>button",F="fas fa-check",P="timeout",N="data-title-succeed",V="data-bs-original-title",q=2e3;function I(t){if($(t)[0].hasAttribute(P)){var e=$(t).attr(P);if(Number(e)>Date.now())return!0}return!1}function z(t){$(t).attr(P,Date.now()+q)}function L(t){$(t).removeAttr(P)}var M=$(O).children().attr("class");function U(t){t.parent().removeClass("shimmer")}var _,B,J,Y=function(){function e(){t(this,e)}return n(e,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(t){return Number(t.attr(e.attrTimestamp))}},{key:"getDateFormat",value:function(t){return t.attr(e.attrDateFormat)}}]),e}();_=$(window),B=$("#back-to-top"),_.on("scroll",(function(){_.scrollTop()>50?B.fadeIn():B.fadeOut()})),B.on("click",(function(){_.scrollTop(0)})),r(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),n=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),n.trigger("blur")})),$("#sidebar-trigger").on("click",u.toggle),$("#mask").on("click",u.toggle),d.on("click",(function(){x.on(),E.on(),y.trigger("focus")})),m.on("click",(function(){x.off(),E.off()})),y.on("focus",(function(){v.addClass(T)})),y.on("focusout",(function(){v.removeClass(T)})),y.on("input",(function(){""===y.val()?D()?w.removeClass(S):E.off():(E.on(),D()&&w.addClass(S))})),(J=$("main img[data-src]")).length<=0||(document.addEventListener("lazyloaded",(function(t){U($(t.target))})),J.each((function(){$(this).hasClass("ls-is-cached")&&U($(this))}))),$(".popup")<=0||$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),dayjs.locale(Y.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(Y.attrTimestamp,"]")).each((function(){var t=dayjs.unix(Y.getTimestamp($(this))),e=t.format(Y.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(Y.attrTimestamp),$(this).removeAttr(Y.attrDateFormat);var n=$(this).attr("data-bs-toggle");if(void 0!==n&&"tooltip"===n){var o=t.format("llll");$(this).attr("data-bs-title",o),new bootstrap.Tooltip($(this))}})),function(){if($(O).length){var t=new ClipboardJS(O,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});r(document.querySelectorAll(O)).map((function(t){return new bootstrap.Tooltip(t,{placement:"left"})})),t.on("success",(function(t){t.clearSelection();var e=t.trigger;I(e)||(!function(t){$(t).children().attr("class",F)}(e),function(t){var e=$(t).attr(N);$(t).attr(V,e).tooltip("show")}(e),z(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(V)}(e),function(t){$(t).children().attr("class",M)}(e),L(e)}),q))}))}var e=$("#copy-link");e.on("click",(function(t){var e=$(t.target);I(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(V),n=e.attr(N);e.attr(V,n).tooltip("show"),z(e),setTimeout((function(){e.attr(V,t),L(e)}),q)}))})),e.on("mouseleave",(function(t){$(t.target).tooltip("hide"),console.log("mouse leave...")}))}(),document.querySelector("main h2")&&tocbot.init({tocSelector:"#toc",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1})}();
4
+ !function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l=$(".mode-toggle");var c=$("body"),s="sidebar-display",u=function(){function e(){t(this,e)}return r(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?c.attr(s,""):c.removeAttr(s),e.isExpanded=!e.isExpanded}}]),e}();n(u,"isExpanded",!1);var f=$("#sidebar-trigger"),d=$("#search-trigger"),m=$("#search-cancel"),p=$("#main-wrapper>.container>.row"),g=$("#topbar-title"),h=$("search"),v=$("#search-result-wrapper"),b=$("#search-results"),y=$("#search-input"),w=$("#search-hints"),C=$("html,body"),k="loaded",S="unloaded",T="input-focus",A="d-flex",j=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){e.offset=window.scrollY,C.scrollTop(0)}},{key:"off",value:function(){C.scrollTop(e.offset)}}]),e}();n(j,"offset",0),n(j,"resultVisible",!1);var E=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){f.addClass(S),g.addClass(S),d.addClass(S),h.addClass(A),m.addClass(k)}},{key:"off",value:function(){m.removeClass(k),h.removeClass(A),f.removeClass(S),g.removeClass(S),d.removeClass(S)}}]),e}(),x=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){j.resultVisible||(j.on(),v.removeClass(S),p.addClass(S),j.resultVisible=!0)}},{key:"off",value:function(){j.resultVisible&&(b.empty(),w.hasClass(S)&&w.removeClass(S),v.addClass(S),p.removeClass(S),j.off(),y.val(""),j.resultVisible=!1)}}]),e}();function I(){return m.hasClass(k)}$(".collapse");var M=".code-header>button",D="fas fa-check",O="timeout",F="data-title-succeed",P="data-bs-original-title",R=2e3;function q(t){if($(t)[0].hasAttribute(O)){var e=$(t).attr(O);if(Number(e)>Date.now())return!0}return!1}function N(t){$(t).attr(O,Date.now()+R)}function U(t){$(t).removeAttr(O)}var V=$(M).children().attr("class");var z="data-src",B="data-lqip",H={SHIMMER:"shimmer",BLUR:"blur"};function L(t){$(this).parent().removeClass(t)}function _(){this.complete&&(this.hasAttribute(B)?L.call(this,H.BLUR):L.call(this,H.SHIMMER))}function J(){var t=$(this),e=t.attr(z);t.attr("src",encodeURI(e)),t.removeAttr(z)}var Y,G,K=function(){function e(){t(this,e)}return r(e,null,[{key:"attrTimestamp",get:function(){return"data-ts"}},{key:"attrDateFormat",get:function(){return"data-df"}},{key:"locale",get:function(){return $("html").attr("lang").substring(0,2)}},{key:"getTimestamp",value:function(t){return Number(t.attr(e.attrTimestamp))}},{key:"getDateFormat",value:function(t){return t.attr(e.attrDateFormat)}}]),e}();0!==l.length&&l.off().on("click",(function(t){var e=$(t.target),r=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),r.trigger("blur")})),$("#sidebar-trigger").on("click",u.toggle),$("#mask").on("click",u.toggle),d.on("click",(function(){E.on(),x.on(),y.trigger("focus")})),m.on("click",(function(){E.off(),x.off()})),y.on("focus",(function(){h.addClass(T)})),y.on("focusout",(function(){h.removeClass(T)})),y.on("input",(function(){""===y.val()?I()?w.removeClass(S):x.off():(x.on(),I()&&w.addClass(S))})),function(){var t=$("article img");t.length&&t.on("load",_),$('article img[loading="lazy"]').each((function(){this.complete&&L.call(this,H.SHIMMER)}));var e=$("article img[".concat(B,'="true"]'));e.length&&e.each(J)}(),$(".popup")<=0||$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),dayjs.locale(K.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(K.attrTimestamp,"]")).each((function(){var t=dayjs.unix(K.getTimestamp($(this))),e=t.format(K.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(K.attrTimestamp),$(this).removeAttr(K.attrDateFormat);var r=$(this).attr("data-bs-toggle");if(void 0!==r&&"tooltip"===r){var n=t.format("llll");$(this).attr("data-bs-title",n),new bootstrap.Tooltip($(this))}})),function(){if($(M).length){var t=new ClipboardJS(M,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});o(document.querySelectorAll(M)).map((function(t){return new bootstrap.Tooltip(t,{placement:"left"})})),t.on("success",(function(t){t.clearSelection();var e=t.trigger;q(e)||(!function(t){$(t).children().attr("class",D)}(e),function(t){var e=$(t).attr(F);$(t).attr(P,e).tooltip("show")}(e),N(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(P)}(e),function(t){$(t).children().attr("class",V)}(e),U(e)}),R))}))}var e=$("#copy-link");e.on("click",(function(t){var e=$(t.target);q(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(P),r=e.attr(F);e.attr(P,r).tooltip("show"),N(e),setTimeout((function(){e.attr(P,t),U(e)}),R)}))})),e.on("mouseleave",(function(t){$(t.target).tooltip("hide")}))}(),document.querySelector("main h2")&&tocbot.init({tocSelector:"#toc",contentSelector:".content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3, h4",orderedList:!1,scrollSmooth:!1}),Y=$(window),G=$("#back-to-top"),Y.on("scroll",(function(){Y.scrollTop()>50?G.fadeIn():G.fadeOut()})),G.on("click",(function(){Y.scrollTop(0)})),o(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)}))}();
data/assets/js/pwa/sw.js CHANGED
@@ -6,7 +6,7 @@ permalink: '/sw.js'
6
6
 
7
7
  self.importScripts('{{ "/assets/js/data/swcache.js" | relative_url }}');
8
8
 
9
- const cacheName = 'chirpy-{{ "now" | date: "%Y%m%d.%H%M%S" }}';
9
+ const cacheName = 'chirpy-{{ "now" | date: "%s" }}';
10
10
 
11
11
  function verifyDomain(url) {
12
12
  for (const domain of allowedDomains) {
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: 6.2.2
4
+ version: 6.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cotes Chung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-10 00:00:00.000000000 Z
11
+ date: 2023-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
254
  requirements: []
255
- rubygems_version: 3.4.12
255
+ rubygems_version: 3.4.20
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: A minimal, responsive and feature-rich Jekyll theme for technical writing.