sidebar
This commit is contained in:
parent
749c1af54c
commit
3aabeff065
|
@ -11,7 +11,7 @@ if (page.sidebar == undefined) {
|
||||||
}
|
}
|
||||||
function layoutFooterDiv() {
|
function layoutFooterDiv() {
|
||||||
if (theme.footer.social && theme.footer.social.length > 0) {
|
if (theme.footer.social && theme.footer.social.length > 0) {
|
||||||
var el = '<footer class="footer"><div class="social-wrap dis-select">';
|
var el = '<footer class="footer dis-select"><div class="social-wrap">';
|
||||||
theme.footer.social.forEach(item => {
|
theme.footer.social.forEach(item => {
|
||||||
if (item.icon && (item.url || item.onclick)) {
|
if (item.icon && (item.url || item.onclick)) {
|
||||||
el += '<a class="social"';
|
el += '<a class="social"';
|
||||||
|
|
|
@ -48,9 +48,9 @@ article.md .highlight
|
||||||
border-width: 0
|
border-width: 0
|
||||||
margin-left: 0
|
margin-left: 0
|
||||||
// position: sticky // 如果希望行标固定请打开此行;但是如果想在较窄屏幕上拥有较好的阅读体验,建议让行标跟随滚动。
|
// position: sticky // 如果希望行标固定请打开此行;但是如果想在较窄屏幕上拥有较好的阅读体验,建议让行标跟随滚动。
|
||||||
|
// background: var(--block) // 如果希望行标固定请打开此行;但是如果想在较窄屏幕上拥有较好的阅读体验,建议让行标跟随滚动。
|
||||||
left: 0
|
left: 0
|
||||||
z-index: 1
|
z-index: 1
|
||||||
background: var(--block)
|
|
||||||
pre .line
|
pre .line
|
||||||
color: var(--text-p4)
|
color: var(--text-p4)
|
||||||
.code
|
.code
|
||||||
|
|
|
@ -74,9 +74,8 @@
|
||||||
a.wiki-home
|
a.wiki-home
|
||||||
margin-bottom: .75rem
|
margin-bottom: .75rem
|
||||||
color: var(--text-p2)
|
color: var(--text-p2)
|
||||||
img
|
svg
|
||||||
height: .9em
|
margin-right: 2px
|
||||||
margin-right: .5rem
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $color-hover
|
color: $color-hover
|
||||||
filter: unset !important
|
filter: unset !important
|
||||||
|
@ -192,7 +191,3 @@ nav.menu
|
||||||
|
|
||||||
.l_left[layout='wiki'] .widgets
|
.l_left[layout='wiki'] .widgets
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
.widget-wrap#toc
|
|
||||||
margin-top: 0
|
|
||||||
.widget-body
|
|
||||||
margin-top: 0
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
.l_left:not([layout='wiki']) .widget-wrap#toc
|
||||||
|
.widget-body .doc-tree.active>.toc
|
||||||
|
border-left: 2px solid var(--block-hover)
|
|
@ -1,6 +1,5 @@
|
||||||
// toc padding
|
// toc padding
|
||||||
#toc .widget-body
|
#toc .widget-body
|
||||||
border-left: 2px solid var(--block-hover)
|
|
||||||
line-height: 1.2
|
line-height: 1.2
|
||||||
ul ul, ul ol
|
ul ul, ul ol
|
||||||
padding-left: 0
|
padding-left: 0
|
||||||
|
@ -11,27 +10,18 @@
|
||||||
margin: 0
|
margin: 0
|
||||||
padding-left: 0.25rem
|
padding-left: 0.25rem
|
||||||
.toc-item .toc-link
|
.toc-item .toc-link
|
||||||
padding: 0.5rem 0 0.5rem 1rem
|
padding: 0.5rem
|
||||||
font-weight: 500
|
font-weight: 500
|
||||||
font-size: $fs-13
|
font-size: $fs-13
|
||||||
color: var(--text-p2)
|
color: var(--text-p2)
|
||||||
.toc-child .toc-item .toc-link
|
.toc-child .toc-item .toc-link
|
||||||
padding: 0.25rem 0 0.25rem 1.8rem
|
padding: 0.25rem 0.5rem 0.25rem 1.3rem
|
||||||
font-weight: 400
|
font-weight: 400
|
||||||
color: var(--text-p2)
|
color: var(--text-p2)
|
||||||
.toc-child .toc-child .toc-item .toc-link
|
.toc-child .toc-child .toc-item .toc-link
|
||||||
padding-left: 2.6rem
|
padding-left: 2.1rem
|
||||||
font-size: $fs-12
|
font-size: $fs-12
|
||||||
color: var(--text-p3)
|
color: var(--text-p3)
|
||||||
.toc-child .toc-child .toc-child .toc-item .toc-link
|
|
||||||
padding-left: 3.4rem
|
|
||||||
.toc:only-child
|
|
||||||
.toc-item .toc-link
|
|
||||||
padding-left: 0.5rem
|
|
||||||
.toc-child .toc-item .toc-link
|
|
||||||
padding-left: 1.3rem
|
|
||||||
.toc-child .toc-child .toc-item .toc-link
|
|
||||||
padding-left: 2.1rem
|
|
||||||
.toc-child .toc-child .toc-child .toc-item .toc-link
|
.toc-child .toc-child .toc-child .toc-item .toc-link
|
||||||
padding-left: 2.9rem
|
padding-left: 2.9rem
|
||||||
|
|
||||||
|
@ -51,28 +41,8 @@
|
||||||
display: block
|
display: block
|
||||||
line-height: 1.2
|
line-height: 1.2
|
||||||
border-radius: 4px
|
border-radius: 4px
|
||||||
|
position: relative
|
||||||
&:hover
|
&:hover
|
||||||
background: var(--block-hover)
|
background: var(--block-hover)
|
||||||
&.active
|
&.active
|
||||||
color: var(--theme-highlight) !important
|
color: var(--theme-highlight) !important
|
||||||
|
|
||||||
#toc .doc-tree
|
|
||||||
a.doc-tree-link
|
|
||||||
color: var(--text-p3)
|
|
||||||
padding: 0.5rem
|
|
||||||
display: block
|
|
||||||
border-top-right-radius: 4px
|
|
||||||
border-bottom-right-radius: 4px
|
|
||||||
font-size: $fs-12
|
|
||||||
font-weight: 500
|
|
||||||
position sticky
|
|
||||||
top: 0
|
|
||||||
&.active
|
|
||||||
color: var(--text-p2)
|
|
||||||
font-size: $fs-14
|
|
||||||
&:hover
|
|
||||||
background: var(--block-hover)
|
|
||||||
&.active
|
|
||||||
a.doc-tree-link
|
|
||||||
background: var(--block-hover)
|
|
||||||
margin: 2px 0
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
.l_left[layout='wiki'] .widget-wrap#toc
|
||||||
|
margin-top: 0
|
||||||
|
.widget-body
|
||||||
|
margin-top: 0
|
||||||
|
|
||||||
|
// 未激活的分页链接
|
||||||
|
.l_left[layout='wiki'] .widget-wrap#toc .doc-tree
|
||||||
|
border-radius: 4px
|
||||||
|
margin: 4px 0
|
||||||
|
background: var(--block)
|
||||||
|
overflow: hidden
|
||||||
|
border: 1px solid var(--block-border)
|
||||||
|
a.doc-tree-link
|
||||||
|
color: var(--text-p2)
|
||||||
|
padding: 0.5rem
|
||||||
|
display: block
|
||||||
|
font-size: $fs-12
|
||||||
|
font-weight: 500
|
||||||
|
position: relative
|
||||||
|
&:after
|
||||||
|
position: absolute
|
||||||
|
right: .5rem
|
||||||
|
&.active
|
||||||
|
color: var(--text-p1)
|
||||||
|
&:hover
|
||||||
|
background: var(--block-hover)
|
||||||
|
&:after
|
||||||
|
content: '+'
|
||||||
|
|
||||||
|
|
||||||
|
// 当前分页链接
|
||||||
|
.l_left[layout='wiki'] .widget-wrap#toc .doc-tree.active
|
||||||
|
a.doc-tree-link
|
||||||
|
background: var(--block)
|
||||||
|
border-bottom: 1px solid var(--block-border)
|
||||||
|
&:hover
|
||||||
|
background: var(--block-hover)
|
||||||
|
&:after
|
||||||
|
content: ''
|
||||||
|
|
||||||
|
>.toc
|
||||||
|
padding: 4px
|
||||||
|
background: var(--card)
|
||||||
|
a.toc-link:hover
|
||||||
|
background: var(--block)
|
|
@ -1,12 +1,13 @@
|
||||||
.md .tag-plugin.link
|
.md .tag-plugin.link
|
||||||
margin-top: 1em
|
// margin-top: 1em
|
||||||
margin-bottom: 1em
|
// margin-bottom: 1em
|
||||||
max-width: 360px
|
max-width: 360px
|
||||||
|
margin: 1em auto
|
||||||
@media screen and (max-width: $device-mobile-375)
|
@media screen and (max-width: $device-mobile-375)
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
.md .link-card
|
.md .link-card
|
||||||
margin-right: 1em
|
// margin-right: 1em
|
||||||
background: var(--card)
|
background: var(--card)
|
||||||
display: inline-flex
|
display: inline-flex
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
|
@ -18,10 +19,11 @@
|
||||||
@media screen and (max-width: $device-mobile-375)
|
@media screen and (max-width: $device-mobile-375)
|
||||||
width: 100%
|
width: 100%
|
||||||
box-shadow: $boxshadow-card
|
box-shadow: $boxshadow-card
|
||||||
trans1 box-shadow
|
|
||||||
border-radius: $border-widget
|
border-radius: $border-widget
|
||||||
|
trans2: box-shadow transform
|
||||||
&:hover
|
&:hover
|
||||||
box-shadow: $boxshadow-card-float
|
box-shadow: $boxshadow-card-float
|
||||||
|
transform: translateY(-1px)
|
||||||
|
|
||||||
|
|
||||||
.md .link-card
|
.md .link-card
|
||||||
|
|
Loading…
Reference in New Issue