Skip to content

Commit a7f486f

Browse files
authored
keep dark mode inside the (site.enable_darkmode) conditional (#3233)
Hi, I noticed some weird behavior when I turned dark mode off (some of the text seemed to disappear, it became white :) ) I traced it to: {% if site.enable_darkmode %} in head.liquid where some darkmode features are place before the if statement. When putting it inside the if statement then the weird behavior was solved; see the pull request here :) Cheers, Jan
1 parent 9cda66f commit a7f486f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/head.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url | bust_css_cache }}">
7070
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
7171

72-
<!-- Dark Mode -->
73-
<script src="{{ '/assets/js/theme.js' | relative_url | bust_file_cache }}"></script>
7472
{% if site.enable_darkmode %}
73+
<!-- Dark Mode -->
74+
<script src="{{ '/assets/js/theme.js' | relative_url | bust_file_cache }}"></script>
7575
<link
7676
defer
7777
rel="stylesheet"

0 commit comments

Comments
 (0)