Files
hexo-theme-butterfly/source/css/_layout/sidebar.styl
Jerry 4aacafdae1 feat: 適配hexo 5.1.0 prismjs caption
feat: code-font-size 也會影響行內代碼塊字體大小 #325
fix: 修復aside recent post的 time 在safari沒有顯示的bug
fix: 修復 prismjs 在 tags-toggle 外掛標簽裏,代碼塊顯示一行的bugs
style: 刪除不必要的css
2020-08-22 23:17:28 +08:00

88 lines
1.6 KiB
Stylus

#toggle-sidebar
position: fixed
bottom: $sidebar-icon-top
left: $sidebar-icon-left
z-index: 100
color: var(--sidebar-icon-color)
font-size: $sidebar-icon-size
cursor: pointer
transition: all .2s
+maxWidth1024()
display: none
#sidebar
position: fixed
top: 0
left: -($sidebar-width)
z-index: 10
padding: 1rem 0 2rem .5rem
width: $sidebar-width
height: 100%
background: var(--sidebar-bg)
opacity: .9
&.tocOpenPc
& > #toggle-sidebar
color: #99a9bf
transform: rotateZ(180deg)
+maxWidth1024()
right: -($mobile-sidebar-width)
left: auto
z-index: 103
width: $mobile-sidebar-width
box-shadow: none
opacity: 1
transition: all .4s
.toc-child
display: block !important
.sidebar-toc
ol,
li
list-style: none
ol
margin-top: .2rem
padding-left: .4rem
&__title
padding-right: .5rem
text-align: center
font-size: 1.3em
&__content
overflow-y: scroll
padding-bottom: 5rem
height: 90vh
.toc-link
display: block
padding-left: .2rem
border-right: 3px solid transparent
transition: all .2s ease-in-out
&.active
border-right-color: darken($theme-toc-color, 20%)
background: $theme-toc-color
color: $sidebar-active-color
&__progress
position: relative
margin-bottom: .3rem
padding-left: .6rem
color: $theme-toc-color
.progress-notice
margin-right: .4rem
.progress-num
display: inline-block
min-width: .9rem
&-bar
width: 0
height: 1px
background: $theme-toc-color