Indicate failed searches by background color.
All checks were successful
deployment-on-pull-request / deployment (pull_request) Successful in 1m11s

This commit is contained in:
Shy 2024-05-07 15:00:04 +02:00
parent ccc243376d
commit 612b626557
2 changed files with 13 additions and 0 deletions

View file

@ -7,6 +7,11 @@ h1, h1 a {
color: #dfaa37; /* C4 Yellow */
}
#search.failed {
color: #200;
background-color: #ec6d5f;
}
#itemcount {
display: inline-block;
margin-right: 1ch;

View file

@ -95,6 +95,14 @@ function search(e) {
elem.classList.add('filtered');
}
}
// Indicate failed search.
if (count) {
e.target.classList.remove('failed');
} else {
e.target.classList.add('failed');
}
updateCounter(count);
}