Add Results label

Shows "x results" label where x = number of books based on filters
This commit is contained in:
Nikhil Tanwar 2023-02-16 02:29:18 +05:30
parent a48e2e6f06
commit f843ea48f0
2 changed files with 7 additions and 1 deletions

View File

@ -69,7 +69,8 @@ std::string HTMLDumper::dumpPlainHTML(kiwix::Filter filter) const
kainjow::mustache::object{ kainjow::mustache::object{
{"root", rootLocation}, {"root", rootLocation},
{"books", booksData }, {"books", booksData },
{"searchQuery", searchQuery} {"searchQuery", searchQuery},
{"resultsCount", to_string(filteredBooks.size())}
} }
); );
} }

View File

@ -54,6 +54,10 @@
grid-row: 2 / 3; grid-row: 2 / 3;
} }
.kiwixHomeBody__results {
flex-basis: 100%;
}
#book__title>a, .book__download a { #book__title>a, .book__download a {
text-decoration: none; text-decoration: none;
all: unset; all: unset;
@ -69,6 +73,7 @@
</div> </div>
<div class="kiwixHomeBody"> <div class="kiwixHomeBody">
<div class="book__list"> <div class="book__list">
<h3 class="kiwixHomeBody__results">{{resultsCount}} results</h3>
{{#books}} {{#books}}
<div class="book__wrapper"> <div class="book__wrapper">
<div class="book__link__wrapper"> <div class="book__link__wrapper">