🐛 Fix scrolling when drawer is open

This commit is contained in:
2025-08-31 10:51:32 -04:00
parent 4676b8de32
commit c07efd1481
2 changed files with 18 additions and 11 deletions
+11 -1
View File
@@ -30,7 +30,11 @@ const title = Astro.props.title || Astro.props.frontmatter?.title || 'Unknown';
href={`${Astro.site}rss.xml`}
/><title>{`ghall.space - ${title}`}</title>
</head>
<body class="layout-simple">
<body
class="layout-simple"
x-data="{ drawerOpen: false }"
:class="drawerOpen ? 'lock-scroll' : ''"
>
<Header />
<main>
<slot />
@@ -38,3 +42,9 @@ const title = Astro.props.title || Astro.props.frontmatter?.title || 'Unknown';
<Footer />
</body>
</html>
<style>
.lock-scroll {
overflow: hidden;
}
</style>