Compare commits
3 Commits
b8de1cbb68
...
48dbc8e978
Author | SHA1 | Date |
---|---|---|
|
48dbc8e978 | |
|
8d61ca4ee3 | |
|
cec8d1c4b7 |
|
@ -56,5 +56,5 @@ static inline bool is_autoclosing_tag(const char* tag) {
|
|||
|| !strncmp(tag, "meta", 5)
|
||||
|| !strncmp(tag, "img", 4)
|
||||
|| !strncmp(tag, "br", 3)
|
||||
|| !strncmp(tag, "label", 6);
|
||||
|| !strncmp(tag, "input", 6);
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue