mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-03 17:54:14 +02:00
Add total number of subresults per main result
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
a56969149f
commit
94fca47a7d
|
|
@ -146,15 +146,16 @@ search backend.
|
|||
} else {
|
||||
results.forEach((r, index_r) => {
|
||||
// Add the main result's page title.
|
||||
$searchResultBody.append(
|
||||
$("<a>")
|
||||
.addClass("d-block")
|
||||
$searchResultBody.append($("<div>")
|
||||
.append($("<a>")
|
||||
.css({
|
||||
fontSize: "1.2rem",
|
||||
})
|
||||
.attr("href", r.url)
|
||||
.text(r.meta.title)
|
||||
);
|
||||
.text(r.meta.title))
|
||||
.append($("<span>")
|
||||
.addClass("text-body-secondary")
|
||||
.text(` – ${r.sub_results.length} result(s)`)));
|
||||
|
||||
// Render the first 3 subresults per page and wrap the rest
|
||||
// in a collapsed container.
|
||||
|
|
|
|||
Loading…
Reference in a new issue