jekyll-theme-chirpy 5.6.1 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/_data/locales/ar.yml +5 -7
  3. data/_data/locales/bg-BG.yml +1 -3
  4. data/_data/locales/cs-CZ.yml +5 -7
  5. data/_data/locales/de-DE.yml +1 -3
  6. data/_data/locales/el-GR.yml +6 -8
  7. data/_data/locales/en.yml +5 -7
  8. data/_data/locales/es-ES.yml +2 -4
  9. data/_data/locales/fi-FI.yml +5 -7
  10. data/_data/locales/fr-FR.yml +0 -2
  11. data/_data/locales/hu-HU.yml +4 -6
  12. data/_data/locales/id-ID.yml +1 -3
  13. data/_data/locales/it-IT.yml +5 -8
  14. data/_data/locales/ko-KR.yml +3 -5
  15. data/_data/locales/my-MM.yml +1 -3
  16. data/_data/locales/pt-BR.yml +1 -3
  17. data/_data/locales/ru-RU.yml +1 -3
  18. data/_data/locales/sl-SI.yml +91 -0
  19. data/_data/locales/sv-SE.yml +91 -0
  20. data/_data/locales/tr-TR.yml +1 -3
  21. data/_data/locales/uk-UA.yml +1 -3
  22. data/_data/locales/vi-VN.yml +2 -3
  23. data/_data/locales/zh-CN.yml +3 -5
  24. data/_data/locales/zh-TW.yml +83 -0
  25. data/_data/{assets/cross_origin.yml → origin/cors.yml} +12 -12
  26. data/_includes/comments/giscus.html +39 -31
  27. data/_includes/datetime.html +10 -6
  28. data/_includes/footer.html +24 -26
  29. data/_includes/head.html +9 -9
  30. data/_includes/js-selector.html +44 -27
  31. data/_includes/jsdelivr-combine.html +0 -6
  32. data/_includes/lang.html +8 -0
  33. data/_includes/mermaid.html +28 -29
  34. data/_includes/metadata-hook.html +1 -0
  35. data/_includes/mode-toggle.html +44 -21
  36. data/_includes/{assets-origin.html → origin-type.html} +5 -4
  37. data/_includes/post-nav.html +27 -20
  38. data/_includes/post-paginator.html +13 -12
  39. data/_includes/post-sharing.html +21 -13
  40. data/_includes/read-time.html +17 -10
  41. data/_includes/refactor-content.html +31 -27
  42. data/_includes/related-posts.html +35 -34
  43. data/_includes/search-loader.html +23 -24
  44. data/_includes/search-results.html +3 -4
  45. data/_includes/sidebar.html +50 -52
  46. data/_includes/toc.html +2 -5
  47. data/_includes/topbar.html +47 -47
  48. data/_includes/trending-tags.html +13 -17
  49. data/_includes/update-list.html +13 -14
  50. data/_layouts/archives.html +5 -3
  51. data/_layouts/categories.html +97 -77
  52. data/_layouts/category.html +10 -8
  53. data/_layouts/default.html +34 -29
  54. data/_layouts/home.html +35 -18
  55. data/_layouts/page.html +38 -33
  56. data/_layouts/post.html +17 -15
  57. data/_layouts/tag.html +10 -8
  58. data/_layouts/tags.html +4 -5
  59. data/_sass/addon/commons.scss +260 -439
  60. data/_sass/addon/module.scss +18 -8
  61. data/_sass/addon/syntax.scss +42 -41
  62. data/_sass/addon/variables.scss +8 -11
  63. data/_sass/colors/dark-syntax.scss +1 -0
  64. data/_sass/colors/dark-typography.scss +16 -24
  65. data/_sass/colors/light-syntax.scss +3 -3
  66. data/_sass/colors/light-typography.scss +16 -15
  67. data/_sass/jekyll-theme-chirpy.scss +14 -19
  68. data/_sass/layout/categories.scss +20 -4
  69. data/_sass/layout/home.scss +111 -94
  70. data/_sass/layout/post.scss +35 -32
  71. data/assets/404.html +3 -1
  72. data/assets/css/style.scss +1 -7
  73. data/assets/feed.xml +1 -1
  74. data/assets/js/dist/categories.min.js +2 -2
  75. data/assets/js/dist/commons.min.js +2 -2
  76. data/assets/js/dist/home.min.js +6 -0
  77. data/assets/js/dist/misc.min.js +2 -2
  78. data/assets/js/dist/page.min.js +2 -2
  79. data/assets/js/dist/post.min.js +2 -2
  80. metadata +11 -5
  81. /data/_data/{assets/self_host.yml → origin/basic.yml} +0 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v5.6.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v6.0.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
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 F,N=$("#search-input"),U=Y.getTopbarHeight(),j=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(){F||(F=!0)})),setInterval((function(){F&&(!function(){var t=$(window).scrollTop();if(!(Math.abs(j-t)<=U)){if(t>j)Y.hideTopbar(),N.is(":focus")&&N.trigger("blur");else if(t+$(window).height()<$(document).height()){if(Y.hasScrollUpTask())return;Y.topbarLocked()?Y.unlockTopbar():Y.orientationLocked()?Y.unLockOrientation():Y.showTopbar()}j=t}}(),F=!1)}),250)}$(".collapse");var D=".code-header>button",H="fas fa-check",J="timeout",q="data-title-succeed",z="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",success:function(t){it(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(q);$(t).attr(z,e).tooltip("show")}(e),Q(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(z)}(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(z),o=e.attr(q);e.attr(z,o).tooltip("show"),Q(e),setTimeout((function(){e.attr(z,t),W(e)}),B)}))})),document.querySelector("#core-wrapper h2,#core-wrapper h3")&&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())}();
6
+ !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 c=$(".mode-toggle");var l=$("body"),u="sidebar-display",s=function(){function e(){t(this,e)}return r(e,null,[{key:"toggle",value:function(){!1===e.isExpanded?l.attr(u,""):l.removeAttr(u),e.isExpanded=!e.isExpanded}}]),e}();n(s,"isExpanded",!1);var f=$("#sidebar-trigger"),p=$("#search-trigger"),d=$("#search-cancel"),m=$("#main>.row"),g=$("#topbar-title"),v=$("#search-wrapper"),h=$("#search-result-wrapper"),y=$("#search-results"),b=$("#search-input"),w=$("#search-hints"),C=$("html,body"),S="loaded",k="unloaded",E="input-focus",T="d-flex",x=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(x,"offset",0),n(x,"resultVisible",!1);var P=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){f.addClass(k),g.addClass(k),p.addClass(k),v.addClass(T),d.addClass(S)}},{key:"off",value:function(){d.removeClass(S),v.removeClass(T),f.removeClass(k),g.removeClass(k),p.removeClass(k)}}]),e}(),_=function(){function e(){t(this,e)}return r(e,null,[{key:"on",value:function(){x.resultVisible||(x.on(),h.removeClass(k),m.addClass(k),x.resultVisible=!0)}},{key:"off",value:function(){x.resultVisible&&(y.empty(),w.hasClass(k)&&w.removeClass(k),h.addClass(k),m.removeClass(k),x.off(),b.val(""),x.resultVisible=!1)}}]),e}();function A(){return d.hasClass(S)}$(".collapse");var I=".code-header>button",j="fas fa-check",K="timeout",O="data-title-succeed",V="data-bs-original-title",Y=2e3;function F(t){if($(t)[0].hasAttribute(K)){var e=$(t).attr(K);if(Number(e)>Date.now())return!0}return!1}function N(t){$(t).attr(K,Date.now()+Y)}function L(t){$(t).removeAttr(K)}var M=$(I).children().attr("class");var R=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}();var D,J=(D=!1,function(){var t=D;return D||(D=!0),t}),q=function(){function t(t){return $(t).attr("content")}function e(e){var r=t(e);return void 0!==r&&!1!==r}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]")}}}(),z=function(){var t={KEY_PV:"pv",KEY_PV_SRC:"pv_src",KEY_CREATION:"pv_created_date"},e="same-origin",r="cors";function n(t){return localStorage.getItem(t)}function o(t,e){localStorage.setItem(t,e)}function a(e,r){o(t.KEY_PV,e),o(t.KEY_PV_SRC,r),o(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,r)},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)===r},newerThan:function(t){return z.getCache().totalsForAllResults["ga:pageviews"]>t.totalsForAllResults["ga:pageviews"]},inspectKeys:function(){if(localStorage.length===z.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 U(t,e,r,n){var o=function(t,e){var r=0;if(void 0!==e)for(var n=0;n<e.length;++n)if(e[parseInt(n,10)][0]===t){r+=parseInt(e[parseInt(n,10)][1],10);break}return r}(e,t);if(o=0===o?1:o,n){var a=parseInt(r.text().replace(/,/g,""),10);o>a&&function(t,e,r){if(t<e){var n=new CountUp(r,t,e);n.error?console.error(n.error):n.start()}}(a,o,r.attr("id"))}else r.text((new Intl.NumberFormat).format(o))}function H(t){if(void 0!==t){var e=J(),r=t.rows;if($(".post").length>0)U(r,window.location.pathname,$("#pv"),e)}}function B(){q.hasProxyMeta()&&$.ajax({type:"GET",url:q.getProxyMeta(),dataType:"jsonp",success:function(t){H(t),z.saveProxyCache(JSON.stringify(t))},error:function(t,e,r){console.log("Failed to load pageviews from proxy server: "+r)}})}function G(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return fetch(q.getLocalMeta()).then((function(t){return t.json()})).then((function(e){t&&z.isFromProxy()&&z.newerThan(e)||(H(e),z.saveLocalCache(JSON.stringify(e)))}))}$(window).on("scroll",(function(){$(window).scrollTop()>50?$("#back-to-top").fadeIn():$("#back-to-top").fadeOut()})),$("#back-to-top").on("click",(function(){window.scrollTo(0,0)})),o(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),0!==c.length&&c.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",s.toggle),$("#mask").on("click",s.toggle),p.on("click",(function(){P.on(),_.on(),b.trigger("focus")})),d.on("click",(function(){P.off(),_.off()})),b.on("focus",(function(){v.addClass(E)})),b.on("focusout",(function(){v.removeClass(E)})),b.on("input",(function(){""===b.val()?A()?w.removeClass(k):_.off():(_.on(),A()&&w.addClass(k))})),$("#core-wrapper img[data-src]")<=0||document.addEventListener("lazyloaded",(function(t){$(t.target).parent().removeClass("shimmer")})),$(".popup")<=0||$(".popup").magnificPopup({type:"image",closeOnContentClick:!0,showCloseBtn:!1,zoom:{enabled:!0,duration:300,easing:"ease-in-out"}}),dayjs.locale(R.locale),dayjs.extend(window.dayjs_plugin_localizedFormat),$("[".concat(R.attrTimestamp,"]")).each((function(){var t=dayjs.unix(R.getTimestamp($(this))),e=t.format(R.getDateFormat($(this)));$(this).text(e),$(this).removeAttr(R.attrTimestamp),$(this).removeAttr(R.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($(I).length){var t=new ClipboardJS(I,{target:function(t){return t.parentNode.nextElementSibling.querySelector("code .rouge-code")}});o(document.querySelectorAll(I)).map((function(t){return new bootstrap.Tooltip(t,{placement:"left"})})),t.on("success",(function(t){t.clearSelection();var e=t.trigger;F(e)||(!function(t){$(t).children().attr("class",j)}(e),function(t){var e=$(t).attr(O);$(t).attr(V,e).tooltip("show")}(e),N(e),setTimeout((function(){!function(t){$(t).tooltip("hide").removeAttr(V)}(e),function(t){$(t).children().attr("class",M)}(e),L(e)}),Y))}))}$("#copy-link").on("click",(function(t){var e=$(t.target);F(e)||navigator.clipboard.writeText(window.location.href).then((function(){var t=e.attr(V),r=e.attr(O);e.attr(V,r).tooltip("show"),N(e),setTimeout((function(){e.attr(V,t),L(e)}),Y)}))}))}(),document.querySelector("#core-wrapper h2,#core-wrapper h3")&&tocbot.init({tocSelector:"#toc",contentSelector:".post-content",ignoreSelector:"[data-toc-skip]",headingSelector:"h2, h3",orderedList:!1,scrollSmooth:!1}),$(".pageviews").length<=0||(z.inspectKeys(),z.hasCache()?(H(z.getCache()),z.isExpired()?q.hasLocalMeta()?G(!0).then(B):B():z.isFromLocal()&&B()):q.hasLocalMeta()?G().then(B):B())}();
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.6.1
4
+ version: 6.0.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: 2023-03-30 00:00:00.000000000 Z
11
+ date: 2023-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -103,8 +103,6 @@ extra_rdoc_files: []
103
103
  files:
104
104
  - LICENSE
105
105
  - README.md
106
- - _data/assets/cross_origin.yml
107
- - _data/assets/self_host.yml
108
106
  - _data/authors.yml
109
107
  - _data/contact.yml
110
108
  - _data/locales/ar.yml
@@ -123,12 +121,16 @@ files:
123
121
  - _data/locales/my-MM.yml
124
122
  - _data/locales/pt-BR.yml
125
123
  - _data/locales/ru-RU.yml
124
+ - _data/locales/sl-SI.yml
125
+ - _data/locales/sv-SE.yml
126
126
  - _data/locales/tr-TR.yml
127
127
  - _data/locales/uk-UA.yml
128
128
  - _data/locales/vi-VN.yml
129
129
  - _data/locales/zh-CN.yml
130
+ - _data/locales/zh-TW.yml
131
+ - _data/origin/basic.yml
132
+ - _data/origin/cors.yml
130
133
  - _data/share.yml
131
- - _includes/assets-origin.html
132
134
  - _includes/comments.html
133
135
  - _includes/comments/disqus.html
134
136
  - _includes/comments/giscus.html
@@ -142,10 +144,13 @@ files:
142
144
  - _includes/head.html
143
145
  - _includes/js-selector.html
144
146
  - _includes/jsdelivr-combine.html
147
+ - _includes/lang.html
145
148
  - _includes/language-alias.html
146
149
  - _includes/mermaid.html
150
+ - _includes/metadata-hook.html
147
151
  - _includes/mode-toggle.html
148
152
  - _includes/no-linenos.html
153
+ - _includes/origin-type.html
149
154
  - _includes/post-nav.html
150
155
  - _includes/post-paginator.html
151
156
  - _includes/post-sharing.html
@@ -201,6 +206,7 @@ files:
201
206
  - assets/js/data/swcache.js
202
207
  - assets/js/dist/categories.min.js
203
208
  - assets/js/dist/commons.min.js
209
+ - assets/js/dist/home.min.js
204
210
  - assets/js/dist/misc.min.js
205
211
  - assets/js/dist/page.min.js
206
212
  - assets/js/dist/post.min.js
File without changes