Skip to content

Commit

Permalink
dark mode and page transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbloxhub committed Jul 23, 2023
1 parent b6f9685 commit c743817
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ export default defineConfig({
integrations: [
svelte(),
UnoCSS()
]
],
experimental: {
viewTransitions: true
}
})
4 changes: 3 additions & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import Header from "../components/Header.astro"
import { ViewTransitions } from "astro:transitions"
interface Props {
title: string
}
Expand All @@ -16,9 +17,10 @@ const { title } = Astro.props
<link rel="icon" href="https://github.com/bitbloxhub.png">
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
<ViewTransitions />
<script src="https://instant.page/5.2.0" type="module" />
</head>
<body>
<body transition:animate="morph" class="dark:bg-black dark:text-white">
<Header />
<slot />
</body>
Expand Down

0 comments on commit c743817

Please sign in to comment.