Remove alternative palette refs and make custom palette loading conditional

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-08 01:31:14 +00:00
parent dc5b59c973
commit 2b385e57ab
4 changed files with 17 additions and 20 deletions

View File

@@ -45,9 +45,9 @@ $document = $app->getDocument();
$wa = $document->getWebAssetManager();
// Template params
$params_LightColorName = (string) $this->params->get('colorLightName', 'standard'); // standard|alternative|custom
$params_LightColorName = (string) $this->params->get('colorLightName', 'standard'); // standard|custom
$params_DarkColorName = (string) $this->params->get('colorDarkName', 'standard'); // standard|alternative|custom
$params_DarkColorName = (string) $this->params->get('colorDarkName', 'standard'); // standard|custom
$params_googletagmanager = $this->params->get('googletagmanager', false);
$params_googletagmanagerid = $this->params->get('googletagmanagerid', null);
@@ -230,9 +230,16 @@ $params_rightIcon = htmlspecialchars($this->params->get('drawerRightIco
// Load all theme palette stylesheets (static loading for theme switcher compatibility)
$wa->useStyle('template.light.standard'); // css/theme/light.standard.css
$wa->useStyle('template.dark.standard'); // css/theme/dark.standard.css
$wa->useStyle('template.light.custom'); // css/theme/light.custom.css
$wa->useStyle('template.dark.custom'); // css/theme/dark.custom.css
$wa->useStyle('template.dark.alternative'); // css/theme/dark.alternative.css
// Load custom palettes if they exist (optional user customizations)
if (file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/light.custom.css'))
{
$wa->useStyle('template.light.custom');
}
if (file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/dark.custom.css'))
{
$wa->useStyle('template.dark.custom');
}
$wa->useStyle('template.user'); // css/user.css
?>