Rename custom palette files and hard-code theme style registration

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-08 00:54:42 +00:00
parent eb5f718039
commit cd5b94da94
4 changed files with 13 additions and 22 deletions

View File

@@ -88,22 +88,6 @@ $templatePath = 'media/templates/site/mokocassiopeia';
// Core template CSS // Core template CSS
$wa->useStyle('template.base'); // css/template.css $wa->useStyle('template.base'); // css/template.css
// Theme palettes (light + dark)
// Always load standard theme, then load custom if selected
$wa->useStyle('template.light.standard');
$wa->useStyle('template.dark.standard');
// Load custom or alternative themes if selected
if ($params_LightColorName === 'custom') {
$wa->useStyle('template.light.custom');
}
if ($params_DarkColorName === 'custom') {
$wa->useStyle('template.dark.custom');
} elseif ($params_DarkColorName === 'alternative') {
$wa->useStyle('template.dark.alternative');
}
// Scripts // Scripts
$wa->useScript('template.js'); $wa->useScript('template.js');
@@ -251,6 +235,13 @@ $wa->useStyle('template.user'); // css/user.css
<?php if (trim($params_custom_head_start)) : ?><?php echo $params_custom_head_start; ?><?php endif; ?> <?php if (trim($params_custom_head_start)) : ?><?php echo $params_custom_head_start; ?><?php endif; ?>
<jdoc:include type="head" /> <jdoc:include type="head" />
<!-- Theme Palettes: Always load standard themes, custom themes loaded if present -->
<link rel="stylesheet" href="<?php echo Uri::root(true); ?>/media/templates/site/mokocassiopeia/css/theme/light.standard.css" media="all" />
<link rel="stylesheet" href="<?php echo Uri::root(true); ?>/media/templates/site/mokocassiopeia/css/theme/dark.standard.css" media="all" />
<link rel="stylesheet" href="<?php echo Uri::root(true); ?>/media/templates/site/mokocassiopeia/css/theme/light.custom.css" media="all" />
<link rel="stylesheet" href="<?php echo Uri::root(true); ?>/media/templates/site/mokocassiopeia/css/theme/dark.custom.css" media="all" />
<link rel="stylesheet" href="<?php echo Uri::root(true); ?>/media/templates/site/mokocassiopeia/css/theme/dark.alternative.css" media="all" />
<?php if ($params_theme_enabled) : ?> <?php if ($params_theme_enabled) : ?>
<script> <script>
// Early theme application to avoid FOUC // Early theme application to avoid FOUC

View File

@@ -17,18 +17,18 @@ Template files are provided for both light and dark themes with complete Bootstr
| File | Theme | Description | | File | Theme | Description |
|------|-------|-------------| |------|-------|-------------|
| `theme_custom_light.css` | Light | Custom light theme with all Bootstrap button variants | | `light.custom.css` | Light | Custom light theme with all Bootstrap button variants |
| `theme_custom_dark.css` | Dark | Custom dark theme with all Bootstrap button variants | | `dark.custom.css` | Dark | Custom dark theme with all Bootstrap button variants |
### Using Custom Theme Templates ### Using Custom Theme Templates
1. **Copy** the template file to your template's CSS theme directory: 1. **Copy** the template file to your template's CSS theme directory:
```bash ```bash
# For light theme # For light theme
cp templates/theme_custom_light.css src/media/css/theme/light.custom.css cp templates/light.custom.css src/media/css/theme/light.custom.css
# For dark theme # For dark theme
cp templates/theme_custom_dark.css src/media/css/theme/dark.custom.css cp templates/dark.custom.css src/media/css/theme/dark.custom.css
``` ```
2. **Customize** the CSS variables in your copied file: 2. **Customize** the CSS variables in your copied file:

View File

@@ -10,7 +10,7 @@
# FILE INFORMATION # FILE INFORMATION
DEFGROUP: Joomla.Template.Site DEFGROUP: Joomla.Template.Site
INGROUP: MokoCassiopeia.Templates INGROUP: MokoCassiopeia.Templates
PATH: ./templates/theme_custom_dark.css PATH: ./templates/dark.custom.css
VERSION: 03.08.04 VERSION: 03.08.04
BRIEF: Custom dark theme color template with Bootstrap button definitions BRIEF: Custom dark theme color template with Bootstrap button definitions
*/ */

View File

@@ -10,7 +10,7 @@
# FILE INFORMATION # FILE INFORMATION
DEFGROUP: Joomla.Template.Site DEFGROUP: Joomla.Template.Site
INGROUP: MokoCassiopeia.Templates INGROUP: MokoCassiopeia.Templates
PATH: ./templates/theme_custom_light.css PATH: ./templates/light.custom.css
VERSION: 03.08.04 VERSION: 03.08.04
BRIEF: Custom light theme color template with Bootstrap button definitions BRIEF: Custom light theme color template with Bootstrap button definitions
*/ */