diff --git a/templates/moko-cassiopeia/index.php b/templates/moko-cassiopeia/index.php index c14f565..28b0e4d 100644 --- a/templates/moko-cassiopeia/index.php +++ b/templates/moko-cassiopeia/index.php @@ -101,10 +101,18 @@ $wa->useStyle('vendor.bootstrap-toc'); // Color theme (light + optional dark) $colorLightKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_LightColorName)); $colorDarkKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_DarkColorName)); - $lightKey = 'template.light.' . $colorLightKey; $darkKey = 'template.dark.' . $colorDarkKey; - +try { + $wa->useStyle('template.light.colors_standard'); +} catch (\Throwable $e) { + $wa->registerAndUseStyle('template.light.colors_standard', $templatePath . '/css/global/light/colors_standard.css'); +} +try { + $wa->useStyle('template.dark.colors_standard'); +} catch (\Throwable $e) { + $wa->registerAndUseStyle('template.dark.colors_standard', $templatePath . '/css/global/dark/colors_standard.css'); +} try { $wa->useStyle($lightKey); } catch (\Throwable $e) {