thesis align bottom

This commit is contained in:
Julie Blanc 2026-04-21 23:28:03 +02:00
parent 725306418d
commit ed5d47184d
6 changed files with 62 additions and 36 deletions

View file

@ -24,6 +24,17 @@ export default class beforeAll extends Handler {
intro.style.paddingTop = gap + "px";
}
let thesisList = pageElement.querySelectorAll('.thesis');
if(thesisList.length > 0 && pageContent){
let lastThesis = thesisList[thesisList.length - 1];
let firstThesis = thesisList[0];
let lastThesisBottom = lastThesis.getBoundingClientRect().bottom;
let pageContentBottom = pageContent.getBoundingClientRect().bottom;
let gap = pageContentBottom - lastThesisBottom;
gap = gap - 4; // snap on baseline
firstThesis.style.marginTop = gap + "px";
}
}
@ -194,7 +205,11 @@ function thesis(content){
thesisTitleDiv.classList.add('thesis-title');
const thesisP = document.createElement('p');
thesisP.textContent = strong.textContent;
var line = document.createElement('div');
line.classList.add('thesis-line');
thesisTitleDiv.appendChild(thesisP);
thesisTitleDiv.appendChild(line)
thesisWrapper.appendChild(thesisTitleDiv);
// Transform parent p into thesis-content