2022-11-23 23:17:24 +08:00
|
|
|
|
2024-01-17 00:27:48 +08:00
|
|
|
.toc-item
|
|
|
|
margin-top: 2px
|
|
|
|
.toc-child
|
|
|
|
margin-top: 2px
|
2022-11-23 23:17:24 +08:00
|
|
|
.widget-wrapper.toc .widget-body
|
2021-07-26 22:26:46 +08:00
|
|
|
margin-top: 0
|
2021-03-22 21:13:57 +08:00
|
|
|
ul ul, ul ol
|
|
|
|
padding-left: 0
|
|
|
|
ol ul, ol ol
|
|
|
|
padding-left: 0
|
2021-07-26 22:26:46 +08:00
|
|
|
|
2021-02-19 23:33:19 +08:00
|
|
|
.toc
|
|
|
|
padding: 0
|
|
|
|
margin: 0
|
|
|
|
padding-left: 0.25rem
|
|
|
|
.toc-item .toc-link
|
2021-07-03 22:33:52 +08:00
|
|
|
padding: 0.5rem
|
2021-02-19 23:33:19 +08:00
|
|
|
font-weight: 500
|
2021-03-05 21:37:28 +08:00
|
|
|
font-size: $fs-13
|
2023-12-24 15:01:08 +08:00
|
|
|
color: var(--text-p1)
|
2021-02-19 23:33:19 +08:00
|
|
|
.toc-child .toc-item .toc-link
|
2021-07-03 22:33:52 +08:00
|
|
|
padding: 0.25rem 0.5rem 0.25rem 1.3rem
|
2021-02-19 23:33:19 +08:00
|
|
|
font-weight: 400
|
|
|
|
color: var(--text-p2)
|
|
|
|
.toc-child .toc-child .toc-item .toc-link
|
2021-07-03 22:33:52 +08:00
|
|
|
padding-left: 2.1rem
|
2021-03-05 21:37:28 +08:00
|
|
|
font-size: $fs-12
|
2021-02-19 23:33:19 +08:00
|
|
|
color: var(--text-p3)
|
|
|
|
.toc-child .toc-child .toc-child .toc-item .toc-link
|
|
|
|
padding-left: 2.9rem
|
|
|
|
|
|
|
|
|
2022-11-23 23:17:24 +08:00
|
|
|
.widget-wrapper.toc .toc-item
|
2021-02-19 23:33:19 +08:00
|
|
|
color: var(--text-p2)
|
2021-03-05 21:37:28 +08:00
|
|
|
font-size: $fs-12
|
2021-02-19 23:33:19 +08:00
|
|
|
padding: 0
|
|
|
|
list-style: none
|
|
|
|
&.active
|
2024-01-17 00:27:48 +08:00
|
|
|
background: var(--alpha50)
|
2021-02-19 23:33:19 +08:00
|
|
|
border-left-color: @color
|
|
|
|
.toc-child .toc-item
|
|
|
|
padding: 0
|
2022-11-23 23:17:24 +08:00
|
|
|
.widget-wrapper.toc a.toc-link
|
2021-02-19 23:33:19 +08:00
|
|
|
color: inherit
|
|
|
|
display: block
|
|
|
|
line-height: 1.2
|
2024-01-17 00:27:48 +08:00
|
|
|
border-radius: $border-bar
|
2021-07-03 22:33:52 +08:00
|
|
|
position: relative
|
2024-01-17 00:27:48 +08:00
|
|
|
trans1 background
|
2021-07-03 23:09:52 +08:00
|
|
|
&:before
|
|
|
|
content: ''
|
|
|
|
position: absolute
|
|
|
|
left: -6px
|
|
|
|
top: 'calc(50% - %s)' % 6px
|
|
|
|
bottom: 'calc(50% - %s)' % 6px
|
|
|
|
width: 2px
|
|
|
|
border-radius: 2px
|
2024-01-31 22:45:07 +08:00
|
|
|
background: var(--text)
|
2021-07-03 23:09:52 +08:00
|
|
|
visibility: hidden
|
2021-02-19 23:33:19 +08:00
|
|
|
&.active
|
2024-01-17 00:27:48 +08:00
|
|
|
background: var(--alpha50)
|
2021-07-03 23:09:52 +08:00
|
|
|
&:before
|
|
|
|
visibility: visible
|
2024-01-17 00:27:48 +08:00
|
|
|
&:hover
|
|
|
|
background: var(--alpha100)
|
|
|
|
|
2024-01-02 19:50:42 +08:00
|
|
|
|
|
|
|
// 始终折叠
|
|
|
|
.widget-wrapper.toc[collapse='true']
|
|
|
|
.toc-item a.toc-link+ol
|
|
|
|
display: none
|
|
|
|
// 激活上级目录时显示子目录
|
|
|
|
.toc a.toc-link.active+ol
|
|
|
|
display: block
|
2023-12-24 15:01:08 +08:00
|
|
|
|
2024-01-02 19:50:42 +08:00
|
|
|
// 自动折叠
|
|
|
|
.widget-wrapper.toc[collapse='auto']
|
|
|
|
.toc-item a.toc-link+ol
|
|
|
|
display: none
|
|
|
|
// 激活上级目录时显示子目录
|
|
|
|
.toc a.toc-link.active+ol
|
|
|
|
display: block
|
|
|
|
// 鼠标放上去时显示子目录
|
|
|
|
&:hover a.toc-link+ol
|
|
|
|
display: block
|
2023-12-24 15:01:08 +08:00
|
|
|
|
2024-01-02 19:50:42 +08:00
|
|
|
// 子目录激活时显示
|
|
|
|
.widget-wrapper.toc[collapse='true'] ol:has(> .toc-item a.active)
|
2023-12-24 15:01:08 +08:00
|
|
|
display: block
|
2024-01-02 19:50:42 +08:00
|
|
|
.widget-wrapper.toc[collapse='auto'] ol:has(> .toc-item a.active)
|
|
|
|
display: block
|