jekyll-theme-chirpy 4.3.4 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/_config.yml +9 -5
  4. data/_data/locales/en.yml +2 -1
  5. data/_data/locales/id-ID.yml +2 -1
  6. data/_data/locales/ko-KR.yml +91 -0
  7. data/_data/locales/zh-CN.yml +2 -1
  8. data/_includes/{disqus.html → comments/disqus.html} +4 -4
  9. data/_includes/comments/utterances.html +51 -0
  10. data/_includes/comments.html +5 -0
  11. data/_includes/footer.html +1 -1
  12. data/_includes/js-selector.html +1 -1
  13. data/_includes/mermaid.html +28 -0
  14. data/_includes/mode-toggle.html +48 -65
  15. data/_includes/read-time.html +3 -3
  16. data/_includes/refactor-content.html +109 -35
  17. data/_includes/related-posts.html +1 -1
  18. data/_includes/search-results.html +0 -8
  19. data/_includes/sidebar.html +10 -11
  20. data/_includes/timeago.html +11 -12
  21. data/_includes/toc.html +16 -0
  22. data/_includes/topbar.html +1 -1
  23. data/_includes/trending-tags.html +14 -0
  24. data/_includes/update-list.html +16 -0
  25. data/_layouts/default.html +6 -2
  26. data/_layouts/home.html +12 -9
  27. data/_layouts/page.html +45 -22
  28. data/_layouts/post.html +128 -127
  29. data/_sass/addon/commons.scss +154 -175
  30. data/_sass/addon/module.scss +48 -28
  31. data/_sass/addon/syntax.scss +55 -44
  32. data/_sass/addon/variables.scss +1 -1
  33. data/_sass/colors/dark-syntax.scss +3 -4
  34. data/_sass/colors/dark-typography.scss +11 -8
  35. data/_sass/colors/light-syntax.scss +3 -3
  36. data/_sass/colors/light-typography.scss +4 -5
  37. data/_sass/jekyll-theme-chirpy.scss +1 -1
  38. data/_sass/layout/home.scss +6 -2
  39. data/_sass/layout/post.scss +52 -46
  40. data/assets/js/dist/categories.min.js +2 -2
  41. data/assets/js/dist/commons.min.js +2 -2
  42. data/assets/js/dist/home.min.js +2 -2
  43. data/assets/js/dist/page.min.js +2 -2
  44. data/assets/js/dist/post.min.js +2 -2
  45. data/assets/js/dist/pvreport.min.js +2 -2
  46. metadata +7 -4
  47. data/_includes/panel.html +0 -59
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.0 (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"),s=$("#main"),n=$("#topbar-title"),l=$("#search-wrapper"),i=$("#search-result-wrapper"),r=$("#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}}(),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&&(r.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),i.addClass("unloaded"),a.removeClass("visible"),s.removeClass("unloaded"),u.release(),c.val(""),t=!1)},isVisible:()=>t}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),f.on(),c.focus()}),o.click(function(){p.off(),f.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()?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 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:"hover",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)}(l),function(t){const e=$(t).attr("title-succeed");$(t).attr("data-original-title",e).tooltip("show")}(l),s(l),setTimeout(()=>{!function(t){$(t).tooltip("hide").removeAttr("data-original-title")}(l),function(t){$(t).children().attr("class",i)}(l),n(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 r=e.attr("data-original-title"),c=e.attr("title-succeed");e.attr("data-original-title",c).tooltip("show"),s(e),setTimeout(()=>{e.attr("data-original-title",r),n(e)},o)})});
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=>{const e=$(t.target);let o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();o.blur(),flipMode()})}),$(function(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),l=$("#main"),s=$("#topbar-title"),n=$("#search-wrapper"),i=$("#search-result-wrapper"),r=$("#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(){return t}}}(),p={on(){t.addClass("unloaded"),s.addClass("unloaded"),e.addClass("unloaded"),n.addClass("d-flex"),o.addClass("loaded")},off(){o.removeClass("loaded"),n.removeClass("d-flex"),t.removeClass("unloaded"),s.removeClass("unloaded"),e.removeClass("unloaded")}},f=function(){let t=!1;return{on(){t||(u.block(),i.removeClass("unloaded"),l.addClass("unloaded"),t=!0)},off(){t&&(r.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),i.addClass("unloaded"),a.removeClass("visible"),l.removeClass("unloaded"),u.release(),c.val(""),t=!1)},isVisible(){return t}}}();function h(){return o.hasClass("loaded")}e.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(t){8===t.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(){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 o=$("#topbar-wrapper"),a=$("#panel-wrapper"),l=$("#search-input"),s="topbar-up",n="topbar-down",i="toc-scrolling-up";let e,r=0;const c=o.outerHeight(),d=o.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(e=!0)}),setInterval(function(){e&&(function(){var t,e=$(this).scrollTop();Math.abs(r-e)<=c||(e>r?e>d&&(o.removeClass(n).addClass(s),a.removeClass(n),l.is(":focus")&&l.blur()):e+$(window).height()<$(document).height()&&(void 0!==(t=o.attr(i))?"false"===t&&o.removeAttr(i):(o.removeClass(s).addClass(n),a.addClass(n))),r=e)}(),e=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=(0<e.length?e:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?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(){var t="#main > div.row:first-child > div:first-child";if(!($(t+" img").length<=0)){var e=document.querySelectorAll(t+" img[data-src]");const o=lozad(e);o.observe(),$(t+` p > img[data-src],${t} img[data-src].preview-img`).each(function(){let t=$(this).next();var 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(){var t=".code-header>button";const e="timeout";function l(t){if($(t)[0].hasAttribute(e)){t=$(t).attr(e);if(Number(t)>Date.now())return 1}}function s(t){$(t).attr(e,Date.now()+2e3)}function n(t){$(t).removeAttr(e)}const o=new ClipboardJS(t,{target(t){let e=t.parentNode.nextElementSibling;return e.querySelector("code .rouge-code")}});$(t).tooltip({trigger:"hover",placement:"left"});const a=function(t){let e=$(t).children();return e.attr("class")}(t);o.on("success",t=>{t.clearSelection();const e=t.trigger;var o;l(e)||(function(t){let e=$(t),o=e.children();o.attr("class","fas fa-check")}(e),o=e,t=$(o).attr("title-succeed"),$(o).attr("data-original-title",t).tooltip("show"),s(e),setTimeout(()=>{var t;t=e,$(t).tooltip("hide").removeAttr("data-original-title"),function(t){let e=$(t),o=e.children();o.attr("class",a)}(e),n(e)},2e3))}),$("#copy-link").click(t=>{let e=$(t.target);if(!l(e)){t=window.location.href;const o=$("<input>");$("body").append(o),o.val(t).select(),document.execCommand("copy"),o.remove();const a=e.attr("data-original-title");t=e.attr("title-succeed");e.attr("data-original-title",t).tooltip("show"),s(e),setTimeout(()=>{e.attr("data-original-title",a),n(e)},2e3)}})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.0 (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"),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 $=Math.floor(c/60);return $>=1?` ${$} ${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:"hover",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)}(s),function(t){const e=$(t).attr("title-succeed");$(t).attr("data-original-title",e).tooltip("show")}(s),n(s),setTimeout(()=>{!function(t){$(t).tooltip("hide").removeAttr("data-original-title")}(s),function(t){$(t).children().attr("class",r)}(s),l(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=!a&&RegExp(/^#fn:/).test(o),l=o.includes(":")?o.replace(/\:/g,"\\:"):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()})}}})});
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=>{const e=$(t.target);let o=e.prop("tagName")==="button".toUpperCase()?e:e.parent();o.blur(),flipMode()})}),$(function(){const t=$("#sidebar-trigger"),e=$("#search-trigger"),o=$("#search-cancel"),a=$("#search-cleaner"),n=$("#main"),r=$("#topbar-title"),l=$("#search-wrapper"),s=$("#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(){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")}},f=function(){let t=!1;return{on(){t||(u.block(),s.removeClass("unloaded"),n.addClass("unloaded"),t=!0)},off(){t&&(i.empty(),d.hasClass("unloaded")&&d.removeClass("unloaded"),s.addClass("unloaded"),a.removeClass("visible"),n.removeClass("unloaded"),u.release(),c.val(""),t=!1)},isVisible(){return t}}}();function h(){return o.hasClass("loaded")}e.click(function(){p.on(),f.on(),c.focus()}),o.click(function(){p.off(),f.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()?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"),i.empty()):f.off(),c.focus(),a.removeClass("visible")})}),$(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 o=$("#topbar-wrapper"),a=$("#panel-wrapper"),n=$("#search-input"),r="topbar-up",l="topbar-down",s="toc-scrolling-up";let e,i=0;const c=o.outerHeight(),d=o.outerHeight();$(window).scroll(function(t){$("#topbar-title").is(":hidden")&&(e=!0)}),setInterval(function(){e&&(function(){var t,e=$(this).scrollTop();Math.abs(i-e)<=c||(e>i?e>d&&(o.removeClass(l).addClass(r),a.removeClass(l),n.is(":focus")&&n.blur()):e+$(window).height()<$(document).height()&&(void 0!==(t=o.attr(s))?"false"===t&&o.removeAttr(s):(o.removeClass(r).addClass(l),a.addClass(l))),i=e)}(),e=!1)},250)}),$(function(){const t=$("#topbar-title"),e=$("div.post>h1"),o=t.text().trim();let a=(0<e.length?e:$("h1")).text().trim();($("#page-category").length||$("#page-tag").length)&&/\s/.test(a)&&(a=a.replace(/[0-9]/g,"").trim()),$(window).scroll(function(){return!($("#post-list").length||e.is(":hidden")||t.is(":hidden")||$("#sidebar.sidebar-expand").length)&&void(95<=$(this).scrollTop()?t.text()!==a&&t.text(a):t.text()!==o&&t.text(o))}),t.click(function(){$("body,html").animate({scrollTop:0},800)})}),$(function(){var t="#main > div.row:first-child > div:first-child";if(!($(t+" img").length<=0)){var e=document.querySelectorAll(t+" img[data-src]");const o=lozad(e);o.observe(),$(t+` p > img[data-src],${t} img[data-src].preview-img`).each(function(){let t=$(this).next();var 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 o=$(".timeago").length,t=void 0;const n=$("meta[name=day-prompt]").attr("content"),r=$("meta[name=hour-prompt]").attr("content"),l=$("meta[name=minute-prompt]").attr("content"),s=$("meta[name=justnow-prompt]").attr("content");function e(){return $(".timeago").each(function(){var t,e;!1!==$(this)[0].hasAttribute("date")?(e=function(t,e){let o=new Date,a=new Date(t);return a.getFullYear()!==o.getFullYear()||a.getMonth()!==o.getMonth()?e:(t=Math.floor((o-a)/1e3),1<=(e=Math.floor(t/86400))?` ${e} `+n:1<=(e=Math.floor(t/3600))?` ${e} `+r:1<=(t=Math.floor(t/60))?` ${t} `+l:s)}($(this).attr("date"),t=$(this).text()))===t?$(this).removeAttr("date"):$(this).text(e):--o}),0===o&&void 0!==t&&clearInterval(t),o}0!==o&&0<e()&&(t=setInterval(e,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(){var t=".code-header>button";const e="timeout";function n(t){if($(t)[0].hasAttribute(e)){t=$(t).attr(e);if(Number(t)>Date.now())return 1}}function r(t){$(t).attr(e,Date.now()+2e3)}function l(t){$(t).removeAttr(e)}const o=new ClipboardJS(t,{target(t){let e=t.parentNode.nextElementSibling;return e.querySelector("code .rouge-code")}});$(t).tooltip({trigger:"hover",placement:"left"});const a=function(t){let e=$(t).children();return e.attr("class")}(t);o.on("success",t=>{t.clearSelection();const e=t.trigger;var o;n(e)||(function(t){let e=$(t),o=e.children();o.attr("class","fas fa-check")}(e),o=e,t=$(o).attr("title-succeed"),$(o).attr("data-original-title",t).tooltip("show"),r(e),setTimeout(()=>{var t;t=e,$(t).tooltip("hide").removeAttr("data-original-title"),function(t){let e=$(t),o=e.children();o.attr("class",a)}(e),l(e)},2e3))}),$("#copy-link").click(t=>{let e=$(t.target);if(!n(e)){t=window.location.href;const o=$("<input>");$("body").append(o),o.val(t).select(),document.execCommand("copy"),o.remove();const a=e.attr("data-original-title");t=e.attr("title-succeed");e.attr("data-original-title",t).tooltip("show"),r(e),setTimeout(()=>{e.attr("data-original-title",a),l(e)},2e3)}})}),$(function(){const i=$("#topbar-wrapper"),c=i.outerHeight(),t=$("#topbar-title"),d="toc-scrolling-up",u="scroll-focus";let p=0;$("a[href*='#']").not("[href='#']").not("[href='#0']").click(function(n){if(this.pathname.replace(/^\//,"")===location.pathname.replace(/^\//,"")&&location.hostname===this.hostname){const s=decodeURI(this.hash);let e=RegExp(/^#fnref:/).test(s),o=!e&&RegExp(/^#fn:/).test(s);var r=s.includes(":")?s.replace(/\:/g,"\\:"):s;let a=$(r);var l=$(this).parent().prop("tagName"),r=RegExp(/^H\d/).test(l),l=!t.is(":hidden");if(void 0!==a){n.preventDefault(),history.pushState&&history.pushState(null,null,s);n=r?$(this).offset().top:$(window).scrollTop();let t=a.offset().top-=8;t<n&&(r||o||l||(i.removeClass("topbar-down").addClass("topbar-up"),i.attr(d,!0),p+=1),(r||e)&&l&&(t-=c)),$("html").animate({scrollTop:t},500,()=>(a.focus(),$(`[${u}=true]`).length&&$(`[${u}=true]`).attr(u,!1),$(":target").length&&$(":target").attr(u,!1),(o||e)&&a.attr(u,!0),a.is(":focus")?!1:(a.attr("tabindex","-1"),a.focus(),void(void 0!==i.attr(d)&&(--p,p<=0&&i.attr(d,"false"))))))}}})});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Chirpy v4.3.4 (https://github.com/cotes2020/jekyll-theme-chirpy/)
2
+ * Chirpy v5.0.0 (https://github.com/cotes2020/jekyll-theme-chirpy/)
3
3
  * © 2019 Cotes Chung
4
4
  * MIT Licensed
5
5
  */
6
- const getInitStatus=function(){let e=!1;return()=>{let t=e;return e||(e=!0),t}}(),PvOpts=function(){function e(e){return $(e).attr("content")}function t(t){let a=e(t);return void 0!==a&&!1!==a}return{getProxyMeta:()=>e("meta[name=pv-proxy-endpoint]"),getLocalMeta:()=>e("meta[name=pv-cache-path]"),hasProxyMeta:()=>t("meta[name=pv-proxy-endpoint]"),hasLocalMeta:()=>t("meta[name=pv-cache-path]")}}(),PvStorage=function(){const e={KEY_PV:"pv",KEY_PV_SRC:"pv_src",KEY_CREATION:"pv_created_date"},t="same-origin",a="cors";function o(e){return localStorage.getItem(e)}function r(e,t){localStorage.setItem(e,t)}function n(t,a){r(e.KEY_PV,t),r(e.KEY_PV_SRC,a),r(e.KEY_CREATION,(new Date).toJSON())}return{keysCount:()=>Object.keys(e).length,hasCache:()=>null!==localStorage.getItem(e.KEY_PV),getCache:()=>JSON.parse(localStorage.getItem(e.KEY_PV)),saveLocalCache(e){n(e,t)},saveProxyCache(e){n(e,a)},isExpired(){let t=new Date(o(e.KEY_CREATION));return t.setHours(t.getHours()+1),Date.now()>=t.getTime()},isFromLocal:()=>o(e.KEY_PV_SRC)===t,isFromProxy:()=>o(e.KEY_PV_SRC)===a,newerThan:e=>PvStorage.getCache().totalsForAllResults["ga:pageviews"]>e.totalsForAllResults["ga:pageviews"],inspectKeys(){if(localStorage.length===PvStorage.keysCount())for(let t=0;t<localStorage.length;t++){switch(localStorage.key(t)){case e.KEY_PV:case e.KEY_PV_SRC:case e.KEY_CREATION:break;default:return void localStorage.clear()}}else localStorage.clear()}}}();function countUp(e,t,a){if(e<t){let o=new CountUp(a,e,t);o.error?console.error(o.error):o.start()}}function countPV(e,t){let a=0;if(void 0!==t)for(let o=0;o<t.length;++o){if(t[parseInt(o,10)][0]===e){a+=parseInt(t[parseInt(o,10)][1],10);break}}return a}function tacklePV(e,t,a,o){let r=countPV(t,e);if(r=0===r?1:r,o){const e=parseInt(a.text().replace(/,/g,""),10);r>e&&countUp(e,r,a.attr("id"))}else a.text((new Intl.NumberFormat).format(r))}function displayPageviews(e){if(void 0===e)return;let t=getInitStatus();const a=e.rows;if($("#post-list").length>0)$(".post-preview").each(function(){const e=$(this).find("a").attr("href");tacklePV(a,e,$(this).find(".pageviews"),t)});else if($(".post").length>0){const 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(e=!1){return fetch(PvOpts.getLocalMeta()).then(e=>e.json()).then(t=>{e&&PvStorage.isFromProxy()&&PvStorage.newerThan(t)||(displayPageviews(t),PvStorage.saveLocalCache(JSON.stringify(t)))})}$(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())});
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(){let 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())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()}else localStorage.clear()}}}();function countUp(t,a,r){if(t<a){let e=new CountUp(r,t,a);e.error?console.error(e.error):e.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){let o=countPV(t,e);o=0===o?1:o,r?(r=parseInt(a.text().replace(/,/g,""),10),o>r&&countUp(r,o,a.attr("id"))):a.text((new Intl.NumberFormat).format(o))}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())});
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.3.4
4
+ version: 5.0.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: 2021-11-29 00:00:00.000000000 Z
11
+ date: 2022-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -107,10 +107,13 @@ files:
107
107
  - _data/contact.yml
108
108
  - _data/locales/en.yml
109
109
  - _data/locales/id-ID.yml
110
+ - _data/locales/ko-KR.yml
110
111
  - _data/locales/zh-CN.yml
111
112
  - _data/share.yml
113
+ - _includes/comments.html
114
+ - _includes/comments/disqus.html
115
+ - _includes/comments/utterances.html
112
116
  - _includes/css-selector.html
113
- - _includes/disqus.html
114
117
  - _includes/favicons.html
115
118
  - _includes/footer.html
116
119
  - _includes/google-analytics.html
@@ -122,7 +125,6 @@ files:
122
125
  - _includes/mode-toggle.html
123
126
  - _includes/no-linenos.html
124
127
  - _includes/no-zero-date.html
125
- - _includes/panel.html
126
128
  - _includes/post-nav.html
127
129
  - _includes/post-paginator.html
128
130
  - _includes/post-sharing.html
@@ -133,6 +135,7 @@ files:
133
135
  - _includes/search-results.html
134
136
  - _includes/sidebar.html
135
137
  - _includes/timeago.html
138
+ - _includes/toc.html
136
139
  - _includes/topbar.html
137
140
  - _includes/trending-tags.html
138
141
  - _includes/update-list.html
data/_includes/panel.html DELETED
@@ -1,59 +0,0 @@
1
- <!--
2
- The Pannel on right side (Desktop views)
3
- -->
4
-
5
- {% include lang.html %}
6
-
7
- <div id="panel-wrapper" class="col-xl-3 pl-2 text-muted topbar-down">
8
-
9
- <div class="access">
10
-
11
- {% include update-list.html %}
12
-
13
- {% if update_list.size > 0 %}
14
-
15
- <div id="access-lastmod" class="post">
16
- <span>{{- site.data.locales[lang].panel.lastmod -}}</span>
17
- <ul class="post-content pl-0 pb-1 ml-1 mt-2">
18
-
19
- {% for item in update_list %}
20
- {% assign index = item | split: "::" | last | plus: 0 %}
21
- {% assign post = site.posts[index] %}
22
- {% assign url = post.url | relative_url %}
23
- <li><a href="{{ url }}">{{ post.title }}</a></li>
24
- {% endfor %}
25
-
26
- </ul>
27
- </div> <!-- #access-lastmod -->
28
-
29
- {% endif %}
30
-
31
- {% include trending-tags.html %}
32
-
33
- {% if trending_tags.size > 0 %}
34
- <div id="access-tags">
35
- <span>{{- site.data.locales[lang].panel.trending_tags -}}</span>
36
- <div class="d-flex flex-wrap mt-3 mb-1 mr-3">
37
-
38
- {% for tag_name in trending_tags %}
39
- {% assign url = tag_name | slugify | url_encode | prepend: "/tags/" | append: "/" %}
40
- <a class="post-tag" href="{{ url | relative_url }}">{{ tag_name }}</a>
41
- {% endfor %}
42
-
43
- </div>
44
- </div>
45
- {% endif %}
46
- </div> <!-- .access -->
47
-
48
- {% if include.toc %}
49
- <!-- BS-toc.js will be loaded at medium priority -->
50
- <script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js"></script>
51
- <div id="toc-wrapper" class="pl-0 pr-4 mb-5">
52
- <span class="pl-3 pt-2 mb-2">
53
- {{- site.data.locales[lang].panel.toc -}}
54
- </span>
55
- <nav id="toc" data-toggle="toc"></nav>
56
- </div>
57
- {% endif %}
58
-
59
- </div> <!-- #panel-wrapper -->