jekyll-theme-chirpy 5.5.2 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.6.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)})}}),$("#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()})}}})});
6
+ !function(){"use strict";var t=$(".mode-toggle");function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function n(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,o){return(e=a(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.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 i=$("body"),c="sidebar-display",l=function(){function t(){e(this,t)}return n(t,null,[{key:"toggle",value:function(){!1===t.isExpanded?i.attr(c,""):i.removeAttr(c),t.isExpanded=!t.isExpanded}}]),t}();r(l,"isExpanded",!1);var s="div.post>h1:first-of-type",u=$(s),f=$("#topbar-title"),p=f.text().trim();var d=$("#sidebar-trigger"),h=$("#search-trigger"),g=$("#search-cancel"),v=$("#main"),m=$("#topbar-title"),y=$("#search-wrapper"),b=$("#search-result-wrapper"),w=$("#search-results"),k=$("#search-input"),C=$("#search-hints"),T=$("html,body"),S="loaded",x="unloaded",E="input-focus",I="d-flex",L=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){t.offset=window.scrollY,T.scrollTop(0)}},{key:"off",value:function(){T.scrollTop(t.offset)}}]),t}();r(L,"offset",0),r(L,"resultVisible",!1);var P=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){d.addClass(x),m.addClass(x),h.addClass(x),y.addClass(I),g.addClass(S)}},{key:"off",value:function(){g.removeClass(S),y.removeClass(I),d.removeClass(x),m.removeClass(x),h.removeClass(x)}}]),t}(),_=function(){function t(){e(this,t)}return n(t,null,[{key:"on",value:function(){L.resultVisible||(L.on(),b.removeClass(x),v.addClass(x),L.resultVisible=!0)}},{key:"off",value:function(){L.resultVisible&&(w.empty(),C.hasClass(x)&&C.removeClass(x),b.addClass(x),v.removeClass(x),L.off(),k.val(""),L.resultVisible=!1)}}]),t}();function O(){return g.hasClass(S)}var K="data-topbar-visible",R=$("body"),V=$("#topbar-wrapper"),Y=function(){function t(){e(this,t)}return n(t,null,[{key:"hideTopbar",value:function(){R.attr(K,"false")}},{key:"showTopbar",value:function(){R.attr(K,"true")}},{key:"addScrollUpTask",value:function(){t.scrollUpCount+=1,t.topbarIsLocked||(t.topbarIsLocked=!0)}},{key:"popScrollUpTask",value:function(){t.scrollUpCount-=1}},{key:"hasScrollUpTask",value:function(){return t.scrollUpCount>0}},{key:"topbarLocked",value:function(){return!0===t.topbarIsLocked}},{key:"unlockTopbar",value:function(){t.topbarIsLocked=!1}},{key:"getTopbarHeight",value:function(){return V.outerHeight()}},{key:"orientationLocked",value:function(){return!0===t.orientationIsLocked}},{key:"lockOrientation",value:function(){t.orientationIsLocked=!0}},{key:"unLockOrientation",value:function(){t.orientationIsLocked=!1}}]),t}();r(Y,"scrollUpCount",0),r(Y,"topbarIsLocked",!1),r(Y,"orientationIsLocked",!1);var j,F=$("#search-input"),N=Y.getTopbarHeight(),U=0;function A(){0!==$(window).scrollTop()&&(Y.lockOrientation(),Y.hideTopbar())}function M(){var t=screen.orientation;t?t.onchange=function(){var e=t.type;"landscape-primary"!==e&&"landscape-secondary"!==e||A()}:$(window).on("orientationchange",(function(){$(window).width()<$(window).height()&&A()})),$(window).on("scroll",(function(){j||(j=!0)})),setInterval((function(){j&&(!function(){var t=$(window).scrollTop();if(!(Math.abs(U-t)<=N)){if(t>U)Y.hideTopbar(),F.is(":focus")&&F.trigger("blur");else if(t+$(window).height()<$(document).height()){if(Y.hasScrollUpTask())return;Y.topbarLocked()?Y.unlockTopbar():Y.orientationLocked()?Y.unLockOrientation():Y.showTopbar()}U=t}}(),j=!1)}),250)}$(".collapse");var D=".code-header>button",H="fas fa-check",J="timeout",z="data-title-succeed",q="data-original-title",B=2e3;function G(t){if($(t)[0].hasAttribute(J)){var e=$(t).attr(J);if(Number(e)>Date.now())return!0}return!1}function Q(t){$(t).attr(J,Date.now()+B)}function W(t){$(t).removeAttr(J)}var X=$(D).children().attr("class");var Z=function(){function t(){e(this,t)}return n(t,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(e){return Number(e.attr(t.attrTimestamp))}},{key:"getDateFormat",value:function(e){return e.attr(t.attrDateFormat)}}]),t}();var tt,et,ot=(tt=!1,function(){var t=tt;return tt||(tt=!0),t}),nt=function(){function t(t){return $(t).attr("content")}function e(e){var o=t(e);return void 0!==o&&!1!==o}return{getProxyMeta:function(){return t("meta[name=pv-proxy-endpoint]")},getLocalMeta:function(){return t("meta[name=pv-cache-path]")},hasProxyMeta:function(){return e("meta[name=pv-proxy-endpoint]")},hasLocalMeta:function(){return e("meta[name=pv-cache-path]")}}}(),rt=function(){var t={KEY_PV:"pv",KEY_PV_SRC:"pv_src",KEY_CREATION:"pv_created_date"},e="same-origin",o="cors";function n(t){return localStorage.getItem(t)}function r(t,e){localStorage.setItem(t,e)}function a(e,o){r(t.KEY_PV,e),r(t.KEY_PV_SRC,o),r(t.KEY_CREATION,(new Date).toJSON())}return{keysCount:function(){return Object.keys(t).length},hasCache:function(){return null!==localStorage.getItem(t.KEY_PV)},getCache:function(){return JSON.parse(localStorage.getItem(t.KEY_PV))},saveLocalCache:function(t){a(t,e)},saveProxyCache:function(t){a(t,o)},isExpired:function(){var e=new Date(n(t.KEY_CREATION));return e.setHours(e.getHours()+1),Date.now()>=e.getTime()},isFromLocal:function(){return n(t.KEY_PV_SRC)===e},isFromProxy:function(){return n(t.KEY_PV_SRC)===o},newerThan:function(t){return rt.getCache().totalsForAllResults["ga:pageviews"]>t.totalsForAllResults["ga:pageviews"]},inspectKeys:function(){if(localStorage.length===rt.keysCount())for(var e=0;e<localStorage.length;e++){switch(localStorage.key(e)){case t.KEY_PV:case t.KEY_PV_SRC:case t.KEY_CREATION:break;default:return void localStorage.clear()}}else localStorage.clear()}}}();function at(t,e,o,n){var r=function(t,e){var o=0;if(void 0!==e)for(var n=0;n<e.length;++n)if(e[parseInt(n,10)][0]===t){o+=parseInt(e[parseInt(n,10)][1],10);break}return o}(e,t);if(r=0===r?1:r,n){var a=parseInt(o.text().replace(/,/g,""),10);r>a&&function(t,e,o){if(t<e){var n=new CountUp(o,t,e);n.error?console.error(n.error):n.start()}}(a,r,o.attr("id"))}else o.text((new Intl.NumberFormat).format(r))}function it(t){if(void 0!==t){var e=ot(),o=t.rows;if($("#post-list").length>0)$(".post-preview").each((function(){var t=$(this).find("a").attr("href");at(o,t,$(this).find(".pageviews"),e)}));else if($(".post").length>0){var n=window.location.pathname;at(o,n,$("#pv"),e)}}}function ct(){nt.hasProxyMeta()&&$.ajax({type:"GET",url:nt.getProxyMeta(),dataType:"jsonp",jsonpCallback:"displayPageviews",success:function(t){rt.saveProxyCache(JSON.stringify(t))},error:function(t,e,o){console.log("Failed to load pageviews from proxy server: "+o)}})}function lt(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return fetch(nt.getLocalMeta()).then((function(t){return t.json()})).then((function(e){t&&rt.isFromProxy()&&rt.newerThan(e)||(it(e),rt.saveLocalCache(JSON.stringify(e)))}))}$(window).on("scroll",(function(){$(window).scrollTop()>50&&"none"===$("#sidebar-trigger").css("display")?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){return $("body,html").animate({scrollTop:0},800),!1})),$('[data-toggle="tooltip"]').tooltip(),0!==t.length&&t.off().on("click",(function(t){var e=$(t.target),o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();modeToggle.flipMode(),o.trigger("blur")})),$("#sidebar-trigger").on("click",l.toggle),$("#mask").on("click",l.toggle),function(){if(0!==u.length&&!u.hasClass("dynamic-title")&&!f.is(":hidden")){var t=u.text().trim(),e=!1,o=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(t)&&(t=t.replace(/[0-9]/g,"").trim()),u.offset().top<$(window).scrollTop()&&f.text(t),new IntersectionObserver((function(n){if(e){var r=$(window).scrollTop(),a=o<r;o=r;var i=n[0];a?0===i.intersectionRatio&&f.text(t):1===i.intersectionRatio&&f.text(p)}else e=!0}),{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(s)),f.on("click",(function(){$("body,html").animate({scrollTop:0},800)}))}}(),h.on("click",(function(){P.on(),_.on(),k.trigger("focus")})),g.on("click",(function(){P.off(),_.off()})),k.on("focus",(function(){y.addClass(E)})),k.on("focusout",(function(){y.removeClass(E)})),k.on("input",(function(){""===k.val()?O()?C.removeClass(x):_.off():(_.on(),O()&&C.addClass(x))})),M(),$("#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")}))),dayjs.locale(Z.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(Z.attrTimestamp,"]")).each((function(){var t=dayjs.unix(Z.getTimestamp($(this))),e=t.format(Z.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(Z.attrTimestamp),$(this).removeAttr(Z.attrDateFormat);var o=$(this).attr("data-toggle");if(void 0!==o&&"tooltip"===o){var n=t.format("llll");$(this).attr("data-original-title",n)}})),et=new ClipboardJS(D,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}}),$(D).tooltip({trigger:"hover",placement:"left"}),et.on("success",(function(t){t.clearSelection();var e=t.trigger;G(e)||(function(t){$(t).children().attr("class",H)}(e),function(t){var e=$(t).attr(z);$(t).attr(q,e).tooltip("show")}(e),Q(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(q)}(e),function(t){$(t).children().attr("class",X)}(e),W(e)}),B))})),$("#copy-link").on("click",(function(t){var e=$(t.target);G(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(q),o=e.attr(z);e.attr(q,o).tooltip("show"),Q(e),setTimeout((function(){e.attr(q,t),W(e)}),B)}))})),tocbot.init({tocSelector:"#toc",contentSelector:".post-content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3",orderedList:!1,scrollSmooth:!1}),function(){var t=$("#topbar-title"),e="scroll-focus";$("a[href*='#']:not([href='#']):not([href='#0'])").on("click",(function(o){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var n=decodeURI(this.hash),r=RegExp(/^#fnref:/).test(n),a=!r&&RegExp(/^#fn:/).test(n),i="#"+$.escapeSelector(n.substring(1)),c=$(i),l=t.is(":visible"),s=$(window).width()<$(window).height();if(void 0!==c){o.preventDefault(),history.pushState&&history.pushState(null,null,n);var u=$(window).scrollTop(),f=c.offset().top-=8;f<u?(Y.hideTopbar(),Y.addScrollUpTask(),l&&s&&(f-=Y.getTopbarHeight())):l&&s&&(f-=Y.getTopbarHeight()),$("html").animate({scrollTop:f},500,(function(){c.trigger("focus");var t=$("[".concat(e,"=true]"));t.length&&t.attr(e,"false");var o=$(":target");if(o.length&&o.attr(e,"false"),(a||r)&&c.attr(e,"true"),c.is(":focus"))return!1;c.attr("tabindex","-1"),c.trigger("focus"),Y.hasScrollUpTask()&&Y.popScrollUpTask()}))}}}))}(),$(".pageviews").length<=0||(rt.inspectKeys(),rt.hasCache()?(it(rt.getCache()),rt.isExpired()?nt.hasLocalMeta()?lt(!0).then(ct):ct():rt.isFromLocal()&&ct()):nt.hasLocalMeta()?lt().then(ct):ct())}();
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.5.2
4
+ version: 5.6.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: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -111,6 +111,7 @@ files:
111
111
  - _data/locales/bg-BG.yml
112
112
  - _data/locales/cs-CZ.yml
113
113
  - _data/locales/de-DE.yml
114
+ - _data/locales/el-GR.yml
114
115
  - _data/locales/en.yml
115
116
  - _data/locales/es-ES.yml
116
117
  - _data/locales/fi-FI.yml
@@ -200,11 +201,9 @@ files:
200
201
  - assets/js/data/swcache.js
201
202
  - assets/js/dist/categories.min.js
202
203
  - assets/js/dist/commons.min.js
203
- - assets/js/dist/home.min.js
204
204
  - assets/js/dist/misc.min.js
205
205
  - assets/js/dist/page.min.js
206
206
  - assets/js/dist/post.min.js
207
- - assets/js/dist/pvreport.min.js
208
207
  - assets/js/pwa/app.js
209
208
  - assets/js/pwa/sw.js
210
209
  - assets/js/pwa/unregister.js
@@ -234,9 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
233
  - !ruby/object:Gem::Version
235
234
  version: '0'
236
235
  requirements: []
237
- rubygems_version: 3.4.1
236
+ rubygems_version: 3.4.8
238
237
  signing_key:
239
238
  specification_version: 4
240
- summary: Chirpy is a minimal, sidebar, responsive web design Jekyll theme that focuses
241
- on text presentation.
239
+ summary: A minimal, responsive and feature-rich Jekyll theme for technical writing.
242
240
  test_files: []
@@ -1,6 +0,0 @@
1
- /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
- * © 2019 Cotes Chung
4
- * MIT Licensed
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 a=0,l=!1,r=!1;return{hideTopbar:()=>e.attr(t,!1),showTopbar:()=>e.attr(t,!0),addScrollUpTask:()=>{a+=1,l=l||!0},popScrollUpTask:()=>--a,hasScrollUpTask:()=>0<a,topbarLocked:()=>!0===l,unlockTopbar:()=>l=!1,getTopbarHeight:()=>o,orientationLocked:()=>!0===r,lockOrientation:()=>r=!0,unLockOrientation:()=>r=!1}}(),LocaleHelper=($(function(){const e=$("#sidebar-trigger"),t=$("#search-trigger"),o=$("#search-cancel"),a=$("#main"),l=$("#topbar-title"),r=$("#search-wrapper"),n=$("#search-result-wrapper"),s=$("#search-results"),i=$("#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"),l.addClass("unloaded"),t.addClass("unloaded"),r.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),r.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),t.removeClass("unloaded")}},u=function(){let e=!1;return{on(){e||(d.block(),n.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(s.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),n.addClass("unloaded"),a.removeClass("unloaded"),d.release(),i.val(""),e=!1)},isVisible(){return e}}}();function f(){return o.hasClass("loaded")}t.click(function(){p.on(),u.on(),i.focus()}),o.click(function(){p.off(),u.off()}),i.focus(function(){r.addClass("input-focus")}),i.focusout(function(){r.removeClass("input-focus")}),i.on("input",()=>{""===i.val()?f()?c.removeClass("unloaded"):u.off():(u.on(),f()&&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,a=0;function l(){0!==$(window).scrollTop()&&(ScrollHelper.lockOrientation(),ScrollHelper.hideTopbar())}screen.orientation?screen.orientation.onchange=()=>{var e=screen.orientation.type;"landscape-primary"!==e&&"landscape-secondary"!==e||l()}:$(window).on("orientationchange",()=>{$(window).width()<$(window).height()&&l()}),$(window).scroll(()=>{e=e||!0}),setInterval(()=>{e&&(!function(){var e=$(this).scrollTop();if(!(Math.abs(a-e)<=o)){if(e>a)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()}a=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 s=n.text().trim();let a=t.text().trim(),l=!1,r=0;($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),t.offset().top<$(window).scrollTop()&&n.text(a);new IntersectionObserver(e=>{var t,o;l?(o=$(window).scrollTop(),t=r<o,r=o,o=e[0],t?0===o.intersectionRatio&&n.text(a):1===o.intersectionRatio&&n.text(s)):l=!0},{rootMargin:"-48px 0px 0px 0px",threshold:[0,1]}).observe(document.querySelector(e)),n.click(function(){$("body,html").animate({scrollTop:0},800)})}}),function(){const e=$("html").attr("lang").substr(0,2),t="data-ts",o="data-df";return{locale:()=>e,attrTimestamp:()=>t,attrDateFormat:()=>o,getTimestamp:e=>Number(e.attr(t)),getDateFormat:e=>e.attr(o)}}());$(function(){dayjs.locale(LocaleHelper.locale()),dayjs.extend(window.dayjs_plugin_localizedFormat),$(`[${LocaleHelper.attrTimestamp()}]`).each(function(){var e=dayjs.unix(LocaleHelper.getTimestamp($(this))),t=e.format(LocaleHelper.getDateFormat($(this))),t=($(this).text(t),$(this).removeAttr(LocaleHelper.attrTimestamp()),$(this).removeAttr(LocaleHelper.attrDateFormat()),$(this).attr("data-toggle"));void 0!==t&&"tooltip"===t&&(t=e.format("llll"),$(this).attr("data-original-title",t))})});
@@ -1,6 +0,0 @@
1
- /*!
2
- * Chirpy v5.5.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
- * © 2019 Cotes Chung
4
- * MIT Licensed
5
- */
6
- const getInitStatus=function(){let t=!1;return()=>{var e=t;return t=t||!0,e}}(),PvOpts=function(){function t(e){return $(e).attr("content")}function e(e){e=t(e);return void 0!==e&&!1!==e}return{getProxyMeta(){return t("meta[name=pv-proxy-endpoint]")},getLocalMeta(){return t("meta[name=pv-cache-path]")},hasProxyMeta(){return e("meta[name=pv-proxy-endpoint]")},hasLocalMeta(){return e("meta[name=pv-cache-path]")}}}(),PvStorage=function(){const a={KEY_PV:"pv",KEY_PV_SRC:"pv_src",KEY_CREATION:"pv_created_date"},t={LOCAL:"same-origin",PROXY:"cors"};function r(e){return localStorage.getItem(e)}function o(e,t){localStorage.setItem(e,t)}function n(e,t){o(a.KEY_PV,e),o(a.KEY_PV_SRC,t),o(a.KEY_CREATION,(new Date).toJSON())}return{keysCount(){return Object.keys(a).length},hasCache(){return null!==localStorage.getItem(a.KEY_PV)},getCache(){return JSON.parse(localStorage.getItem(a.KEY_PV))},saveLocalCache(e){n(e,t.LOCAL)},saveProxyCache(e){n(e,t.PROXY)},isExpired(){var e=new Date(r(a.KEY_CREATION));return e.setHours(e.getHours()+1),Date.now()>=e.getTime()},isFromLocal(){return r(a.KEY_PV_SRC)===t.LOCAL},isFromProxy(){return r(a.KEY_PV_SRC)===t.PROXY},newerThan(e){return PvStorage.getCache().totalsForAllResults["ga:pageviews"]>e.totalsForAllResults["ga:pageviews"]},inspectKeys(){if(localStorage.length!==PvStorage.keysCount())localStorage.clear();else for(let e=0;e<localStorage.length;e++)switch(localStorage.key(e)){case a.KEY_PV:case a.KEY_PV_SRC:case a.KEY_CREATION:break;default:return void localStorage.clear()}}}}();function countUp(e,t,a){e<t&&((a=new CountUp(a,e,t)).error?console.error(a.error):a.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){t=0===(t=countPV(t,e))?1:t;r?(e=parseInt(a.text().replace(/,/g,""),10))<t&&countUp(e,t,a.attr("id")):a.text((new Intl.NumberFormat).format(t))}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(){PvOpts.hasProxyMeta()&&$.ajax({type:"GET",url:PvOpts.getProxyMeta(),dataType:"jsonp",jsonpCallback:"displayPageviews",success:e=>{PvStorage.saveProxyCache(JSON.stringify(e))},error:(e,t,a)=>{console.log("Failed to load pageviews from proxy server: "+a)}})}function fetchLocalPageviews(t=!1){return fetch(PvOpts.getLocalMeta()).then(e=>e.json()).then(e=>{t&&PvStorage.isFromProxy()&&PvStorage.newerThan(e)||(displayPageviews(e),PvStorage.saveLocalCache(JSON.stringify(e)))})}$(function(){$(".pageviews").length<=0||(PvStorage.inspectKeys(),PvStorage.hasCache()?(displayPageviews(PvStorage.getCache()),PvStorage.isExpired()?PvOpts.hasLocalMeta()?fetchLocalPageviews(!0).then(fetchProxyPageviews):fetchProxyPageviews():PvStorage.isFromLocal()&&fetchProxyPageviews()):PvOpts.hasLocalMeta()?fetchLocalPageviews().then(fetchProxyPageviews):fetchProxyPageviews())});