From de18f408a53e3bf027302270213af60b4c79a7fb Mon Sep 17 00:00:00 2001 From: Jiahao Li <42709836+TheJiahao@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:01:23 +0200 Subject: [PATCH] refactor(sidebar): Simplify styles Co-authored-by: Jimmy Cai --- assets/scss/partials/menu.scss | 17 ++++------- layouts/partials/sidebar/left.html | 46 ++++++++++++++---------------- 2 files changed, 28 insertions(+), 35 deletions(-) diff --git a/assets/scss/partials/menu.scss b/assets/scss/partials/menu.scss index f9ec3e7..88b90b2 100644 --- a/assets/scss/partials/menu.scss +++ b/assets/scss/partials/menu.scss @@ -141,12 +141,14 @@ margin: 0 calc(var(--container-padding) * -1); padding: 30px 30px; + @include respond(xl) { padding: 15px 0; } - & { + &, .menu-bottom-section ol { gap: 30px; + @include respond(xl) { gap: 25px; } @@ -165,10 +167,6 @@ margin: 0; } - li:last-of-type { - margin-top: auto; - } - li { position: relative; vertical-align: middle; @@ -204,18 +202,15 @@ } } - .menu-bottom-section { + &.menu-bottom-section { + margin-top: auto; + ol { margin-top: auto; display: flex; flex-direction: column; width: 100%; padding-left: 0; - gap: 30px; - - @include respond(xl) { - gap: 25px; - } } } } diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index 1fdc02c..e390a9f 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -74,32 +74,30 @@ {{ end }} -
  • - + {{ end }} + + {{ if (default false .Site.Params.colorScheme.toggle) }} +
  • + {{ partial "helper/icon" "toggle-left" }} + {{ partial "helper/icon" "toggle-right" }} + {{ T "darkMode" }} +
  • + {{ end }} +