mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Add a fade in out animation when the server process
This commit is contained in:
parent
92c2b1dd2d
commit
54afec58a3
@ -16,6 +16,7 @@ $('#search').on('input', function () {
|
||||
let numberOfDocuments = httpResults.data.length;
|
||||
count.innerHTML = `${numberOfDocuments}`;
|
||||
time.innerHTML = `${timeSpent}ms`;
|
||||
time.classList.remove('fade-in-out');
|
||||
|
||||
for (element of httpResults.data) {
|
||||
const elem = document.createElement('li');
|
||||
@ -49,6 +50,7 @@ $('#search').on('input', function () {
|
||||
beforeSend: function () {
|
||||
if (request !== null) {
|
||||
request.abort();
|
||||
time.classList.add('fade-in-out');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -68,3 +68,13 @@ em {
|
||||
padding-left: 10px;
|
||||
color: rgba(0,0,0,.9);
|
||||
}
|
||||
|
||||
@keyframes fadeInOut {
|
||||
0% { opacity: 1; }
|
||||
30% { opacity: 0.3; }
|
||||
100% { opacity: 1; }
|
||||
}
|
||||
|
||||
.fade-in-out {
|
||||
animation: fadeInOut ease 1s infinite;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user