2022-09-29 10:09:53 +08:00
|
|
|
$icon-size = 1.2rem
|
|
|
|
$search-header-height = 3rem
|
2020-03-29 19:54:28 +08:00
|
|
|
|
|
|
|
.search-pop-overlay {
|
2022-09-29 10:09:53 +08:00
|
|
|
position fixed
|
2022-09-30 10:51:42 +08:00
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
z-index $z-index-8
|
2022-09-29 10:09:53 +08:00
|
|
|
display flex
|
|
|
|
width 100%
|
2022-09-30 10:51:42 +08:00
|
|
|
height 100%
|
2022-09-29 10:09:53 +08:00
|
|
|
background rgba(0, 0, 0, 0)
|
|
|
|
visibility hidden
|
|
|
|
transition-t("visibility, background", "0, 0", "0.3, 0.3", "ease, ease")
|
2020-12-30 20:09:46 +08:00
|
|
|
|
|
|
|
&.active {
|
2022-09-29 10:09:53 +08:00
|
|
|
background rgba(0, 0, 0, 0.35)
|
2022-09-30 10:51:42 +08:00
|
|
|
visibility visible
|
2020-12-30 20:09:46 +08:00
|
|
|
|
|
|
|
.search-popup {
|
2022-09-29 10:09:53 +08:00
|
|
|
transform scale(1)
|
2020-12-30 20:09:46 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2021-01-21 16:47:13 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
.search-popup {
|
2022-09-30 10:51:42 +08:00
|
|
|
z-index $z-index-6
|
2022-09-29 10:09:53 +08:00
|
|
|
width 70%
|
2022-09-30 10:51:42 +08:00
|
|
|
height 80%
|
2022-09-29 10:09:53 +08:00
|
|
|
margin auto
|
2022-10-14 17:56:32 +08:00
|
|
|
background var(--background-color-1)
|
2022-09-30 10:51:42 +08:00
|
|
|
border-radius 0.4rem
|
2022-09-29 10:09:53 +08:00
|
|
|
transform scale(0)
|
|
|
|
transition-t("transform", "0", "0.3", "ease")
|
2020-06-04 22:11:27 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
+keep-tablet() {
|
2022-09-29 10:09:53 +08:00
|
|
|
width 80%
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-06-04 22:11:27 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
+keep-mobile() {
|
2022-09-29 10:09:53 +08:00
|
|
|
width 90%
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-04-07 11:57:53 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
.search-header {
|
2022-09-29 10:09:53 +08:00
|
|
|
display flex
|
|
|
|
align-items center
|
2022-09-30 10:51:42 +08:00
|
|
|
height $search-header-height
|
2022-09-29 10:09:53 +08:00
|
|
|
padding 0 1rem
|
2022-10-14 17:56:32 +08:00
|
|
|
background var(--text-color-6)
|
2022-09-30 10:51:42 +08:00
|
|
|
border-top-left-radius 0.2rem
|
|
|
|
border-top-right-radius 0.2rem
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2020-12-30 18:56:43 +08:00
|
|
|
.search-input-field-pre {
|
2022-09-29 10:09:53 +08:00
|
|
|
margin-right 0.2rem
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-3)
|
2022-09-30 10:51:42 +08:00
|
|
|
cursor pointer
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
.search-input-container {
|
2022-09-29 10:09:53 +08:00
|
|
|
flex-grow 1
|
|
|
|
padding 0.2rem
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
.search-input {
|
2022-09-30 10:51:42 +08:00
|
|
|
width 100%
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-3)
|
2022-09-30 10:51:42 +08:00
|
|
|
font-size 1.2rem
|
2022-09-29 10:09:53 +08:00
|
|
|
background transparent
|
|
|
|
border 0
|
|
|
|
outline 0
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
&::-webkit-search-cancel-button {
|
2022-09-29 10:09:53 +08:00
|
|
|
display none
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-04-02 22:07:55 +08:00
|
|
|
|
2022-09-29 10:09:53 +08:00
|
|
|
&::-webkit-input-placeholder {
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-4)
|
2022-09-29 10:09:53 +08:00
|
|
|
font-size 1rem
|
|
|
|
}
|
|
|
|
}
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
|
2020-04-12 00:03:22 +08:00
|
|
|
|
2022-09-29 10:09:53 +08:00
|
|
|
.close-popup-btn {
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-3)
|
2022-09-29 10:09:53 +08:00
|
|
|
font-size $icon-size
|
|
|
|
cursor pointer
|
2020-04-12 00:03:22 +08:00
|
|
|
|
2022-09-30 11:36:38 +08:00
|
|
|
&:hover {
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-1)
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
2020-04-12 00:03:22 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
|
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
#search-result {
|
2022-09-29 10:09:53 +08:00
|
|
|
position relative
|
|
|
|
display flex
|
2022-09-30 10:51:42 +08:00
|
|
|
box-sizing border-box
|
2022-09-29 10:09:53 +08:00
|
|
|
height 'calc(100% - %s)' % $search-header-height
|
|
|
|
padding 0.3rem 1.5rem
|
2022-09-30 10:51:42 +08:00
|
|
|
overflow auto
|
2020-12-01 16:51:38 +08:00
|
|
|
|
|
|
|
.search-result-list {
|
2022-09-29 10:09:53 +08:00
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
font-size 1rem
|
2020-12-01 16:51:38 +08:00
|
|
|
|
|
|
|
li {
|
2022-09-29 10:09:53 +08:00
|
|
|
box-sizing border-box
|
|
|
|
margin 0.8rem 0
|
2022-09-30 10:51:42 +08:00
|
|
|
padding 0.8rem 0
|
|
|
|
border-bottom 0.1rem dashed var(--border-color)
|
2020-12-01 16:51:38 +08:00
|
|
|
|
|
|
|
&:last-child {
|
2022-09-29 10:09:53 +08:00
|
|
|
border-bottom none
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-result-title {
|
2022-09-29 10:09:53 +08:00
|
|
|
position relative
|
|
|
|
display flex
|
|
|
|
align-items center
|
2022-09-30 10:51:42 +08:00
|
|
|
margin-bottom 0.8rem
|
|
|
|
padding-left 1rem
|
|
|
|
font-weight bold
|
2020-12-01 16:51:38 +08:00
|
|
|
|
|
|
|
&::after {
|
2022-09-29 10:09:53 +08:00
|
|
|
position absolute
|
2022-09-30 10:51:42 +08:00
|
|
|
top 50%
|
|
|
|
left 0
|
2022-09-29 10:09:53 +08:00
|
|
|
width 0.4rem
|
|
|
|
height 0.4rem
|
2022-10-14 17:56:32 +08:00
|
|
|
background var(--text-color-3)
|
2022-09-29 10:09:53 +08:00
|
|
|
border-radius 50%
|
|
|
|
transform translateY(-50%)
|
2022-09-30 10:51:42 +08:00
|
|
|
content ''
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.search-result {
|
2022-09-29 10:09:53 +08:00
|
|
|
margin 0
|
|
|
|
padding-left 1rem
|
2022-09-30 10:51:42 +08:00
|
|
|
line-height 2rem
|
2022-09-29 10:09:53 +08:00
|
|
|
word-wrap break-word
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
&:hover {
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-3)
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-keyword {
|
2022-09-29 10:09:53 +08:00
|
|
|
color var(--primary-color)
|
|
|
|
font-weight bold
|
2022-09-30 10:51:42 +08:00
|
|
|
border-bottom 0.1rem dashed var(--primary-color)
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
|
|
|
|
|
2020-12-01 16:51:38 +08:00
|
|
|
#no-result {
|
2022-09-29 10:09:53 +08:00
|
|
|
margin auto
|
2022-10-14 17:56:32 +08:00
|
|
|
color var(--text-color-4)
|
2020-12-01 16:51:38 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-29 19:54:28 +08:00
|
|
|
}
|
2020-09-03 14:54:46 +08:00
|
|
|
}
|
2020-12-01 16:51:38 +08:00
|
|
|
|