Skip to content

Commit 1bee8d7

Browse files
authored
Merge pull request #28 from Dunkstormen/main
fix: snowfall height
2 parents 17516a1 + eb9186c commit 1bee8d7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/layout/Layout.astro

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import Snowfall from 'react-snowfall'
3434
<ViewTransitions />
3535
</head>
3636
<body class="bg-lightgrey w-full h-full min-h-screen text-black dark:text-white transition ease-in-out delay-50 flex flex-col items-center bg-[url('/img/skies.svg')] bg-cover">
37-
<div class="top-0 absolute -z-10 min-h-screen w-screen">
37+
<div id="snowfall" class="top-0 absolute -z-10 min-h-screen w-screen">
3838
<Snowfall color="#c7d0e6" client:only/>
3939
</div>
4040
<Nav />
@@ -72,6 +72,13 @@ import Snowfall from 'react-snowfall'
7272
window.localStorage.setItem("theme", theme);
7373
</script>
7474

75+
<script is:inline>
76+
const snowfallHeight = document.body.scrollHeight;
77+
const snowfallElement = document.getElementById('snowfall');
78+
79+
snowfallElement.style.height = `${snowfallHeight}px`;
80+
</script>
81+
7582
<style is:global>
7683
*::-webkit-scrollbar {
7784
height: 5px;

0 commit comments

Comments
 (0)