Merge origin/main into copilot/update-error-php-from-index

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-28 03:24:30 +00:00
parent 336a3ae7dc
commit e05fa8a48e
13 changed files with 4657 additions and 2586 deletions

View File

@@ -1,4 +1,4 @@
; ; Copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
; Copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
;
; This file is part of a Moko Consulting project.
;

View File

@@ -185,7 +185,7 @@
--dark-border-subtle: #2b323b;
/* Typography & layout */
--body-font-family: var(--optain-cassiopeia-font-family-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji');
--body-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--body-font-size: 1rem;
--body-font-weight: 400;
--body-line-height: 1.5;

View File

@@ -186,7 +186,7 @@
--dark-border-subtle: #2b323b;
/* Typography & layout */
--body-font-family: var(--optain-cassiopeia-font-family-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji');
--body-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--body-font-size: 1rem;
--body-font-weight: 400;
--body-line-height: 1.5;

View File

@@ -172,7 +172,7 @@
--font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--gradient: linear-gradient(180deg, #ffffff26, #fff0);
--body-font-family: var(--optain-cassiopeia-font-family-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
--body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
--body-font-size: 1rem;
--body-font-weight: 400;
--body-line-height: 1.5;

View File

@@ -172,7 +172,7 @@
--font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--gradient: linear-gradient(180deg, #ffffff26, #fff0);
--body-font-family: var(--optain-cassiopeia-font-family-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
--body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
--body-font-size: 1rem;
--body-font-weight: 400;
--body-line-height: 1.5;

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
VERSION: 03.05.00
BRIEF: Core JavaScript utilities and behaviors for Moko-Cassiopeia template
*/
!function(a){"use strict";window.Toc={helpers:{findOrFilter:function(e,t){var n=e.find(t);return e.filter(t).add(n).filter(":not([data-toc-skip])")},generateUniqueIdBase:function(e){return a(e).text().trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,64).replace(/^-+|-+$/gm,"").toLowerCase()||e.tagName.toLowerCase()},generateUniqueId:function(e){for(var t=this.generateUniqueIdBase(e),n=0;;n++){var r=t;if(0<n&&(r+="-"+n),!document.getElementById(r))return r}},generateAnchor:function(e){if(e.id)return e.id;var t=this.generateUniqueId(e);return e.id=t},createNavList:function(){return a('<ul class="nav navbar-nav"></ul>')},createChildNavList:function(e){var t=this.createNavList();return e.append(t),t},generateNavEl:function(e,t){var n=a('<a class="nav-link"></a>');n.attr("href","#"+e),n.text(t);var r=a("<li></li>");return r.append(n),r},generateNavItem:function(e){var t=this.generateAnchor(e),n=a(e),r=n.data("toc-text")||n.text();return this.generateNavEl(t,r)},getTopLevel:function(e){for(var t=1;t<=6;t++){if(1<this.findOrFilter(e,"h"+t).length)return t}return 1},getHeadings:function(e,t){var n="h"+t,r="h"+(t+1);return this.findOrFilter(e,n+","+r)},getNavLevel:function(e){return parseInt(e.tagName.charAt(1),10)},populateNav:function(r,a,e){var i,s=r,c=this;e.each(function(e,t){var n=c.generateNavItem(t);c.getNavLevel(t)===a?s=r:i&&s===r&&(s=c.createChildNavList(i)),s.append(n),i=n})},parseOps:function(e){var t;return(t=e.jquery?{$nav:e}:e).$scope=t.$scope||a(document.body),t}},init:function(e){(e=this.helpers.parseOps(e)).$nav.attr("data-toggle","toc");var t=this.helpers.createChildNavList(e.$nav),n=this.helpers.getTopLevel(e.$scope),r=this.helpers.getHeadings(e.$scope,n);this.helpers.populateNav(t,n,r)}},a(function(){a('nav[data-toggle="toc"]').each(function(e,t){var n=a(t);Toc.init(n)})})}(jQuery);
(function (win, doc) {
"use strict";

21
src/media/js/user.js Normal file
View File

@@ -0,0 +1,21 @@
/* Copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project.
SPDX-License-Identifier: GPL-3.0-or-later
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/ .
# FILE INFORMATION
DEFGROUP: Joomla.Template.Site
INGROUP: Moko-Cassiopeia
REPO: https://github.com/mokoconsulting-tech/moko-cassiopeia
PATH: ./media/templates/site/moko-cassiopeia/js/user.js
VERSION: 03.00.00
BRIEF: JavaScript for handling user-specific interactions in Moko-Cassiopeia template
*/

View File

@@ -11,76 +11,212 @@
REPO: https://github.com/mokoconsulting-tech/moko-cassiopeia
PATH: ./templates/moko-cassiopeia/component.php
VERSION: 03.05.00
BRIEF: Minimal component-only template file for Moko-Cassiopeia
BRIEF: Main template index file for Moko-Cassiopeia rendering site layout
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Component\ComponentHelper;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
$wa = $this->getWebAssetManager();
$app = Factory::getApplication();
$input = $app->getInput();
$document = $app->getDocument();
$wa = $document->getWebAssetManager();
// Color Theme
$paramsColorName = $this->params->get('colorName', 'colors_standard');
$assetColorName = 'theme.' . $paramsColorName;
$wa->registerAndUseStyle($assetColorName, 'media/templates/site/moko-cassiopeia/css/global/' . $paramsColorName . '.css');
// Template params
$params_LightColorName = (string) $this->params->get('colorLightName', 'colors_standard'); // colors_standard|colors_alternative|colors_custom
// Use a font scheme if set in the template style options
$paramsFontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
$params_DarkColorName = (string) $this->params->get('colorDarkName', 'colors_standard'); // colors_standard|colors_alternative|colors_custom
if ($paramsFontScheme) {
if (stripos($paramsFontScheme, 'https://') === 0) {
$params_googletagmanager = $this->params->get('googletagmanager', false);
$params_googletagmanagerid = $this->params->get('googletagmanagerid', null);
$params_googleanalytics = $this->params->get('googleanalytics', false);
$params_googleanalyticsid = $this->params->get('googleanalyticsid', null);
$params_custom_head_start = $this->params->get('custom_head_start', null);
$params_custom_head_end = $this->params->get('custom_head_end', null);
$params_developmentmode = $this->params->get('developmentmode', false);
// Bootstrap behaviors (assets handled via WAM)
HTMLHelper::_('bootstrap.framework');
HTMLHelper::_('bootstrap.alert');
HTMLHelper::_('bootstrap.button');
HTMLHelper::_('bootstrap.carousel');
HTMLHelper::_('bootstrap.collapse');
HTMLHelper::_('bootstrap.dropdown');
HTMLHelper::_('bootstrap.modal');
HTMLHelper::_('bootstrap.offcanvas');
HTMLHelper::_('bootstrap.popover');
HTMLHelper::_('bootstrap.scrollspy');
HTMLHelper::_('bootstrap.tab');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('bootstrap.toast');
// Detecting Active Variables
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$itemid = $input->getCmd('Itemid', '');
$sitenameR = $app->get('sitename'); // raw for title composition
$sitename = htmlspecialchars($sitenameR, ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu()->getActive();
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
// Respect “Site Name in Page Titles” (0:none, 1:before, 2:after)
$mode = (int) $app->get('sitename_pagetitles', 0);
$pageTitle = trim($this->getTitle());
$final = $pageTitle !== ''
? ($mode === 1 ? $sitenameR . ' - ' . $pageTitle
: ($mode === 2 ? $pageTitle . ' - ' . $sitenameR : $pageTitle))
: $sitenameR;
$this->setTitle($final);
// Template/Media path
$templatePath = 'media/templates/site/moko-cassiopeia';
// Core template CSS
$wa->useStyle('template.base'); // css/template.css
$wa->useStyle('template.vendor.social-media-demo'); // css/user.css
// Optional vendor CSS
$wa->useStyle('vendor.bootstrap-toc');
// Optional demo/showcase CSS (available for use, not loaded by default)
// To use: Add 'template.global.social-media-demo' to your article/module
// $wa->useStyle('template.global.social-media-demo');
// Color theme (light + optional dark)
$colorLightKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_LightColorName));
$colorDarkKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_DarkColorName));
$lightKey = 'template.light.' . $colorLightKey;
$darkKey = 'template.dark.' . $colorDarkKey;
try {
$wa->useStyle('template.light.colors_standard');
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.light.colors_standard', $templatePath . '/css/global/light/colors_standard.css');
}
try {
$wa->useStyle('template.dark.colors_standard');
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.dark.colors_standard', $templatePath . '/css/global/dark/colors_standard.css');
}
try {
$wa->useStyle($lightKey);
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.light.dynamic', $templatePath . '/css/global/light/' . $colorLightKey . '.css');
}
try {
$wa->useStyle($darkKey);
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.dark.dynamic', $templatePath . '/css/global/dark/' . $colorDarkKey . '.css');
}
// Scripts
$wa->useScript('template.js');
$wa->useScript('theme-init.js');
$wa->useScript('vendor.bootstrap-toc.js');
/**
* VirtueMart detection:
* - Component must exist and be enabled
*/
$isVirtueMartActive = ComponentHelper::isEnabled('com_virtuemart', true);
if ($isVirtueMartActive) {
/**
* Load a VirtueMart-specific stylesheet defined in your template manifest.
* This assumes you defined an asset named "template.virtuemart".
*/
$wa->useStyle('vendor.vm');
}
// Font scheme (external or local) + CSS custom properties
$params_FontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
if ($params_FontScheme) {
if (stripos($params_FontScheme, 'https://') === 0) {
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($params_FontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $params_FontScheme, [], [
'media' => 'print',
'rel' => 'lazy-stylesheet',
'onload' => 'this.media=\'all\'',
'crossorigin' => 'anonymous'
]);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
$fontStyles = '--font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
--font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;
--font-weight-normal: 400;
--font-weight-headings: 700;';
if (preg_match_all('/family=([^?:]*):/i', $params_FontScheme, $matches) > 0) {
$fontStyles = '--font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;' . "\n";
$fontStyles .= '--font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;' . "\n";
$fontStyles .= '--font-weight-normal: 400;' . "\n";
$fontStyles .= '--font-weight-headings: 700;';
}
} else {
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
$wa->registerAndUseStyle('fontscheme.current', $params_FontScheme, ['version' => 'auto'], [
'media' => 'print',
'rel' => 'lazy-stylesheet',
'onload' => 'this.media=\'all\''
]);
$this->getPreloadManager()->preload(
$wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(),
['as' => 'style']
);
}
}
// Enable assets
$wa->usePreset('template.moko-cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {
--hue: 214;
--template-bg-light: #f0f4fb;
--template-text-dark: #495057;
--template-text-light: #ffffff;
--template-link-color: #2a69b8;
--template-special-color: #001B4C;
$fontStyles
}");
// Meta
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
if ($this->params->get('faKitCode')) {
$faKit = "https://kit.fontawesome.com/" . $this->params->get('faKitCode') . ".js";
HTMLHelper::_('script', $faKit, ['crossorigin' => 'anonymous']);
} else {
try {
if($params_developmentmode){
$wa->useStyle('vendor.fa7free.all');
$wa->useStyle('vendor.fa7free.brands');
$wa->useStyle('vendor.fa7free.fontawesome');
$wa->useStyle('vendor.fa7free.regular');
$wa->useStyle('vendor.fa7free.solid');
} else {
$wa->useStyle('vendor.fa7free.all.min');
$wa->useStyle('vendor.fa7free.brands.min');
$wa->useStyle('vendor.fa7free.fontawesome.min');
$wa->useStyle('vendor.fa7free.regular.min');
$wa->useStyle('vendor.fa7free.solid.min');
}
} catch (\Throwable $e) {
if($params_developmentmode){
$wa->registerAndUseStyle('vendor.fa7free.all.dynamic', $templatePath . '/vendor/fa7free/css/all.css');
$wa->registerAndUseStyle('vendor.fa7free.brands.dynamic', $templatePath . '/vendor/fa7free/css/brands.css');
$wa->registerAndUseStyle('vendor.fa7free.fontawesome.dynamic', $templatePath . '/vendor/fa7free/css/fontawesome.css');
$wa->registerAndUseStyle('vendor.fa7free.regular.dynamic', $templatePath . '/vendor/fa7free/css/regular.css');
$wa->registerAndUseStyle('vendor.fa7free.solid.dynamic', $templatePath . '/vendor/fa7free/css/solid.css');
} else {
$wa->registerAndUseStyle('vendor.fa7free.all.min.dynamic', $templatePath . '/vendor/fa7free/css/all.min.css');
$wa->registerAndUseStyle('vendor.fa7free.brands.min.dynamic', $templatePath . '/vendor/fa7free/css/brands.min.css');
$wa->registerAndUseStyle('vendor.fa7free.fontawesome.min.dynamic', $templatePath . '/vendor/fa7free/css/fontawesome.min.css');
$wa->registerAndUseStyle('vendor.fa7free.regular.min.dynamic', $templatePath . '/vendor/fa7free/css/regular.min.css');
$wa->registerAndUseStyle('vendor.fa7free.solid.min.dynamic', $templatePath . '/vendor/fa7free/css/solid.min.css');
}
// Override 'template.active' asset to set correct ltr/rtl dependency
$wa->registerStyle('template.active', '', [], [], ['template.moko-cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
}
}
$params_leftIcon = htmlspecialchars($this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-left'), ENT_COMPAT, 'UTF-8');
$params_rightIcon = htmlspecialchars($this->params->get('drawerRightIcon', 'fa-solid fa-chevron-right'), ENT_COMPAT, 'UTF-8');
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
// Defer font awesome
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
$wa->useStyle('template.user'); // css/user.css
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<html class="component" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -21,12 +21,14 @@ use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Component\ComponentHelper;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
$input = $app->getInput();
$wa = $this->getWebAssetManager();
$document = $app->getDocument();
$wa = $document->getWebAssetManager();
// Template params
$params_LightColorName = (string) $this->params->get('colorLightName', 'colors_standard'); // colors_standard|colors_alternative|colors_custom
@@ -40,10 +42,9 @@ $params_googleanalyticsid = $this->params->get('googleanalyticsid', null);
$params_custom_head_start = $this->params->get('custom_head_start', null);
$params_custom_head_end = $this->params->get('custom_head_end', null);
$params_developmentmode = $this->params->get('developmentmode', false);
/*
// Bootstrap behaviors (assets handled via WAM)
HTMLHelper::_('bootstrap.framework');
HTMLHelper::_('bootstrap.loadCss', true);
HTMLHelper::_('bootstrap.alert');
HTMLHelper::_('bootstrap.button');
HTMLHelper::_('bootstrap.carousel');
@@ -56,7 +57,7 @@ HTMLHelper::_('bootstrap.scrollspy');
HTMLHelper::_('bootstrap.tab');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('bootstrap.toast');
*/
// Detecting Active Variables
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
@@ -80,41 +81,33 @@ $this->setTitle($final);
// Template/Media path
$templatePath = 'media/templates/site/moko-cassiopeia';
// ===========================
// Web Asset Manager (WAM) — matches your joomla.asset.json
// ===========================
// Core template CSS
$wa->useStyle('template.global.base'); // css/template.css
$wa->useStyle('template.global.social-media-demo'); // css/user.css
// Optional vendor CSS
$wa->useStyle('vendor.bootstrap-toc');
// Optional demo/showcase CSS (available for use, not loaded by default)
// To use: Add 'template.global.social-media-demo' to your article/module
// $wa->useStyle('template.global.social-media-demo');
$wa->useStyle('template.base'); // css/template.css
// Color theme (light + optional dark)
$colorLightKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_LightColorName));
$colorDarkKey = strtolower(preg_replace('/[^a-z0-9_.-]/i', '', $params_DarkColorName));
$lightKey = 'template.light.' . $colorLightKey;
$darkKey = 'template.dark.' . $colorDarkKey;
try {
$wa->useStyle('template.light.colors_standard');
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.light.colors_standard', $templatePath . '/css/global/light/colors_standard.css');
}
try {
$wa->useStyle('template.dark.colors_standard');
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.dark.colors_standard', $templatePath . '/css/global/dark/colors_standard.css');
}
try {
$wa->useStyle($lightKey);
} catch (\Throwable $e) {
$wa->registerAndUseStyle('template.light.dynamic', $templatePath . '/css/global/light/' . $colorLightKey . '.css');
}
try {
$wa->useStyle($darkKey);
} catch (\Throwable $e) {
@@ -123,9 +116,20 @@ try {
// Scripts
$wa->useScript('template.js');
$wa->useScript('theme-init.js');
$wa->useScript('darkmode-toggle.js');
$wa->useScript('vendor.bootstrap-toc.js');
/**
* VirtueMart detection:
* - Component must exist and be enabled
*/
$isVirtueMartActive = ComponentHelper::isEnabled('com_virtuemart', true);
if ($isVirtueMartActive) {
/**
* Load a VirtueMart-specific stylesheet defined in your template manifest.
* This assumes you defined an asset named "template.virtuemart".
*/
$wa->useStyle('vendor.vm');
}
// Font scheme (external or local) + CSS custom properties
$params_FontScheme = $this->params->get('useFontScheme', false);

View File

@@ -1,276 +1,246 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "moko-cassiopeia",
"description": "Moko-Cassiopeia template assets",
"license": "GPL-3.0-or-later",
"x-header": {
"copyright_year": 2025,
"author": "Jonathan Miller",
"owner": "Moko Consulting",
"contact": "hello@mokoconsulting.tech",
"project": "Moko-Cassiopeia Template",
"spdx_license": "GPL-3.0-or-later",
"notice": "This file is part of a Moko Consulting project.",
"disclaimer": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.",
"repo": "https://github.com/mokoconsulting-tech/moko-cassiopeia",
"file_information": {
"defgroup": "Joomla.Template.Site",
"ingroup": "Moko-Cassiopeia.Template.Assets",
"path": "./media/templates/site/moko-cassiopeia/joomla.asset.json",
"version": "03.00.00",
"brief": "Joomla asset registry for Moko-Cassiopeia"
}
},
"assets": [
{
"name": "template.global.base",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/template.css",
"attributes": {"media": "all"}
},
{
"name": "template.global.base.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/template.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.user",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/user.css",
"attributes": {"media": "all"}
},
{
"name": "template.user.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/user.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.editor",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/editor.css",
"attributes": {"media": "all"}
},
{
"name": "template.editor.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/editor.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.bootstrap-toc",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.bootstrap-toc.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_standard",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_standard.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_standard.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_standard.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_alternative",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_alternative.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_alternative.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_alternative.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_custom",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_custom.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_custom.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_custom.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_standard",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_standard.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_standard.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_standard.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_alternative",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_alternative.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_alternative.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_alternative.min.css"
},
{
"name": "template.dark.colors_custom",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_custom.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_custom.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_custom.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/template.js",
"attributes": {"defer": true}
},
{
"name": "template.js.min",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/template.min.js",
"attributes": {"defer": true}
},
{
"name": "theme-init.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/theme-init.js",
"attributes": {"defer": true}
},
{
"name": "theme-init.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/theme-init.min.js",
"attributes": {"defer": true}
},
{
"name": "darkmode-toggle.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/darkmode-toggle.js",
"attributes": {"defer": true}
},
{
"name": "darkmode-toggle.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/darkmode-toggle.min.js",
"attributes": {"defer": true}
},
{
"name": "gtm.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/gtm.js",
"attributes": {"defer": true}
},
{
"name": "gtm.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/gtm.min.js",
"attributes": {"defer": true}
},
{
"name": "vendor.bootstrap-toc.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.js",
"attributes": {"defer": true}
},
{
"name": "vendor.bootstrap-toc.js.min",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/vendor/afeld/bootstrap-toc.min.js",
"attributes": {"defer": true}
},
{
"name": "vendor.fa7free.all",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.css"
},
{
"name": "vendor.fa7free.all.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.brands",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.brands.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.fontawesome",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.fontawesome.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.regular",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.regular.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.solid",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.solid.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.global.social-media-demo",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/global/social-media-demo.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.vm",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/vm.css",
"attributes": {"media": "all"}
}
]
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "moko-cassiopeia",
"description": "Moko-Cassiopeia template assets",
"license": "GPL-3.0-or-later",
"x-header": {
"copyright_year": 2025,
"author": "Jonathan Miller",
"owner": "Moko Consulting",
"contact": "hello@mokoconsulting.tech",
"project": "Moko-Cassiopeia Template",
"spdx_license": "GPL-3.0-or-later",
"notice": "This file is part of a Moko Consulting project.",
"disclaimer": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.",
"repo": "https://github.com/mokoconsulting-tech/moko-cassiopeia",
"file_information": {
"defgroup": "Joomla.Template.Site",
"ingroup": "Moko-Cassiopeia.Template.Assets",
"path": "./media/templates/site/moko-cassiopeia/joomla.asset.json",
"version": "03.00.00",
"brief": "Joomla asset registry for Moko-Cassiopeia"
}
},
"assets": [
{
"name": "template.base",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/template.css",
"attributes": {"media": "all"}
},
{
"name": "template.base.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/template.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.user",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/user.css",
"attributes": {"media": "all"}
},
{
"name": "template.user.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/user.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.editor",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/editor.css",
"attributes": {"media": "all"}
},
{
"name": "template.editor.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/editor.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_standard",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_standard.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_standard.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_standard.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_alternative",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_alternative.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_alternative.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_alternative.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_custom",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_custom.css",
"attributes": {"media": "all"}
},
{
"name": "template.light.colors_custom.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/light/colors_custom.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_standard",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_standard.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_standard.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_standard.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_alternative",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_alternative.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_alternative.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_alternative.min.css"
},
{
"name": "template.dark.colors_custom",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_custom.css",
"attributes": {"media": "all"}
},
{
"name": "template.dark.colors_custom.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/colors/dark/colors_custom.min.css",
"attributes": {"media": "all"}
},
{
"name": "template.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/template.js",
"attributes": {"defer": true}
},
{
"name": "template.js.min",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/template.min.js",
"attributes": {"defer": true}
},
{
"name": "theme-init.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/theme-init.js",
"attributes": {"defer": true}
},
{
"name": "theme-init.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/theme-init.min.js",
"attributes": {"defer": true}
},
{
"name": "darkmode-toggle.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/darkmode-toggle.js",
"attributes": {"defer": true}
},
{
"name": "darkmode-toggle.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/darkmode-toggle.min.js",
"attributes": {"defer": true}
},
{
"name": "gtm.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/gtm.js",
"attributes": {"defer": true}
},
{
"name": "gtm.min.js",
"type": "script",
"uri": "media/templates/site/moko-cassiopeia/js/gtm.min.js",
"attributes": {"defer": true}
},
{
"name": "vendor.fa7free.all",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.css"
},
{
"name": "vendor.fa7free.all.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/all.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.brands",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.brands.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/brands.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.fontawesome",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.fontawesome.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/fontawesome.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.regular",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.regular.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/regular.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.solid",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.fa7free.solid.min",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/vendor/fa7free/css/solid.min.css",
"attributes": {"media": "all"}
},
{
"name": "vendor.vm",
"type": "style",
"uri": "media/templates/site/moko-cassiopeia/css/vendor/vm.css",
"attributes": {"media": "all"}
}
]
}