hexo-theme-stellar/source/css/_components/partial/navbar.styl

77 lines
1.6 KiB
Stylus
Raw Normal View History

2024-02-02 14:53:35 +08:00
.navbar
2021-07-08 22:23:55 +08:00
padding: 0 1rem
2021-07-10 12:57:48 +08:00
z-index: 8
2024-01-25 22:50:17 +08:00
top: 0
background: var(--site-bg)
if hexo-config('style.site') && hexo-config('style.site.background-image')
position inherit
background: none
else
position: sticky
position: -webkit-sticky
margin-bottom: 1px
margin-top: -8px
2021-07-08 22:23:55 +08:00
&:after
content: ''
height: 2px
border-radius: 2px
position: absolute
bottom: 0
left: 1rem
2024-02-02 14:53:35 +08:00
right: 1rem
2021-07-08 22:23:55 +08:00
background: var(--block-hover)
2021-02-25 13:12:04 +08:00
2024-02-02 14:53:35 +08:00
.navbar nav
2021-02-20 13:09:41 +08:00
display: flex
2021-07-08 22:23:55 +08:00
overflow: scroll visible
2021-02-19 23:33:19 +08:00
scrollbar(0, 0)
2024-01-31 22:45:07 +08:00
font-size: $fs-14
2021-02-19 23:33:19 +08:00
>p
margin: 0
a
2024-02-01 21:27:34 +08:00
padding: 2px 0.75rem
2024-01-25 22:50:17 +08:00
if hexo-config('style.site') && hexo-config('style.site.background-image')
margin: 10px 0.25rem 8px 0
else
margin: 10px 0.25rem 8px 0.25rem
2021-07-08 22:23:55 +08:00
line-height: 2
2021-02-19 23:33:19 +08:00
color: var(--text-p3)
2024-01-03 13:28:04 +08:00
border-radius: $border-button
2021-03-05 21:37:28 +08:00
font-weight: 500
2021-02-19 23:33:19 +08:00
white-space: nowrap
2021-07-08 22:23:55 +08:00
position: relative
z-index: 1
&:after
height: 2px
position: absolute
bottom: -8px
2024-01-03 13:28:04 +08:00
left: 0.75rem
right: 0.75rem
2021-07-29 00:25:37 +08:00
background: $color-theme
border-radius: 2px
pointer-events: none
2021-07-08 22:23:55 +08:00
&:hover
2021-03-08 17:54:23 +08:00
background: var(--block-hover)
2021-07-08 22:23:55 +08:00
&.active, &:hover
2021-02-19 23:33:19 +08:00
color: var(--text-p1)
2021-07-09 21:18:14 +08:00
&.active
background: var(--card)
box-shadow: $boxshadow-button
2024-02-02 14:53:35 +08:00
cursor default
pointer-events: none
2021-07-08 22:23:55 +08:00
&.active:after
2021-07-29 00:25:37 +08:00
content: ''
2021-07-09 21:18:14 +08:00
a+a
margin-left: 4px
2021-02-20 13:09:41 +08:00
2022-10-09 13:42:03 +08:00
@media screen and (max-width: $device-mobile-max)
2024-02-02 14:53:35 +08:00
.navbar.top
2021-02-22 23:07:12 +08:00
margin-top: 0
2022-11-19 17:42:35 +08:00
padding-left: 0
padding-right: 0
nav
a:first-child
margin-left: 1rem
a:last-child
margin-right: 1rem