From c164f295e0739d886b07adc99e520e0d8b831a32 Mon Sep 17 00:00:00 2001 From: Alessandro Yuichi Okimoto Date: Thu, 25 Jul 2024 15:32:51 +0900 Subject: [PATCH] style: customize scalar sidebar color Signed-off-by: Alessandro Yuichi Okimoto --- src/css/custom.css | 96 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/src/css/custom.css b/src/css/custom.css index 76dc9b9..fcc33c2 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -665,6 +665,57 @@ code { .sidebar-bucketeer-logo > .menu__link--active:before { background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"%3E%3Crect width="256" height="256" fill="none" /%3E%3Cpath d="M175,462,c-53,-10,-68,-20,-62,-43,4,-14,-6,-29,-35,-52,-85,-68,-84,-120,3,-116,42,2,50,-1,74,-30,l28,-32,-23,-24,-23,-25,21,-23,c26,-28,27,-35,6,-59,-14,-14,-14,-20,-4,-33,16,-19,34,-19,50,0,10,12,9,20,-3,39,-15,23,-15,26,5,51,l20,26,-23,25,-23,25,27,26,27,27,29,-28,28,-27,22,27,21,27,28,-26,28,-27,22,23,c27,29,27,35,0,64,l-22,23,33,34,c22,22,34,47,38,73,5,36,3,41,-18,47,-36,11,-228,16,-274,8z,m261,-24,c17,-17,-13,-22,-139,-22,-131,-1,-182,9,-141,25,24,10,270,7,280,-3z,m-312,-103,c4,-19,9,-35,12,-35,3,0,39,1681,35,85,39,83,39,83,25,0,-14,-83,-54,-164,-79,-66,-20,-106,-20,-106,0,0,1170,89,80,89,4,0,11,-16,14,-35z" fill="%23FFFFFF" stroke="%23FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" /%3E%3Cpath d="M272,158,c-16,-16,-15,-33,3,-48,13,-10,19,-9,35,5,19,17,19,19,4,37,-20,21,-26,22,-42,6z" fill="%23FFFFFF" stroke="%23FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" /%3E%3Cpath d="M360,155,c-10,-13,-9,-19,5,-36,19,-20,19,-20,39,0,16,17,17,23,6,35,-16,20,-34,20,-50,1z" fill="none" stroke="%23FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="16" /%3E%3C/svg%3E'); } +/* +.sidebar-audit-logs .menu__list-item-collapsible .menu__link--active:before { + background-image: url("data:image/svg+xml,%0A%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M160-200v-80h80v-280q0-83 50-147.5T420-792v-28q0-25 17.5-42.5T480-880q25 0 42.5 17.5T540-820v28q80 20 130 84.5T720-560v280h80v80H160Zm320-300Zm0 420q-33 0-56.5-23.5T400-160h160q0 33-23.5 56.5T480-80ZM320-280h320v-280q0-66-47-113t-113-47q-66 0-113 47t-47 113v280Z' stroke='%23FFFFFF' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); +} + +.navbar__items:not(.navbar__items--right) .navbar__link { + padding-left: 35px; + padding-right: 35px; + font-weight: 700; + font-size: 16px; +} + +.navbar__link:hover { + position: relative; +} + + +.navbar__items:not(.navbar__items--right) + .navbar__link:hover:not(.navbar__link--active):before { + content: '■'; + position: absolute; + top: 11px; + margin-left: -18px; + color: #e439ac; + transform: rotate(45deg); + font-size: 12px; + line-height: 11px; +} + +.navbar__link--active { + position: relative; + z-index: 1; +} + +.navbar__link--active:before { + content: ''; + position: absolute; + top: -19px; + left: 0; + width: 100%; + height: 70px; + background-color: #684b9d; + z-index: -1; +} + + + +/*.menu__link--active.menu__link--sublist { + background-color: #573792; + color: #FFF; +}*/ .navbar__items { text-align: center; @@ -683,13 +734,17 @@ code { .navbar__link:hover:not(.navbar__link--active) { position: relative; + /*text-decoration-line: underline; + text-underline-offset: 3px; + text-decoration-color: #e439ac; + text-decoration-thickness: 0.1em;*/ color: #e439ac; } .navbar__link--active { position: relative; z-index: 1; - cursor: default; + cursor: text; } .navbar__link--active:before { @@ -1167,3 +1222,42 @@ details .tabs__item--active { border-right: 1px solid #efecf5 !important; border-top: 1px solid #efecf5 !important; } + + +:root { + --ifm-menu-color-background-hover: transparent !important; +} + +.t-doc__sidebar { + --scalar-sidebar-background-1: #f9f4fc !important; + --scalar-sidebar-item-hover-color: #573792 !important; + --scalar-sidebar-search-background: reed !important; + --scalar-sidebar-item-active-background: #573792 !important; + --scalar-sidebar-color-active: #FFFFFF !important; +} + +.t-doc__sidebar .sidebar { + border-right: 0 !important; +} + +html[data-theme='light'] body .t-doc__sidebar { + --scalar-sidebar-item-hover-background: #ddd7e9 !important; +} + +.sidebar-heading-link-title { + font-size: 15px; + font-weight: 400; + color: #7462a3; +} + +.sidebar-heading:not(.sidebar-group-item__folder) .sidebar-heading-link-title { + padding-left: 10px !important; +} + +.sidebar-heading-chevron:before { + background: var(--ifm-menu-link-sublist-icon) 50% / 1rem 1rem !important; +} + +.active_page.sidebar-heading .sidebar-heading-link-title { + color: var(--scalar-sidebar-color-active) !important; +}