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:
@@ -33,9 +33,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);
|
||||
|
||||
@@ -29,9 +29,9 @@ $params = $this->params;
|
||||
$wa = $this->getWebAssetManager();
|
||||
|
||||
// Template params
|
||||
$params_LightColorName = (string) $params->get('colorLightName', 'standard'); // standard|alternative|custom
|
||||
$params_LightColorName = (string) $params->get('colorLightName', 'standard'); // standard|custom
|
||||
|
||||
$params_DarkColorName = (string) $params->get('colorDarkName', 'standard'); // standard|alternative|custom
|
||||
$params_DarkColorName = (string) $params->get('colorDarkName', 'standard'); // standard|custom
|
||||
|
||||
$params_googletagmanager = $params->get('googletagmanager', false);
|
||||
$params_googletagmanagerid = $params->get('googletagmanagerid', '');
|
||||
|
||||
@@ -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
|
||||
?>
|
||||
|
||||
@@ -100,17 +100,7 @@
|
||||
"uri": "media/templates/site/mokocassiopeia/css/theme/dark.standard.min.css",
|
||||
"attributes": {"media": "all"}
|
||||
},
|
||||
{
|
||||
"name": "template.dark.alternative",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/mokocassiopeia/css/theme/dark.alternative.css",
|
||||
"attributes": {"media": "all"}
|
||||
},
|
||||
{
|
||||
"name": "template.dark.alternative.min",
|
||||
"type": "style",
|
||||
"uri": "media/templates/site/mokocassiopeia/css/theme/dark.alternative.min.css"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "template.dark.custom",
|
||||
"type": "style",
|
||||
|
||||
Reference in New Issue
Block a user