mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-03 17:54:14 +02:00
Add triangle indicator on expander buttons and remove left margins
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
94fca47a7d
commit
9edb9b3e5b
|
|
@ -165,7 +165,7 @@ search backend.
|
|||
r.sub_results.forEach((s, index_s) => {
|
||||
if (index_s === LIMIT) {
|
||||
const wrapper_id = `collapssible-subresults-${index_r}`;
|
||||
const $action = $("<span>").text("Show");
|
||||
const $action = $("<span>").text("▶ Show");
|
||||
const $expander = $("<a>")
|
||||
.attr("data-bs-toggle", "collapse")
|
||||
.attr("data-bs-target", `#${wrapper_id}`)
|
||||
|
|
@ -173,7 +173,6 @@ search backend.
|
|||
.attr("role", "button")
|
||||
.attr("aria-expanded", "false")
|
||||
.attr("aria-controls", wrapper_id)
|
||||
.css("margin-left", "0.5rem")
|
||||
.append($action)
|
||||
.append($("<span>").text(` ${r.sub_results.length - index_s} more result(s) from ${r.meta.title}`));
|
||||
|
||||
|
|
@ -181,14 +180,13 @@ search backend.
|
|||
$wrapper = $("<div>")
|
||||
.addClass("collapse")
|
||||
.attr("id", wrapper_id)
|
||||
.on("hide.bs.collapse", _ => $action.text("Show"))
|
||||
.on("show.bs.collapse", _ => $action.text("Hide"));
|
||||
.on("hide.bs.collapse", _ => $action.text("▶ Show"))
|
||||
.on("show.bs.collapse", _ => $action.text("▼ Hide"));
|
||||
$searchResultBody.append($wrapper);
|
||||
}
|
||||
|
||||
const $entry = $("<div>")
|
||||
.css("margin-top", "0.5rem")
|
||||
.css("margin-left", "0.5rem");
|
||||
.css("margin-top", "0.5rem");
|
||||
|
||||
$entry.append(
|
||||
$("<a>")
|
||||
|
|
|
|||
Loading…
Reference in a new issue