redesign profile template

This commit is contained in:
f0x 2023-05-10 20:18:49 +02:00
commit c200c79bcd
3 changed files with 280 additions and 261 deletions

View file

@ -60,3 +60,20 @@ Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) =>
label.addEventListener("click", () => { setTimeout(update, 1); });
}
});
Array.from(document.getElementsByClassName("spoiler-details")).forEach((spoiler) => {
const button = spoiler.getElementsByClassName("button")[0];
if (button != undefined) {
function update() {
if (spoiler.open) {
button.textContent = "Show less";
} else {
button.textContent = "Show more";
}
}
update();
spoiler.addEventListener("toggle", update);
}
});