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:
@@ -88,22 +88,6 @@ $templatePath = 'media/templates/site/mokocassiopeia';
|
||||
// Core 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
|
||||
$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; ?>
|
||||
<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) : ?>
|
||||
<script>
|
||||
// Early theme application to avoid FOUC
|
||||
|
||||
@@ -17,18 +17,18 @@ Template files are provided for both light and dark themes with complete Bootstr
|
||||
|
||||
| File | Theme | Description |
|
||||
|------|-------|-------------|
|
||||
| `theme_custom_light.css` | Light | Custom light theme with all Bootstrap button variants |
|
||||
| `theme_custom_dark.css` | Dark | Custom dark theme with all Bootstrap button variants |
|
||||
| `light.custom.css` | Light | Custom light theme with all Bootstrap button variants |
|
||||
| `dark.custom.css` | Dark | Custom dark theme with all Bootstrap button variants |
|
||||
|
||||
### Using Custom Theme Templates
|
||||
|
||||
1. **Copy** the template file to your template's CSS theme directory:
|
||||
```bash
|
||||
# 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
|
||||
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:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# FILE INFORMATION
|
||||
DEFGROUP: Joomla.Template.Site
|
||||
INGROUP: MokoCassiopeia.Templates
|
||||
PATH: ./templates/theme_custom_dark.css
|
||||
PATH: ./templates/dark.custom.css
|
||||
VERSION: 03.08.04
|
||||
BRIEF: Custom dark theme color template with Bootstrap button definitions
|
||||
*/
|
||||
@@ -10,7 +10,7 @@
|
||||
# FILE INFORMATION
|
||||
DEFGROUP: Joomla.Template.Site
|
||||
INGROUP: MokoCassiopeia.Templates
|
||||
PATH: ./templates/theme_custom_light.css
|
||||
PATH: ./templates/light.custom.css
|
||||
VERSION: 03.08.04
|
||||
BRIEF: Custom light theme color template with Bootstrap button definitions
|
||||
*/
|
||||
Reference in New Issue
Block a user