Hide grid of illustrations if there aren't any

This commit is contained in:
blankie 2023-05-02 15:48:45 +07:00
parent b8de1cbb68
commit cec8d1c4b7
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 5 additions and 3 deletions

View File

@ -43,10 +43,12 @@ void tags_route(const httplib::Request& req, httplib::Response& res, const Confi
}
Element body("body", {
generate_header(req, config, search_results, query, tags, order, search_suggestions),
Element("br"),
generate_illusts_pager(req, config, search_results.illusts, page, "illusts")
generate_header(req, config, search_results, query, tags, order, search_suggestions)
});
if (!search_results.illusts.illusts.empty()) {
body.nodes.push_back(Element("br"));
body.nodes.push_back(generate_illusts_pager(req, config, search_results.illusts, page, "illusts"));
}
serve(req, res, config, tags_to_string(std::move(search_results.tag_translations), std::move(tags)), std::move(body));
}