correction bug imgsmall_bottom

This commit is contained in:
Valentin
2023-07-24 16:56:38 +02:00
parent 1eb23cec8e
commit 1c79c95248
4 changed files with 13 additions and 8 deletions
@@ -1,4 +1,4 @@
last_checked: 1690072671
last_checked: 1690208978
data:
-
title: 'macOS 13.0 Ventura Apache Setup: Upgrading Homebrew'
@@ -39,7 +39,7 @@ data:
title: 'Grav 1.7 CLI Self-Upgrade Bug'
url: 'https://getgrav.org/blog/grav-170-cli-self-upgrade-bug'
date: 1611222900
nicetime: '2 years ago'
nicetime: '3 years ago'
-
title: 'Grav 1.7 Released!'
url: 'https://getgrav.org/blog/grav-1.7-released'
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
last_checked: 1690085460
last_checked: 1690208978
data:
feed:
-
+9 -4
View File
@@ -50,12 +50,17 @@ class setMarginTexts extends Paged.Handler {
let bottomVignettes = document.querySelectorAll('.imgsmall_bottom'); // pour les images en bas dans les pages avec du texte
for (let bottomVignette of bottomVignettes) {
let pageBottom = bottomVignette.closest('.pagedjs_area').getBoundingClientRect().bottom;
let textBottom = bottomVignette.previousElementSibling.getBoundingClientRect().bottom;
let vignetteSize = bottomVignette.getBoundingClientRect().height;
if (bottomVignette.previousElementSibling.classList.contains('labeur')) {
bottomVignette.style.marginTop = `${(pageBottom - textBottom) - vignetteSize}px`;
if (bottomVignette.previousElementSibling) {
let textBottom = bottomVignette.previousElementSibling.getBoundingClientRect().bottom;
if (bottomVignette.previousElementSibling.classList.contains('labeur')) {
bottomVignette.style.marginTop = `${(pageBottom - textBottom) - vignetteSize}px`;
}
bottomVignette.style.transform = 'translateY(12px)';
} else {
let vignetteBottom = bottomVignette.getBoundingClientRect().bottom;
bottomVignette.style.transform = `translateY(${pageBottom - vignetteBottom}px)`;
}
bottomVignette.style.transform = 'translateY(12px)';
}
// éléments justifiés pas nécessaires
let justifiedSplitEl = document.querySelectorAll("[data-align-last-split-element='justify']");