hexo-theme-stellar/source/css/_layout/widgets/search.styl

105 lines
2.1 KiB
Stylus
Raw Normal View History

2022-11-27 17:16:38 +08:00
.widgets .widget-wrapper.search
margin-bottom: 0
2022-12-09 23:56:58 +08:00
.search-wrapper
width: 100%
>.search-form
position: sticky
top: 1rem
display: flex
flex-direction: row
align-items: center
2022-12-16 14:53:08 +08:00
transition: 0.38s ease-out
z-index: 0
2022-12-09 23:56:58 +08:00
.search-input
width: 100%
2022-12-16 14:53:08 +08:00
padding: 0.5rem 0
2024-01-13 01:00:50 +08:00
line-height: 1.5
2022-12-09 23:56:58 +08:00
box-sizing: border-box
2022-12-15 00:45:48 +08:00
font-family: $ff-body
2024-01-13 01:00:50 +08:00
font-size: $fs-13
2022-12-09 23:56:58 +08:00
color: var(--text-p0)
2024-01-13 01:00:50 +08:00
2022-12-09 23:56:58 +08:00
2024-01-13 01:00:50 +08:00
&.noresult[searching='true']
2022-12-09 23:56:58 +08:00
.search-icon
2024-01-14 16:50:15 +08:00
path[p-id="1562"]
color: $c-red
2024-01-13 01:00:50 +08:00
.search-form
border: 1px solid $c-red
2022-12-09 23:56:58 +08:00
.search-no-result
display: none
margin: 1em auto
color: var(--text-p1)
text-align: center
font-size: $fs-14
padding: 2rem
background: var(--block)
2022-12-15 22:42:48 +08:00
border-radius: $border-bar
2022-12-09 23:56:58 +08:00
#search-result
ul.search-result-list
padding: 0
margin: 0
list-style-type: none
li
margin: 1em auto
&:hover
.search-result-title
color: $color-hover
.search-result-title
color: var(--text-p1)
font-weight: 700
line-height: 1.2
.search-result-content
overflow: hidden
color: var(--text-p3)
margin: .4em auto
max-height: 13em
text-align: justify
font-size: $fs-12
line-height: 1.2
display: -webkit-box
-webkit-box-orient: vertical
overflow: hidden
-webkit-line-clamp: 3
.search-keyword
border-bottom: 1px dashed $color-hover
color: $color-hover
font-weight: bold
2024-01-13 01:00:50 +08:00
.search-wrapper.noresult[searching='true']
2022-12-09 23:56:58 +08:00
.search-no-result
display: block
.widget-wrapper
.search-form
top: 0
2024-01-13 01:00:50 +08:00
background: var(--card)
border: 1px solid var(--block-border)
border-radius: $border-bar
2022-12-09 23:56:58 +08:00
.search-input
2024-01-13 01:00:50 +08:00
text-indent: 0.75rem
padding-right: 2rem
2022-12-09 23:56:58 +08:00
.search-icon
2024-01-13 01:00:50 +08:00
margin: 2px
position absolute
right: 0
2022-12-09 23:56:58 +08:00
pointer-events: none
color: var(--text-p2)
2024-01-13 01:00:50 +08:00
padding: 0.5rem
border-radius: 'calc(%s - 2px)' % $border-bar
2024-01-14 16:50:15 +08:00
path[p-id="1562"]
color: $color-theme
2022-12-09 23:56:58 +08:00
#search-result,.search-no-result
2022-12-16 14:53:08 +08:00
margin-top: 1rem
2022-12-09 23:56:58 +08:00
.widget-wrapper:not(:first-child)
.search-wrapper
margin-top: -1rem