Add simple color loop when loading query.
This commit is contained in:
parent
bdda2f3676
commit
210a508a90
@ -67,6 +67,7 @@ function _codigoparallevar_enable_search_box(selector, options) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastVal = val;
|
lastVal = val;
|
||||||
|
resultsBox.classList.add('loading');
|
||||||
|
|
||||||
const uri = SEARCH_ENDPOINT + '?q=' + encodeURIComponent(val);
|
const uri = SEARCH_ENDPOINT + '?q=' + encodeURIComponent(val);
|
||||||
let query = fetch(uri);
|
let query = fetch(uri);
|
||||||
@ -79,6 +80,7 @@ function _codigoparallevar_enable_search_box(selector, options) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultsBox.classList.remove('loading');
|
||||||
resultsList.innerHTML = '';
|
resultsList.innerHTML = '';
|
||||||
for (const list of [
|
for (const list of [
|
||||||
body.results.notes.filter(n => n.is_todo !== "1"),
|
body.results.notes.filter(n => n.is_todo !== "1"),
|
||||||
|
@ -84,6 +84,29 @@ body nav input {
|
|||||||
border-bottom: 1px solid #000;
|
border-bottom: 1px solid #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes loading-query {
|
||||||
|
from {
|
||||||
|
border-bottom-color: hsl(0 80% 40%);
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
border-bottom-color: hsl(80 80% 40%);
|
||||||
|
}
|
||||||
|
60% {
|
||||||
|
border-bottom-color: hsl(180 80% 40%);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
border-bottom-color: hsl(360 80% 40%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.results-box-container .results-box.loading input {
|
||||||
|
animation-name: loading-query;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
animation-duration: 2s;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
}
|
||||||
|
|
||||||
/* Search box results */
|
/* Search box results */
|
||||||
.results-box ul {
|
.results-box ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user