);
    const savedPosition = localStorage.getItem("navbarScrollPosition");
    if (savedPosition !== null) {
        navbar.scrollTop = parseInt(savedPosition, 10);
    }
}

function adjustSidenavOffset() {
    const topMenu = document.getElementById("topmenu");
    const navbar = document.getElementById("theSideNav");

    if (topMenu) {
        const topMenuHeight = topMenu.offsetHeight;
        document.documentElement.style.setProperty('--top-menu-height', `${topMenuHeight}px`);
    }
}

adjustSidenavOf