2022-05-21 19:18:19 +08:00
|
|
|
@if $local_search_enable or $algolia_search_enable {
|
2022-05-21 17:47:26 +08:00
|
|
|
.search-active {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-pop-overlay {
|
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
left: 0;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
transition: visibility .4s, background .4s;
|
|
|
|
visibility: hidden;
|
|
|
|
width: 100%;
|
2022-09-28 21:06:30 +08:00
|
|
|
z-index: $zindex-4;
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
.search-active & {
|
|
|
|
background: rgba(0, 0, 0, .3);
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-popup {
|
|
|
|
background: var(--card-bg-color);
|
|
|
|
border-radius: 5px;
|
|
|
|
height: 80%;
|
|
|
|
margin: auto;
|
|
|
|
transform: scale(0);
|
|
|
|
transition: transform .4s;
|
|
|
|
width: 700px;
|
|
|
|
|
|
|
|
.search-active & {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
@include mobile() {
|
|
|
|
border-radius: 0;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-icon, .popup-btn-close {
|
|
|
|
color: $grey-dark;
|
|
|
|
font-size: 18px;
|
|
|
|
padding: 0 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.popup-btn-close {
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:hover .fa {
|
|
|
|
color: $black-deep;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-header {
|
2022-10-05 22:56:13 +08:00
|
|
|
background: var(--content-bg-color);
|
2022-05-21 17:47:26 +08:00
|
|
|
border-top-left-radius: 5px;
|
|
|
|
border-top-right-radius: 5px;
|
|
|
|
display: flex;
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
input.search-input {
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
outline: 0;
|
|
|
|
width: 100%;
|
2022-10-05 22:56:13 +08:00
|
|
|
color: var(--text-color);
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
&::-webkit-search-cancel-button {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-result-container {
|
|
|
|
height: calc(100% - 55px);
|
|
|
|
overflow: auto;
|
2022-10-05 22:56:13 +08:00
|
|
|
padding: 0px 25px;
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
hr {
|
|
|
|
margin: 5px 0 10px;
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-05 22:56:13 +08:00
|
|
|
.search-footer {
|
|
|
|
background: var(--content-bg-color);
|
|
|
|
border-bottom-left-radius: 5px;
|
|
|
|
border-bottom-right-radius: 5px;
|
|
|
|
display: flex;
|
|
|
|
padding: 0 5px;
|
|
|
|
|
|
|
|
div {
|
|
|
|
color: var(--text-color);
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-hit-stats {
|
|
|
|
width: 65%;
|
|
|
|
font-size: $font-size-smaller;
|
|
|
|
|
|
|
|
}
|
|
|
|
.search-vendor {
|
|
|
|
width: 35%;
|
|
|
|
text-align: right;
|
|
|
|
font-size: $font-size-small;
|
|
|
|
|
|
|
|
img {
|
|
|
|
width: 68px;
|
|
|
|
margin: 5px;
|
|
|
|
vertical-align: middle;
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 17:47:26 +08:00
|
|
|
.search-result-list {
|
|
|
|
margin: 0 5px;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
a.search-result-title {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
p.search-result {
|
|
|
|
border-bottom: 1px dashed $grey-light;
|
|
|
|
padding: 5px 0;
|
|
|
|
}
|
|
|
|
}
|
2022-08-02 15:12:49 +08:00
|
|
|
|
|
|
|
mark.search-keyword {
|
|
|
|
background: transparent;
|
|
|
|
border-bottom: 1px dashed $red;
|
|
|
|
color: $red;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2022-05-21 17:47:26 +08:00
|
|
|
}
|
|
|
|
|
2022-05-21 19:18:19 +08:00
|
|
|
@if $algolia_search_enable {
|
2022-05-21 17:47:26 +08:00
|
|
|
.search-input-container {
|
|
|
|
flex-grow: 1;
|
|
|
|
|
|
|
|
form {
|
|
|
|
padding: 2px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-stats {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
img {
|
|
|
|
height: 1em;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.algolia-pagination {
|
|
|
|
// Override default style of ul
|
|
|
|
margin: 40px 0;
|
|
|
|
opacity: 1;
|
|
|
|
padding: 0;
|
|
|
|
|
2022-10-05 22:56:13 +08:00
|
|
|
.pagination {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
|
2022-05-21 17:47:26 +08:00
|
|
|
.pagination-item {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.current .page-number {
|
|
|
|
@extend %page-number-current;
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
.disabled-item {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 19:18:19 +08:00
|
|
|
@if $local_search_enable {
|
2022-05-21 17:47:26 +08:00
|
|
|
.search-popup {
|
|
|
|
.search-input-container {
|
|
|
|
flex-grow: 1;
|
|
|
|
padding: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.no-result {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-result-list {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-result-icon {
|
|
|
|
color: $grey-light;
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|