diff --git a/README.md b/README.md
index 15f97be..9c845f5 100644
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@
INGROUP: MokoCassiopeia.Documentation
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCassiopeia
FILE: ./README.md
- VERSION: 03.10.11
+ VERSION: 03.10.12
BRIEF: Documentation for MokoCassiopeia template
-->
# MokoCassiopeia → MokoOnyx
-> **This template is being renamed to MokoOnyx.** Version 03.10.11 is the bridge release that automatically migrates your settings. After updating, MokoOnyx will be your active template and MokoCassiopeia can be safely uninstalled.
+> **This template is being renamed to MokoOnyx.** Version 03.10.12 is the bridge release that automatically migrates your settings. After updating, MokoOnyx will be your active template and MokoCassiopeia can be safely uninstalled.
**A Modern, Lightweight Joomla Template Based on Cassiopeia**
diff --git a/src/helper/bridge.php b/src/helper/bridge.php
index 998e036..43a168a 100644
--- a/src/helper/bridge.php
+++ b/src/helper/bridge.php
@@ -46,27 +46,23 @@ class MokoBridgeMigration
return true;
}
- // 1. Download MokoOnyx ZIP
+ // 1. Try downloading and installing MokoOnyx from Gitea release
+ $installed = false;
$zipPath = self::downloadRelease();
- if (!$zipPath) {
- $app->enqueueMessage(
- 'MokoOnyx migration: could not download the MokoOnyx template package. '
- . 'Please install MokoOnyx manually from '
- . 'Gitea Releases.',
- 'warning'
- );
- return false;
+ if ($zipPath) {
+ $installed = self::installPackage($zipPath);
+ @unlink($zipPath);
}
- // 2. Install MokoOnyx via Joomla's installer
- $installed = self::installPackage($zipPath);
-
- // Clean up downloaded ZIP
- @unlink($zipPath);
+ // 2. Fallback: copy from MokoCassiopeia and rename
+ if (!$installed) {
+ self::log('Bridge: download/install failed, falling back to file copy');
+ $installed = self::copyAndRename();
+ }
if (!$installed) {
$app->enqueueMessage(
- 'MokoOnyx migration: installation failed. '
+ 'MokoOnyx migration: automatic installation failed. '
. 'Please install MokoOnyx manually from '
. 'Gitea Releases.',
'warning'
@@ -74,10 +70,13 @@ class MokoBridgeMigration
return false;
}
- // 3. Migrate template styles
+ // 3. Copy user files (custom themes, user.css, user.js)
+ self::copyAndRename();
+
+ // 4. Migrate template styles and params
self::migrateStyles();
- // 4. Notify admin
+ // 5. Notify admin
self::notifyUser($app);
self::log('Bridge migration completed successfully.');
@@ -245,6 +244,58 @@ class MokoBridgeMigration
self::log('Migrated ' . count($oldStyles) . ' template style(s).');
}
+ /**
+ * Copy user-specific files from MokoCassiopeia to MokoOnyx.
+ * Only copies custom themes, user.css, and user.js — not the full template.
+ * MokoOnyx must already be installed (via download or manual).
+ */
+ private static function copyAndRename(): bool
+ {
+ $oldMedia = JPATH_ROOT . '/media/templates/site/' . self::OLD_NAME;
+ $newMedia = JPATH_ROOT . '/media/templates/site/' . self::NEW_NAME;
+
+ if (!is_dir($newMedia)) {
+ self::log('Bridge: MokoOnyx media dir not found — cannot copy user files', 'warning');
+ return false;
+ }
+
+ $copied = 0;
+
+ // Copy custom theme palettes
+ $userFiles = [
+ 'css/theme/light.custom.css',
+ 'css/theme/dark.custom.css',
+ 'css/theme/light.custom.min.css',
+ 'css/theme/dark.custom.min.css',
+ 'css/user.css',
+ 'css/user.min.css',
+ 'js/user.js',
+ 'js/user.min.js',
+ ];
+
+ foreach ($userFiles as $relPath) {
+ $srcFile = $oldMedia . '/' . $relPath;
+ $dstFile = $newMedia . '/' . $relPath;
+ if (is_file($srcFile) && !is_file($dstFile)) {
+ $dstDir = dirname($dstFile);
+ if (!is_dir($dstDir)) {
+ mkdir($dstDir, 0755, true);
+ }
+ copy($srcFile, $dstFile);
+ $copied++;
+ }
+ }
+
+ // Copy favicon directory
+ $faviconSrc = JPATH_ROOT . '/images/favicons';
+ if (is_dir($faviconSrc)) {
+ self::log('Bridge: favicons already at images/favicons — shared between templates');
+ }
+
+ self::log("Bridge: copied {$copied} user file(s) to MokoOnyx");
+ return true;
+ }
+
private static function notifyUser($app): void
{
$app->enqueueMessage(
diff --git a/src/joomla.asset.json b/src/joomla.asset.json
index d7e96fd..fbe1607 100644
--- a/src/joomla.asset.json
+++ b/src/joomla.asset.json
@@ -17,7 +17,7 @@
"defgroup": "Joomla.Template.Site",
"ingroup": "MokoCassiopeia.Template.Assets",
"path": "./media/templates/site/mokocassiopeia/joomla.asset.json",
- "version": "03.10.11",
+ "version": "03.10.12",
"brief": "Joomla asset registry for MokoCassiopeia"
}
},
diff --git a/src/templateDetails.xml b/src/templateDetails.xml
index cb7e4a9..4fef7f3 100644
--- a/src/templateDetails.xml
+++ b/src/templateDetails.xml
@@ -39,13 +39,13 @@
MokoCassiopeia continues Joomla's tradition of space-themed default templates— building on the legacy of Solarflare (Joomla 1.0), Milkyway (Joomla 1.5), and Protostar (Joomla 3.0).
This template is a customized fork of the Cassiopeia template introduced in Joomla 4, preserving its modern, accessible, and mobile-first foundation while introducing new stylistic enhancements and structural refinements specifically tailored for use by Moko Consulting.
Starter palette files are included with the template. To create a custom colour scheme, copy templates/mokocassiopeia/templates/light.custom.css to media/templates/site/mokocassiopeia/css/theme/light.custom.css, or templates/mokocassiopeia/templates/dark.custom.css to media/templates/site/mokocassiopeia/css/theme/dark.custom.css. Customise the CSS variables to match your brand, then activate your palette in System → Site Templates → MokoCassiopeia → Theme tab by selecting "Custom" for the Light or Dark Mode Palette. A full variable reference is available in the CSS Variables tab in template options.
For site-specific styles and scripts that should survive template updates, create the following files:
media/templates/site/mokocassiopeia/css/user.css — loaded on every page for custom CSS overrides.media/templates/site/mokocassiopeia/js/user.js — loaded on every page for custom JavaScript.These files are gitignored and will not be overwritten by template updates.
This template is based on the original Cassiopeia template developed by the Joomla! Project and released under the GNU General Public License.
Modifications and enhancements have been made by Moko Consulting in accordance with open-source licensing standards.
It includes integration with Bootstrap TOC, an open-source table of contents generator by A. Feld, licensed under the MIT License.
All third-party libraries and assets remain the property of their respective authors and are credited within their source files where applicable.
]]> +MokoCassiopeia continues Joomla's tradition of space-themed default templates— building on the legacy of Solarflare (Joomla 1.0), Milkyway (Joomla 1.5), and Protostar (Joomla 3.0).
This template is a customized fork of the Cassiopeia template introduced in Joomla 4, preserving its modern, accessible, and mobile-first foundation while introducing new stylistic enhancements and structural refinements specifically tailored for use by Moko Consulting.
Starter palette files are included with the template. To create a custom colour scheme, copy templates/mokocassiopeia/templates/light.custom.css to media/templates/site/mokocassiopeia/css/theme/light.custom.css, or templates/mokocassiopeia/templates/dark.custom.css to media/templates/site/mokocassiopeia/css/theme/dark.custom.css. Customise the CSS variables to match your brand, then activate your palette in System → Site Templates → MokoCassiopeia → Theme tab by selecting "Custom" for the Light or Dark Mode Palette. A full variable reference is available in the CSS Variables tab in template options.
For site-specific styles and scripts that should survive template updates, create the following files:
media/templates/site/mokocassiopeia/css/user.css — loaded on every page for custom CSS overrides.media/templates/site/mokocassiopeia/js/user.js — loaded on every page for custom JavaScript.These files are gitignored and will not be overwritten by template updates.
This template is based on the original Cassiopeia template developed by the Joomla! Project and released under the GNU General Public License.
Modifications and enhancements have been made by Moko Consulting in accordance with open-source licensing standards.
It includes integration with Bootstrap TOC, an open-source table of contents generator by A. Feld, licensed under the MIT License.
All third-party libraries and assets remain the property of their respective authors and are credited within their source files where applicable.
]]>