From dfbc20b9928fdfdd6319a0f618fb82ec9c77ba3d Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:52:50 -0600 Subject: [PATCH] Added `colors_standard.css` fallback --- templates/moko-cassiopeia/index.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) {