gaa unicode entretiens

This commit is contained in:
Julie Blanc 2026-03-17 15:07:01 +01:00
parent a34e879296
commit fe9a3228a8
3 changed files with 120 additions and 71 deletions

View file

@ -9,9 +9,9 @@ export default class itemsDecor extends Handler {
createDecor(symbol, sizes, sizeClass) {
createDecor(symbol, sizes, sizeClass, baseClass = "decor-h3") {
const div = document.createElement("div");
div.className = `decor-h3 ${sizeClass}`;
div.className = `${baseClass} ${sizeClass}`;
sizes.forEach((n, i) => {
const line = document.createElement("div");
line.dataset.count = i + 1;
@ -43,6 +43,7 @@ export default class itemsDecor extends Handler {
return line;
}
processTitle(subtitle, symbol, withDecor, isLeft) {
if (subtitle.querySelector(".subtitle-line")) return;
@ -131,6 +132,20 @@ export default class itemsDecor extends Handler {
subtitle.parentNode.insertBefore(container, subtitle);
container.appendChild(subtitle);
});
pageElement.querySelectorAll("h6").forEach(h6 => {
if (h6.closest(".h6_container")) return;
const smallSizes = [1, 2, 3, 2, 1];
const bigSizes = [1, 2, 3, 4, 5, 4, 3, 2, 1];
const firstDecor = isLeft
? this.createDecor(symbol, smallSizes, "decor-h6_small", "decor-h6")
: this.createDecor(symbol, bigSizes, "decor-h6_big", "decor-h6");
const container = document.createElement("div");
container.className = "h6_container";
h6.parentNode.insertBefore(container, h6);
container.appendChild(firstDecor);
container.appendChild(h6);
});
}