Skip to content

Commit

Permalink
fix scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Dec 10, 2023
1 parent 622b0b3 commit 7f8d1a2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions documentation/src/components/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ type Props = MarkdownLayoutProps<{
const navMenu = document.getElementById("mobile-nav-menu")!;
if (navMenu.classList.contains("hidden")) {
navMenu.classList.remove("hidden");
document.body.classList.add("overflow-hidden");
} else {
closeMenu();
document.getElementById("mobile-nav-menu")!.classList.add("hidden");
}
});

document.getElementById("mobile-nav-close-button")!.addEventListener("click", closeMenu);

function closeMenu() {
document.getElementById("mobile-nav-menu")!.classList.add("hidden");
document.body.classList.remove("overflow-hidden");
}
</script>

<style>
Expand Down

0 comments on commit 7f8d1a2

Please sign in to comment.