From a4435a45ece5b1ade64ba0878ee73931e8211cf7 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 13 Feb 2020 17:46:05 +0800 Subject: [PATCH] Imported the dark-mode toggle. --- _includes/sidebar.html | 6 ++++++ assets/css/main.scss | 26 +++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 65d162a..a091e90 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -56,6 +56,11 @@
+ + + {% include dark-mode-toggle.html %} + + @@ -69,4 +74,5 @@ +
\ No newline at end of file diff --git a/assets/css/main.scss b/assets/css/main.scss index 7c4409b..297927e 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -231,10 +231,26 @@ body { /*box-shadow: inset 0 0 0.25em 0 rgba(0, 0, 0, 0.22);*/ } -#sidebar .contact a:hover { +#sidebar .contact a:hover, +#sidebar #mode-toggle-wrapper:hover { color: #fff; } +#mode-toggle-wrapper { + color: rgb(103, 107, 109); + font-size: 1.05rem; + user-select: none; + transition: color 0.35s ease-in-out; +} + +#sidebar #mode-toggle-wrapper>i::after { + content: ""; + color: #525354; + border-right: 1px solid; + padding-left: .6rem; +} + + /*--- top-bar ---*/ #topbar-wrapper { @@ -1107,6 +1123,10 @@ div.tooltip-inner { /* Overrided BS4 Tooltip */ padding: 0 0.6rem; } + #mode-toggle-wrapper { + padding-left: 1.2rem; + } + #main-wrapper { margin-left: 210px; } @@ -1362,6 +1382,10 @@ div.tooltip-inner { /* Overrided BS4 Tooltip */ padding-top: .45rem; } + #mode-toggle-wrapper { + font-size: 1.6rem; + } + footer>div.d-flex { max-width: 1130px; }