Skip to content

Commit

Permalink
Fix dark mode inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JuditKaramazov committed Jan 10, 2024
1 parent 8a9000d commit 020408f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/layouts/Base/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ const { pageTitle } = Astro.props
<html lang="en">
<Head {...Astro.props} />
<body>
<script is:inline>
const theme = localStorage.getItem('@karamablog/theme') || 'light'
document.documentElement.dataset.theme = theme
</script>

<Header />

<main class={styles.document} id="document">
Expand Down

0 comments on commit 020408f

Please sign in to comment.