hexo-theme-keep/source/css/layout/_partial/local-search.styl

104 lines
1.5 KiB
Stylus

@require '../common/variables.styl'
$icon-size = 18px;
$keyword-red = #ff2a2a;
.search-pop-overlay {
background: rgba(0, 0, 0, .3);
display: none;
height: 100%;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
}
.search-popup {
background: #f5f5f5;
border-radius: 5px;
height: 80%;
left: calc(50% - 350px);
position: fixed;
top: 10%;
width: 700px;
z-index: 1001;
.search-icon, .popup-btn-close {
color: $default-font-color;
font-size: $icon-size;
padding: 0 10px;
}
.popup-btn-close {
cursor: pointer;
&:hover .fa {
color: #222;
}
}
.search-header {
background: #eee;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
display: flex;
padding: 10px;
}
}
input.search-input {
background: transparent;
border: 0;
outline: 0;
width: 100%;
font-size: 16px;
&::-webkit-search-cancel-button {
display: none;
}
}
.search-popup {
.search-input-container {
flex-grow: 1;
padding: 2px;
}
ul.search-result-list {
margin: 5px;
padding: 0;
width: 100%;
}
p.search-result {
border-bottom: 1px dashed #ccc;
padding: 5px 0;
}
a.search-result-title {
font-weight: bold;
}
.search-keyword {
border-bottom: 1px dashed $keyword-red;
color: $keyword-red;
font-weight: bold;
}
#search-result {
display: flex;
height: calc(100% - 55px);
overflow: auto;
padding: 5px 25px;
}
#no-result {
color: #ccc;
margin: auto;
}
}