hexo-theme-butterfly/source/css/_search/local-search.styl
Jerry f7c50586ce breaking changes: algolia 升級至 v4
feat:  本地搜索增加數據庫加載中和搜索中 loading 顯示
feat: 更改文章美化後,列表的顯示效果 closed #693 closed #686
improvement: UI 微調
2021-10-29 14:40:10 +08:00

68 lines
1.4 KiB
Stylus

#local-search
.search-dialog
.local-search-box
margin: 0 auto
max-width: 100%
width: 100%
input
padding: 5px 14px
width: 100%
outline: none
border: 2px solid $search-color
border-radius: 40px
background: var(--search-bg)
color: var(--search-input-color)
-webkit-appearance: none
.search-wrap
display: none
.local-search__hit-item
position: relative
padding-left: 24px
line-height: 1.7
&:hover
&:before
border-color: var(--pseudo-hover)
&:before
$w = .5em
position: absolute
top: .45em
left: 0
width: w = $w
height: h = w
border: 3px solid $search-color
border-radius: w
background: transparent
content: ''
line-height: h
transition: all .2s ease-in-out
a
display: block
color: var(--search-result-title)
font-weight: 600
cursor: pointer
&:hover
color: $search-color
.search-result
margin: 0 0 8px
word-break: break-all
.search-keyword
color: $search-keyword-highlight
font-weight: bold
.search-result-list
overflow-y: auto
max-height: 210px
+maxWidth768()
padding-bottom: 40px
max-height: 75vh !important