Add client-side search, modified from atom from https://github.com/chinchang/super-search
This commit is contained in:
80
static/super-search.css
Normal file
80
static/super-search.css
Normal file
@@ -0,0 +1,80 @@
|
||||
/* super-search
|
||||
Author: Kushagra Gour (http://kushagragour.in)
|
||||
MIT Licensed
|
||||
*/
|
||||
.super-search-btn {
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
top: 15px;
|
||||
fill: #DDD;
|
||||
}
|
||||
.super-search-btn:hover {
|
||||
fill: #BBB;
|
||||
}
|
||||
|
||||
.super-search {
|
||||
position: fixed;
|
||||
background-color: rgba(100, 100, 100, 0.85);
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
transition: 0.2s ease;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
.super-search__close-btn {
|
||||
fill: #DDD;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 15px;
|
||||
z-index: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
.super-search__input {
|
||||
border: 0;
|
||||
font-size: 50px;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
color: #999;
|
||||
width: 100%;
|
||||
padding: 10px 31px;
|
||||
text-align: center;
|
||||
transform: translateY(-100%);
|
||||
transition: 0.15s ease-out 150ms;
|
||||
}
|
||||
.is-active .super-search__input {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.super-search__results {
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
height: calc(100% - 110px);
|
||||
transition: 0.2s ease;
|
||||
}
|
||||
.super-search__results.is-hidden {
|
||||
opacity: 0;
|
||||
transform: translateY(-1vh);
|
||||
}
|
||||
|
||||
.super-search__results > li > a {
|
||||
display: block;
|
||||
position: relative;
|
||||
background-color: #f9f9f9;
|
||||
color: #666;
|
||||
padding: 17px;
|
||||
margin: 12px 14px;
|
||||
box-shadow: 0 3px 4px rgba(0,0,0,0.1);
|
||||
}
|
||||
.super-search__result-date {
|
||||
color: #BBB;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
}
|
||||
.super-search.is-active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
Reference in New Issue
Block a user