Hide grid of illustrations if there aren't any
This commit is contained in:
parent
b8de1cbb68
commit
cec8d1c4b7
|
@ -43,10 +43,12 @@ void tags_route(const httplib::Request& req, httplib::Response& res, const Confi
|
||||||
}
|
}
|
||||||
|
|
||||||
Element body("body", {
|
Element body("body", {
|
||||||
generate_header(req, config, search_results, query, tags, order, search_suggestions),
|
generate_header(req, config, search_results, query, tags, order, search_suggestions)
|
||||||
Element("br"),
|
|
||||||
generate_illusts_pager(req, config, search_results.illusts, page, "illusts")
|
|
||||||
});
|
});
|
||||||
|
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));
|
serve(req, res, config, tags_to_string(std::move(search_results.tag_translations), std::move(tags)), std::move(body));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue