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

238 lines
5.3 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-07-13 23:16:20 +08:00
word-break: break-all
text-align: justify
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)
2022-10-13 13:57:57 +08:00
@media screen and (max-width: $device-mobile-max)
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
2021-07-14 14:54:06 +08:00
.l_left[layout=wiki]
padding-bottom: 0
height: "calc(100vh - 2 * %s)" % var(--gap-l)
2022-10-13 13:57:57 +08:00
@media screen and (max-width: $device-mobile-max)
2021-07-14 14:54:06 +08:00
height: "calc(100% - 1 * %s)" % var(--gap-l)
.widgets >:last-child
margin-bottom: 6rem
2021-02-19 23:33:19 +08:00
.logo-wrap
2021-08-19 23:13:05 +08:00
margin: 1rem 0
2021-02-19 23:33:19 +08:00
display: flex
align-items: center
2021-08-02 22:48:25 +08:00
overflow: hidden
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-07-03 20:49:52 +08:00
div.bg
2021-06-24 18:53:52 +08:00
width: 100%
height: 100%
background-size: cover
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')
2021-06-24 18:53:52 +08:00
div.bg
2021-04-20 23:26:24 +08:00
trans1: opacity
2021-04-07 22:38:13 +08:00
position: absolute
2021-04-20 23:26:24 +08:00
opacity: 0 !important
2021-04-07 22:38:13 +08:00
z-index: -1
@keyframes spin
from
transform:rotate(0deg)
to
transform:rotate(360deg)
if hexo-config('style.animated_avatar.animate') == 'always'
2021-06-24 18:53:52 +08:00
div.bg
2021-04-20 23:26:24 +08:00
opacity: 1 !important
2022-05-28 01:03:30 +08:00
animation: spin infinite 4s
2021-04-07 22:38:13 +08:00
animation-timing-function: linear
if hexo-config('style.animated_avatar.animate') == 'auto'
&:hover
2021-06-24 18:53:52 +08:00
div.bg
2021-04-20 23:26:24 +08:00
opacity: 1 !important
2022-05-28 01:03:30 +08:00
animation: spin infinite 4s
2021-04-07 22:38:13 +08:00
animation-timing-function: linear
2021-07-07 01:18:13 +08:00
a.title
2021-02-19 23:33:19 +08:00
font-size: 1.75rem
font-weight: 900
color: inherit
2021-07-10 01:09:20 +08:00
line-height: 1.2
2021-07-07 01:18:13 +08:00
display: block
position: relative
2021-08-02 22:48:25 +08:00
.main
color: var(--text-p0)
2021-07-07 01:18:13 +08:00
.sub
color: var(--text-p1)
trans2 opacity transform
2021-08-02 22:48:25 +08:00
white-space: nowrap
2021-07-07 01:18:13 +08:00
.hover
position: absolute
bottom: 0
transform: translateY(8px)
2021-08-02 22:48:25 +08:00
overflow: visible
2021-07-07 01:18:13 +08:00
&:hover
.normal
opacity: 0
transform: translateY(-8px)
.hover
transform: translateY(0)
opacity: 1 !important
2021-07-03 20:49:52 +08:00
2021-06-26 15:02:32 +08:00
.logo-wrap.wiki
2021-07-03 20:49:52 +08:00
margin: 1rem 0 1.5rem 0
2021-06-26 15:02:32 +08:00
flex-direction: column
align-items: flex-start
a.wiki-home
2021-11-06 16:13:47 +08:00
margin-bottom: 1rem
2021-07-08 23:41:57 +08:00
color: var(--text-p1)
2021-07-03 22:33:52 +08:00
svg
margin-right: 2px
2021-06-26 15:02:32 +08:00
&:hover
color: $color-hover
filter: unset !important
2021-02-19 23:33:19 +08:00
2021-07-14 14:54:06 +08:00
.l_left nav.menu
margin-bottom: 1.5rem
2021-02-19 23:33:19 +08:00
nav.menu
2021-07-14 14:54:06 +08:00
margin: 1rem 0
2021-06-26 12:26:21 +08:00
background: var(--block)
2021-02-19 23:33:19 +08:00
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
2022-10-22 13:03:47 +08:00
padding: 0.375rem 0.5rem
2021-02-20 13:09:41 +08:00
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-07-09 21:18:14 +08:00
box-shadow: $boxshadow-button
2021-02-19 23:33:19 +08:00
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
overflow: scroll
flex-grow: 1
scrollbar-width: none
2021-02-19 23:33:19 +08:00
scrollbar(0, 0)
2021-02-20 13:09:41 +08:00
z-index: 1
2022-10-22 13:03:47 +08:00
line-height: 1.2
2021-02-19 23:33:19 +08:00
.widget-wrap
2021-07-03 20:49:52 +08:00
margin: 1rem 0 3rem 0
2021-02-19 23:33:19 +08:00
.widget-header
display: flex
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
top: -2px
background: var(--site-bg)
2021-07-26 22:26:46 +08:00
padding-top: 2px
2021-02-19 23:33:19 +08:00
z-index 1
2022-10-22 13:03:47 +08:00
color: var(--text-p3)
2022-01-26 18:51:56 +08:00
font-size: $fs-14
2022-10-22 13:03:47 +08:00
>span
margin: 0.25rem 0
text-align: left
2021-06-26 15:02:32 +08:00
&:empty
display: none
2021-02-19 23:33:19 +08:00
.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
2021-07-03 20:49:52 +08:00
color: var(--text-p1)
2021-02-19 23:33:19 +08:00
p
2021-11-19 20:25:39 +08:00
margin-top: .5em
margin-bottom: .5em
line-height: 1.5
2021-07-26 22:26:46 +08:00
.widget-header+.widget-body
margin-top: 0
2022-01-26 18:51:56 +08:00
.widget-wrap .widget-body
.more-item
margin: .5rem 0
.cap
margin-bottom: .25rem
.widget-wrap#recent .widget-body
a
line-height: 1.2
font-weight: 500
color: var(--text-p2)
font-size: $fs-13
&:hover
color: $color-hover
.widget-wrap#related .widget-body
2021-06-26 12:39:29 +08:00
>a
padding 0.5rem
display: block
line-height: 1.2
color: var(--text-p2)
font-weight: 500
2021-07-14 14:54:06 +08:00
border: 1px solid var(--block-border)
border-radius: $border-block
margin: 4px 0
background: var(--block)
2021-06-26 12:39:29 +08:00
div.cap
margin-bottom: 0.25rem
color: var(--text-p4)
2021-07-07 01:18:13 +08:00
display: flex
justify-content: space-between
2021-06-26 12:39:29 +08:00
&:hover
2021-07-14 14:54:06 +08:00
background: var(--block-hover)
2021-07-03 20:49:52 +08:00
&.wiki
2021-06-26 15:02:32 +08:00
font-weight: 700
div.excerpt
margin-top: .5rem
color: var(--text-p3)
font-size: $fs-12
font-weight: 400
display: -webkit-box
-webkit-box-orient: vertical
overflow: hidden
2021-07-26 22:26:46 +08:00
-webkit-line-clamp: 5