Skip to content

Commit

Permalink
Merge pull request #187 from mortendk/darkmode
Browse files Browse the repository at this point in the history
Update html.njk
  • Loading branch information
mortendk authored Oct 10, 2022
2 parents d5d1924 + dea4695 commit 7b3b3d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/themes/grunn/layouts/html.njk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html
lang="en"
class="scroll-smooth dark"
x-data="{ darkMode: localStorage.getItem('themeDarkMode') != 'true' }"
class="scroll-smooth"
x-data="{ darkMode: localStorage.getItem('themeDarkMode') == 'true' }"
x-init="$watch('darkMode', val => localStorage.setItem('themeDarkMode', val))"
x-bind:class="{ 'dark': darkMode }"
>
Expand Down

0 comments on commit 7b3b3d1

Please sign in to comment.