Display item counter next to search form. #6
2 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue