|
|
|
@ -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));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -72,7 +74,7 @@ static inline Element generate_header(const httplib::Request& req, const Config&
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
if (!search_suggestions.empty()) {
|
|
|
|
|
header.nodes.push_back(generate_search_suggestions(req, config, tags, search_suggestions, search_results.illusts.total_illusts == 0));
|
|
|
|
|
header.nodes.push_back(generate_search_suggestions(req, config, tags, search_suggestions, search_results.illusts.total_pages <= 1));
|
|
|
|
|
}
|
|
|
|
|
header.nodes.push_back(Element("br"));
|
|
|
|
|
|
|
|
|
|