hexo-theme-stellar/source/css/_layout/sidebar/sidebar.styl

138 lines
3.0 KiB
Stylus
Raw Normal View History

2021-03-05 21:37:28 +08:00
.l_left
2021-02-19 23:33:19 +08:00
display: flex
flex-direction: column
2021-03-05 21:37:28 +08:00
padding: var(--gap-l)
padding-top: "calc(2 * %s)" % var(--gap-l)
height: "calc(100vh - 3 * %s)" % var(--gap-l)
2021-02-19 23:33:19 +08:00
@media screen and (max-width: $device-tablet)
2021-03-05 21:37:28 +08:00
padding-top: "calc(1 * %s)" % var(--gap-l)
height: "calc(100% - 2 * %s)" % var(--gap-l)
2021-02-19 23:33:19 +08:00
.logo-wrap
2021-03-05 21:37:28 +08:00
margin: 1rem 0
2021-02-19 23:33:19 +08:00
display: flex
align-items: center
color: var(--text-p0)
2021-02-22 23:07:12 +08:00
a
2021-02-20 13:09:41 +08:00
color: inherit
display: flex
align-items: center
2021-04-07 22:38:13 +08:00
a.avatar
display: block
position: relative
2021-03-14 00:46:57 +08:00
width: 50px
height: 50px
2021-02-19 23:33:19 +08:00
flex-shrink: 0
2021-03-14 00:46:57 +08:00
border-radius: 50px
2021-02-19 23:33:19 +08:00
overflow: hidden
margin-right: 1rem
2021-04-07 22:38:13 +08:00
img.avatar
margin: 2px
2021-02-19 23:33:19 +08:00
object-fit: cover
2021-04-07 22:38:13 +08:00
width: "calc(100% - 2 * %s)" % @margin
height: "calc(100% - 2 * %s)" % @margin
border-radius: @width
if hexo-config('style.animated_avatar.animate')
img.bg
trans1 opacity
position: absolute
opacity: 0
z-index: -1
@keyframes spin
from
transform:rotate(0deg)
to
transform:rotate(360deg)
if hexo-config('style.animated_avatar.animate') == 'always'
img.bg
opacity: 1
animation: spin infinite 1s
animation-timing-function: linear
if hexo-config('style.animated_avatar.animate') == 'auto'
&:hover
img.bg
opacity: 1
animation: spin infinite 1s
animation-timing-function: linear
2021-02-19 23:33:19 +08:00
.title
font-size: 1.75rem
font-weight: 900
color: inherit
2021-02-20 13:09:41 +08:00
line-height: 1;
2021-02-19 23:33:19 +08:00
font-family: $ff-logo
nav.menu
margin-top: 0
background: var(--block)
border-radius: 6px
display: flex
padding: 1px
flex-wrap: wrap
&::-webkit-scrollbar
display: none
&::-webkit-scrollbar-track-piece
background: transparent
&::-webkit-scrollbar-thumb
display: none
a.nav-item
text-overflow: ellipsis
word-break: keep-all
margin: 1px
border-radius: 4px
2021-03-05 21:37:28 +08:00
font-size: $fs-14
2021-02-19 23:33:19 +08:00
font-weight: 500
overflow: hidden
2021-02-20 13:09:41 +08:00
padding: 0.375rem 0.75rem
color: var(--text-p3)
2021-04-02 20:24:16 +08:00
text-align: center
2021-02-20 13:09:41 +08:00
&.active, &:hover
2021-02-19 23:33:19 +08:00
color: var(--text-p1)
background: var(--card)
2021-02-22 23:07:12 +08:00
.l_left .menu a.nav-item
flex-grow: 1
2021-02-19 23:33:19 +08:00
.l_left .widgets
2021-03-05 21:37:28 +08:00
margin: 1rem 0
2021-02-19 23:33:19 +08:00
overflow: scroll
flex-grow: 1
scrollbar(0, 0)
2021-02-20 13:09:41 +08:00
z-index: 1
2021-02-19 23:33:19 +08:00
.widget-wrap
margin: 1rem 0 2rem 0
.widget-header
display: flex
color: var(--text-meta)
justify-content: space-between
align-items: center
2021-03-05 21:37:28 +08:00
font-weight: 500
2021-02-19 23:33:19 +08:00
position: sticky
position: -webkit-sticky
top: -2px
background: var(--site-bg)
padding: 2px 0
z-index 1
.cap-action
hover-block 4px 4px
line-height: 0
color: var(--text-meta)
trans2: color background
.icon
fill: var(--text-meta)
&:hover
color: $color-hover
.icon
fill: $color-hover
.widget-body
margin: 0.5rem 0
color: var(--text-p2)
p
margin-top: 0.5em
margin-bottom: 0.5em
2021-03-05 21:37:28 +08:00
>a:hover
text-decoration: underline