From 237f756e30fe9126b7f43b7ac76e59fb75a4fd8d Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sun, 4 Jul 2021 02:03:14 +0800 Subject: [PATCH] sidebar --- source/css/_layout/sidebar/toc_blog.styl | 4 ++-- source/css/_layout/sidebar/toc_wiki.styl | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source/css/_layout/sidebar/toc_blog.styl b/source/css/_layout/sidebar/toc_blog.styl index 12cb730..ac4ed92 100644 --- a/source/css/_layout/sidebar/toc_blog.styl +++ b/source/css/_layout/sidebar/toc_blog.styl @@ -1,3 +1,3 @@ -.l_left:not([layout='wiki']) .widget-wrap#toc - .widget-body .doc-tree.active>.toc +.widget-wrap#toc .doc-tree:only-child + &.active>.toc border-left: 2px solid var(--block-hover) diff --git a/source/css/_layout/sidebar/toc_wiki.styl b/source/css/_layout/sidebar/toc_wiki.styl index 0456acb..8263b7a 100644 --- a/source/css/_layout/sidebar/toc_wiki.styl +++ b/source/css/_layout/sidebar/toc_wiki.styl @@ -3,8 +3,8 @@ .widget-body margin-top: 0 -// 未激活的分页链接 -.l_left[layout='wiki'] .widget-wrap#toc .doc-tree +// 其它分页链接 +.widget-wrap#toc .doc-tree:not(:only-child) border-radius: 4px margin: 4px 0 background: var(--block) @@ -29,10 +29,12 @@ // 当前分页链接 -.l_left[layout='wiki'] .widget-wrap#toc .doc-tree.active +.widget-wrap#toc .doc-tree.active:not(:only-child) a.doc-tree-link background: var(--block) - border-bottom: 1px solid var(--block-border) + font-weight: 700 + &:not(:only-child) + border-bottom: 1px solid var(--block-border) &:hover background: var(--block-hover) &:after