mirror of
https://0xacab.org/anarsec/anarsec.guide.git
synced 2025-06-23 14:04:08 -04:00
typst level 1 page break
This commit is contained in:
parent
8428d86f8b
commit
32784a25be
3 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue