Skip to content

Commit

Permalink
chore: Sync Theme-Customs
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Andrés <[email protected]>
  • Loading branch information
DiegoAndresCortes committed Oct 14, 2024
1 parent f06266b commit f658c2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion themecustoms/Color/DarkMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private function js()
addJavaScriptVar('smf_theme_colormode', $context['theme_colormode'], true);

// Load the javascript file
loadJavascriptFile('custom/dark.js', ['async' => true, 'defer' => true, 'minimize' => true,],'smf_darkmode');
loadJavascriptFile('custom/dark.js', ['async' => false, 'defer' => true, 'minimize' => true,],'smf_darkmode');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion themecustoms/Color/Variants.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private function js() : void
addJavaScriptVar('smf_theme_variant', $context['theme_variant'], true);

// Load the javascript file
loadJavascriptFile('custom/variants.js', ['async' => true, 'defer' => true, 'minimize' => true,], 'smf_variants');
loadJavascriptFile('custom/variants.js', ['async' => false, 'defer' => true, 'minimize' => true,], 'smf_variants');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion themecustoms/Theme/Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function sceditor(array &$sce_options) : void
$sce_options['style'] = $settings['theme_url'] . '/css/compat/index.css"/><link rel="stylesheet" href="' . $sce_options['style'];

// Dark Mode?
if (!empty($context['theme_can_change_mode']) || $settings['st_theme_mode_default'] !== 'light') {
if (!empty($context['theme_can_change_mode']) || (!empty($settings['st_theme_mode_default']) && $settings['st_theme_mode_default'] !== 'light')) {
$sce_options['style'] = $settings['theme_url'] . '/css/compat/dark.css"' . (isset($context['theme_colormode']) && $context['theme_colormode'] == 'system' ? ' media="(prefers-color-scheme: dark)"' : '') . '/><link rel="stylesheet" href="' . $sce_options['style'];
}

Expand Down

0 comments on commit f658c2c

Please sign in to comment.