Skip to content

Commit

Permalink
Avoid theme flicker on reload in dark mode
Browse files Browse the repository at this point in the history
By loading the theme-switch earlier the nav bar background no longer flickers from bright to dark.
  • Loading branch information
JVMerkle committed Dec 8, 2024
1 parent 9793316 commit 381cda1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion templates/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@

<!-- scripts -->
<script src="{{root}}scripts/highlight.js"></script>
<script src="{{root}}scripts/theme-switch.js"></script>
1 change: 1 addition & 0 deletions templates/nav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
<li class="theme-item" onclick="changeThemeTo('dark');">Dark</li>
</ul>
</button>
<script src="{{root}}scripts/theme-switch.js"></script>
</ul>
</nav>

0 comments on commit 381cda1

Please sign in to comment.