{{- site.data.locales[lang].panel.lastmod -}}
+{{- site.data.locales[lang].panel.lastmod -}}
-
{% for item in update_list %}
{% assign index = item | split: "::" | last | plus: 0 %}
diff --git a/_javascript/commons/mode-toggle.js b/_javascript/commons/mode-toggle.js
index 7d4926e..1a3b3d6 100644
--- a/_javascript/commons/mode-toggle.js
+++ b/_javascript/commons/mode-toggle.js
@@ -1,10 +1,13 @@
/*
- * Document-reday functions for '#mode-toggle-wrapper'
+ * Listener for theme mode toggle
*/
$(function() {
- $("#mode-toggle-wrapper").keyup((e) => {
- if(e.keyCode === 13) {
- flipMode();
- }
+ $(".mode-toggle").click((e) => {
+ const $target = $(e.target);
+ let $btn = ($target.prop("tagName") === "button".toUpperCase() ?
+ $target : $target.parent());
+
+ $btn.blur(); // remove the clicking outline
+ flipMode();
});
});
diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss
index dc8e264..0729239 100644
--- a/_sass/addon/commons.scss
+++ b/_sass/addon/commons.scss
@@ -216,10 +216,8 @@ img[data-src] {
}
#panel-wrapper {
- h4 {
- @include panel-label;
-
- font-family: inherit;
+ .panel-heading { // the headings
+ @include label(inherit);
}
.post-tag {
@@ -775,7 +773,6 @@ $sidebar-display: "sidebar-display";
} // ul
.sidebar-bottom {
- font-size: 1.2rem;
margin-bottom: 2.1rem;
@include ml-mr(auto);
@@ -792,10 +789,26 @@ $sidebar-display: "sidebar-display";
}
i {
- line-height: 1.75rem; // default line-height in body
- vertical-align: middle;
+ font-size: 1.2rem;
+ line-height: 1.75rem;
+ }
- @extend %cursor-pointer;
+ .mode-toggle {
+ padding: 0;
+ border: 0;
+ margin-bottom: 1px;
+ background-color: transparent;
+
+ @extend %icon;
+ @extend %sidebar-links;
+
+ > i {
+ @extend %clickable-transition;
+ }
+
+ &:hover > i {
+ color: var(--sidebar-active-color);
+ }
}
.icon-border {
@@ -1627,6 +1640,7 @@ $sidebar-display: "sidebar-display";
}
> span,
+ > button.mode-toggle,
> a {
@include ml-mr(0.15rem);
diff --git a/_sass/addon/module.scss b/_sass/addon/module.scss
index 45d57bc..7e25531 100644
--- a/_sass/addon/module.scss
+++ b/_sass/addon/module.scss
@@ -124,18 +124,6 @@
font-weight: $font-weight;
}
-@mixin panel-label {
- @include label(inherit);
-
- display: block;
- line-height: 1.2;
- padding-top: 0.5rem;
- padding-bottom: 0.5rem;
- margin-top: 0;
- margin-bottom: 0;
- letter-spacing: -0.02em;
-}
-
@mixin align-center {
position: relative;
left: 50%;
diff --git a/_sass/layout/post.scss b/_sass/layout/post.scss
index bcb811f..4d09f23 100644
--- a/_sass/layout/post.scss
+++ b/_sass/layout/post.scss
@@ -150,9 +150,6 @@ img.preview-img {
top: 6rem;
}
- > span {
- @include panel-label;
- }
}
#toc li a {
diff --git a/assets/js/dist/categories.min.js b/assets/js/dist/categories.min.js
index 1116110..8cb8fb1 100644
--- a/assets/js/dist/categories.min.js
+++ b/assets/js/dist/categories.min.js
@@ -3,4 +3,4 @@
* © 2019 Cotes Chung
* MIT Licensed
*/
-$(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-wrapper").keyup(e=>{13===e.keyCode&&flipMode()})}),$(function(){const e=$("#sidebar-trigger"),o=$("#search-trigger"),s=$("#search-cancel"),t=$("#search-cleaner"),a=$("#main"),l=$("#topbar-title"),n=$("#search-wrapper"),r=$("#search-result-wrapper"),d=$("#search-results"),i=$("#search-input"),c=$("#search-hints"),u=function(){let e=0;return{block(){e=window.scrollY,$("html,body").scrollTop(0)},release(){$("html,body").scrollTop(e)},getOffset(){return e}}}(),f={on(){e.addClass("unloaded"),l.addClass("unloaded"),o.addClass("unloaded"),n.addClass("d-flex"),s.addClass("loaded")},off(){s.removeClass("loaded"),n.removeClass("d-flex"),e.removeClass("unloaded"),l.removeClass("unloaded"),o.removeClass("unloaded")}},p=function(){let e=!1;return{on(){e||(u.block(),r.removeClass("unloaded"),a.addClass("unloaded"),e=!0)},off(){e&&(d.empty(),c.hasClass("unloaded")&&c.removeClass("unloaded"),r.addClass("unloaded"),t.removeClass("visible"),a.removeClass("unloaded"),u.release(),i.val(""),e=!1)},isVisible(){return e}}}();function h(){return s.hasClass("loaded")}o.click(function(){f.on(),p.on(),i.focus()}),s.click(function(){f.off(),p.off()}),i.focus(function(){n.addClass("input-focus")}),i.focusout(function(){n.removeClass("input-focus")}),i.on("keyup",function(e){8===e.keyCode&&""===i.val()?h()?c.removeClass("unloaded"):p.off():""!==i.val()&&(p.on(),t.hasClass("visible")||t.addClass("visible"),h()&&c.addClass("unloaded"))}),t.on("click",function(){i.val(""),h()?(c.removeClass("unloaded"),d.empty()):p.off(),i.focus(),t.removeClass("visible")})}),$(function(){var e=function(){const e="sidebar-display";let o=!1;const s=$("body");return{toggle(){!1===o?s.attr(e,""):s.removeAttr(e),o=!o}}}();$("#sidebar-trigger").click(e.toggle),$("#mask").click(e.toggle)}),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){const o=$("#topbar-wrapper"),s=$("#toc-wrapper"),t=$(".access"),a=$("#search-input");let l,n=0;const r=o.outerHeight();$(window).scroll(function(e){$("#topbar-title").is(":hidden")&&(l=!0)}),setInterval(function(){l&&(function(){var e=$(this).scrollTop();Math.abs(n-e)<=5||(e>n&&e>r?(o.removeClass("topbar-down").addClass("topbar-up"),0