Dark mode by default.

This commit is contained in:
justin committed 2025-07-30 19:33:16 -07:00
1 parent 460edc81f3
commit b9ba73c1ef
1 file changed
+8 -2
+8 -2
View File
@@ -148,8 +148,8 @@ def generate_html(questions):
<div class="settings"> <div class="settings">
<span class="gear-icon">&#9881;</span> <span class="gear-icon">&#9881;</span>
<div class="settings-menu" id="settingsMenu"> <div class="settings-menu" id="settingsMenu">
<label><input type="radio" name="theme" value="light" checked> Light Mode</label><br> <label><input type="radio" name="theme" value="light">Light Mode</label><br>
<label><input type="radio" name="theme" value="dark"> Dark Mode</label> <label><input type="radio" name="theme" value="dark" checked>Dark Mode</label>
</div> </div>
</div> </div>
@@ -260,6 +260,12 @@ def generate_html(questions):
}} }}
}}); }});
}}); }});
// Set default theme to dark on page load
window.addEventListener('DOMContentLoaded', () => {{
body.classList.add('dark-mode');
settingsMenu.classList.add('dark');
}});
</script> </script>
</body> </body>
</html> </html>