typst level 1 page break

This commit is contained in:
anarsec 2024-04-18 16:54:58 +00:00
parent 8428d86f8b
commit 32784a25be
No known key found for this signature in database
3 changed files with 3 additions and 7 deletions

View file

@ -30,8 +30,8 @@
const elemAbsBottom = elemRect.bottom - bodyRect.top;
const h = (window.innerHeight || document.documentElement.clientHeight);
document.querySelector(".menu").style = "position: sticky; top: 48px;";
const minScroll = tocIndex.offsetTop - document.querySelector(".menu").clientHeight + tocIndex.offsetHeight + 50;
const maxScroll = tocIndex.offsetTop - tocIndex.offsetHeight - 50;
const minScroll = tocItems[tocIndex].offsetTop - document.querySelector(".menu").clientHeight + tocItems[tocIndex].offsetHeight + 50;
const maxScroll = tocItems[tocIndex].offsetTop - tocItems[tocIndex].offsetHeight - 50;
if(document.querySelector(".menu").scrollTop < minScroll){
document.querySelector(".menu").scrollTop = minScroll;
}