From bcf387ec62a7bb0491d6d940d03dbf118583b38b Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Wed, 12 Jan 2022 00:38:55 +0800 Subject: [PATCH] fix: left sidebar styles --- src/_headings.scss | 6 +----- src/_views.scss | 31 ++++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/_headings.scss b/src/_headings.scss index ecac765..6a6c7fd 100644 --- a/src/_headings.scss +++ b/src/_headings.scss @@ -85,11 +85,7 @@ a.title h1.title { } #repo-name { - /* Show the last part of the repo instead */ - direction: rtl; - text-align: left; - max-width: 120px; - line-height: 1.5; + max-width: 150px; } .cp__right-sidebar-settings a { diff --git a/src/_views.scss b/src/_views.scss index 90cbba7..420c10b 100644 --- a/src/_views.scss +++ b/src/_views.scss @@ -24,7 +24,7 @@ width: 100%; } -.cp__sidebar-main-content:not([data-is-global-graph-pages=true]) > div { +.cp__sidebar-main-content:not([data-is-global-graph-pages="true"]) > div { padding: 32px; } @@ -103,6 +103,32 @@ margin-top: 0.5em; } +#left-sidebar { + height: 100%; + padding-top: var(--ct-header-height); +} + +.left-sidebar-inner { + height: 100%; +} + +.left-sidebar-inner > .wrap { + margin-top: 0; + padding-top: 12px; + padding-bottom: 12px; + height: calc(100% - var(--ct-header-height)); +} + +.left-sidebar-inner a.item > span { + transform: translateY(2px); + margin-top: 0; +} + +.left-sidebar-inner .new-page { + position: absolute; + bottom: 0; +} + .left-sidebar-inner .nav-content-item { font-size: 0.875rem; font-weight: 500; @@ -116,6 +142,5 @@ .journal-title > h1 { backdrop-filter: blur(5px); border-radius: 4px; - } + } } -