From f843ea48f0a373e738cf71229f279622306ea9bd Mon Sep 17 00:00:00 2001 From: Nikhil Tanwar <2002nikhiltanwar@gmail.com> Date: Thu, 16 Feb 2023 02:29:18 +0530 Subject: [PATCH] Add Results label Shows "x results" label where x = number of books based on filters --- src/html_dumper.cpp | 3 ++- static/templates/no_js_library_page.html | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/html_dumper.cpp b/src/html_dumper.cpp index 6cef6b6b9..d11a0b5da 100644 --- a/src/html_dumper.cpp +++ b/src/html_dumper.cpp @@ -69,7 +69,8 @@ std::string HTMLDumper::dumpPlainHTML(kiwix::Filter filter) const kainjow::mustache::object{ {"root", rootLocation}, {"books", booksData }, - {"searchQuery", searchQuery} + {"searchQuery", searchQuery}, + {"resultsCount", to_string(filteredBooks.size())} } ); } diff --git a/static/templates/no_js_library_page.html b/static/templates/no_js_library_page.html index 6a43185e5..9a791b050 100644 --- a/static/templates/no_js_library_page.html +++ b/static/templates/no_js_library_page.html @@ -54,6 +54,10 @@ grid-row: 2 / 3; } + .kiwixHomeBody__results { + flex-basis: 100%; + } + #book__title>a, .book__download a { text-decoration: none; all: unset; @@ -69,6 +73,7 @@