Skip to content

Commit 1a68993

Browse files
committed
feat(layout): add persistent transition
1 parent ceacfd6 commit 1a68993

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/layouts/BaseLayout.astro

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ import { SITE } from "@/consts";
1616
<BaseHead title={`${title} - ${SITE.TITLE}`} description={description} />
1717
</head>
1818
<body>
19-
<GridBackground client:load />
20-
<Starry
21-
client:load
22-
minSize={0.5}
23-
maxSize={1.5}
24-
opacity={0.5}
25-
particleDensity={100}
26-
className="fixed h-full w-full"
27-
/>
19+
<div transition:persist="background-wrapper">
20+
<GridBackground client:load />
21+
<Starry
22+
client:load
23+
minSize={0.5}
24+
maxSize={1.5}
25+
opacity={0.5}
26+
particleDensity={100}
27+
className="fixed h-full w-full"
28+
/>
29+
</div>
2830
<Header />
2931
<Navbar />
3032
<main class="z-10" transition:animate="slide">

0 commit comments

Comments
 (0)