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:
Johannes Marbach 2026-03-20 13:38:12 +01:00
parent 94fca47a7d
commit 9edb9b3e5b

View file

@ -165,7 +165,7 @@ search backend.
r.sub_results.forEach((s, index_s) => { r.sub_results.forEach((s, index_s) => {
if (index_s === LIMIT) { if (index_s === LIMIT) {
const wrapper_id = `collapssible-subresults-${index_r}`; const wrapper_id = `collapssible-subresults-${index_r}`;
const $action = $("<span>").text("Show"); const $action = $("<span>").text("Show");
const $expander = $("<a>") const $expander = $("<a>")
.attr("data-bs-toggle", "collapse") .attr("data-bs-toggle", "collapse")
.attr("data-bs-target", `#${wrapper_id}`) .attr("data-bs-target", `#${wrapper_id}`)
@ -173,7 +173,6 @@ search backend.
.attr("role", "button") .attr("role", "button")
.attr("aria-expanded", "false") .attr("aria-expanded", "false")
.attr("aria-controls", wrapper_id) .attr("aria-controls", wrapper_id)
.css("margin-left", "0.5rem")
.append($action) .append($action)
.append($("<span>").text(` ${r.sub_results.length - index_s} more result(s) from ${r.meta.title}`)); .append($("<span>").text(` ${r.sub_results.length - index_s} more result(s) from ${r.meta.title}`));
@ -181,14 +180,13 @@ search backend.
$wrapper = $("<div>") $wrapper = $("<div>")
.addClass("collapse") .addClass("collapse")
.attr("id", wrapper_id) .attr("id", wrapper_id)
.on("hide.bs.collapse", _ => $action.text("Show")) .on("hide.bs.collapse", _ => $action.text("Show"))
.on("show.bs.collapse", _ => $action.text("Hide")); .on("show.bs.collapse", _ => $action.text("Hide"));
$searchResultBody.append($wrapper); $searchResultBody.append($wrapper);
} }
const $entry = $("<div>") const $entry = $("<div>")
.css("margin-top", "0.5rem") .css("margin-top", "0.5rem");
.css("margin-left", "0.5rem");
$entry.append( $entry.append(
$("<a>") $("<a>")