Is there a way to get a site to always default to light mode? I’m new to HTML and Hugo in general but this seems like its a pretty simple thing to fix.
// Get theme variation (day/night).
let defaultThemeVariation;
if ($('body').hasClass('dark')) {
// The `color_theme` of the site is dark.
defaultThemeVariation = 1;
} else if ($('.js-dark-toggle').length && window.matchMedia('(prefers-color-scheme: dark)').matches) {
// The visitor prefers dark themes and switching to the dark variation is allowed by admin.
defaultThemeVariation = 1;
} else {
// Default to day (light) theme.
defaultThemeVariation = 0;
}
let dark_mode = parseInt(localStorage.getItem('dark_mode') || defaultThemeVariation);
Thanks!