màj du contenu

This commit is contained in:
Valentin
2023-06-27 10:43:49 +02:00
parent 2d3da66526
commit 05baac95de
16 changed files with 110 additions and 25 deletions
@@ -224,3 +224,14 @@ img {
.tripleimgs2 img:last-of-type {
width: calc(62.5% - 1mm);
}
.imgfullspreadleft {
break-before: left;
break-after: left;
max-height: 100%;
}
.imgfullspreadleft img {
height: 100%;
width: auto;
}
@@ -135,7 +135,14 @@
if (moments[i].previousElementSibling?.tagName === "P"
&& moments[i].previousElementSibling == moments[i].parentNode.firstElementChild) {
moments[i].parentNode.removeChild(moments[i].parentNode.firstElementChild);
}
}
}
// enlever les paragraphes vides
let paragraphes = document.querySelectorAll("p");
for (let i = 0; i < paragraphes.length; i++) {
if (paragraphes[i].innerHTML == "") {
paragraphes[i].remove();
}
}
// images collées en bas
let bottomImgs = document.getElementsByClassName('bottomimg');
@@ -143,6 +150,16 @@
let page = bottomImgs[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
bottomImgs[i].style.transform = 'translateY(' + (page.getBoundingClientRect().bottom - bottomImgs[i].firstElementChild.getBoundingClientRect().bottom) + 'px)';
}
// éléments justifiés pas nécessaires
let justifiedSplitEl = document.querySelectorAll("[data-align-last-split-element='justify']");
for (let i = 0; i < justifiedSplitEl.length; i++) {
for (let j = 0; j < justifiedSplitEl[i].childNodes.length; j++) {
let elStyle = justifiedSplitEl[i].childNodes[j].style;
if (elStyle != undefined) {
elStyle.textAlignLast = "left";
}
}
}
}
}
Paged.registerHandlers(setMarginTexts);