* Add mod_custom hero layout override and bump version to 03.09.01 Adds src/html/mod_custom/hero.php — a banner-overlay style template override for mod_custom, mirroring Cassiopeia's banner layout pattern. Includes background image support via WebAssetManager and respects the Module Manager's moduleclass_sfx field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Ignore and untrack .claude/settings.local.json Adds .claude/settings.local.json to .gitignore and removes it from version control to keep local Claude Code permissions out of the repo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Ship custom palette starters and update template description - Add src/templates/light.custom.css and dark.custom.css as starter palette files that ship with the template, giving users a full variable reference to copy and customise - Register src/templates/ folder in templateDetails.xml <files> - Update <description> in templateDetails.xml: correct palette source paths, add Custom CSS & JavaScript section (user.css / user.js), link docs to GitHub repo docs/ directory - Sync en-GB and en-US tpl_mokocassiopeia.sys.ini with same changes, preserving British/American spelling variants; bump version to 03.09.01 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add CSS Variables reference tab to template options Adds a new 'CSS Variables' tab to the template configuration with eight documented sections (brand, typography, navigation, header background, container backgrounds, borders/shadows, forms/focus) so site builders can reference all available custom properties without leaving Joomla admin. Also removes external docs links from descriptions in templateDetails.xml and both language files, replacing them with a pointer to the new tab. Fixes stale custom palette source paths in en-GB and en-US ini files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Expand CSS Variables tab to full variable reference and add custom-hero class - Replace 8-field CSS Variables tab with 21 comprehensive sections covering all variables from light.standard.css and dark.standard.css - New sections: Links, Layout & Spacing, Breakpoints, Bootstrap Semantic Palette, Bootstrap State Colors, Alert & List Group Colors, Standard Colors/Grays/Opacity, Shadows & Shadow Tokens, Buttons, Cards, Component & Plugin Colors, VirtueMart, Gable - Add custom-hero class to hero.php outer div (always present) - Both en-GB and en-US language files updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add Google Search Console verification and ensure all Google services coexist - Add googlesitekey param to Google fieldset in templateDetails.xml - Inject <meta name="google-site-verification"> via setMetaData() in index.php, component.php, and offline.php - GTM, GA, and Search Console verification can now all be active simultaneously - Add language strings for new field in en-US and en-GB Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add header-aside module position to the right of the logo - New position renders inside .header-brand-wrap, right-aligned via margin-inline-start: auto on .container-header-aside - CSS: .header-brand-wrap uses flexbox so logo stays left, aside floats right - Registered in templateDetails.xml positions list - Language strings added to both en-US and en-GB sys.ini files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add minify build script and generate .min CSS/JS; rename position to brand-aside Build tooling: - Add package.json with clean-css and terser dev dependencies - Add scripts/minify.js: reads joomla.asset.json, auto-detects source/.min pairs, and minifies all template-owned CSS and JS files - Add node_modules/ to .gitignore Generated .min files (all 6 manifest pairs): - css/template.min.css (17.8% saved) - css/editor.min.css (49.4% saved) - css/theme/light.standard.min.css (13.1% saved) - css/theme/dark.standard.min.css (14.4% saved) - js/template.min.js (58.2% saved) - js/gtm.min.js (62.3% saved) Rename: header-aside → brand-aside (position, CSS class, language keys) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add hero/banner-overlay CSS variables and wire template.css - Add HERO / BANNER OVERLAY section to light.standard.css and dark.standard.css: --hero-height, --hero-color, --hero-bg-repeat, --hero-bg-attachment, --hero-bg-position, --hero-bg-size, --hero-border-bottom, --hero-overlay-bg (light: 0.1 alpha / dark: 0.3 alpha), --hero-overlay-padding, --hero-overlay-text-align, --hero-overlay-text-color - Replace all hardcoded values in .container-banner .banner-overlay and .overlay with var() references (with fallbacks) - Fix background-position: comma syntax → correct space-separated single-bg value - Add css_vars_hero note field to CSS Variables tab in templateDetails.xml - Add TPL_MOKOCASSIOPEIA_CSS_VARS_HERO_LABEL/DESC to en-US and en-GB - Regenerate .min files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add smooth theme-switch transitions and restore hero .overlay wrapper - Add prefers-reduced-motion-scoped CSS transitions (bg, color, border) on :root, body, and key layout containers so light/dark theme switches animate smoothly instead of snapping - Restore <div class="overlay"> child in hero.php; slim .custom-hero rule to a customisation hook only — visual overlay styles are handled by .overlay child - Regenerate template.min.css Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update template.css * Merge duplicate prefers-reduced-motion media queries Consolidate the two @media (prefers-reduced-motion: no-preference) blocks into one — scroll-behavior and theme-switch colour transitions share the same query and are cleaner in a single block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Promote offcanvas variables to :root theme files and document in CSS Variables tab - Move --offcanvas-* definitions from component-scoped .offcanvas selector in template.css into :root[data-bs-theme] blocks in light.standard.css and dark.standard.css so they are overridable via user.css at root level - Fix two bugs in the old definitions: --offcanvas-bg was incorrectly set to var(--body-color) (text colour); corrected to var(--body-bg); and --offcanvas-color had a spurious 'color:' prefix - Dark theme uses a heavier box-shadow (0.3 alpha) for better depth perception - Add css_vars_offcanvas field to templateDetails.xml CSS Variables tab - Add en-US and en-GB language strings for the new Offcanvas Panel section - Rebuild all .min CSS files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Promote Bootstrap component variables from template.css to :root theme files Move 16 component variable groups from component-scoped selectors in template.css into :root[data-bs-theme] blocks in light.standard.css and dark.standard.css: accordion, breadcrumb, pagination, badge, alert, progress, list-group, dropdown, toast, modal, tooltip, popover, spinner, nav, nav-tabs, nav-pills Dark theme values adapted for dark surfaces: semantic var() references, lighter SVG icon fill colours, heavier shadows, secondary-bg backgrounds. Component selectors in template.css retain only non-variable rules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Promote table and backdrop variables to :root theme files Move --table-* and --backdrop-* base definitions from component selectors in template.css into :root[data-bs-theme] blocks in light/dark theme files. Dark table uses white-rgb-based striped/active overlays for proper contrast on dark surfaces. Deduplicate the double --table-active-* declarations that existed in template.css. Backdrop values are identical in both themes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add CSS Variables tab documentation for all promoted Bootstrap components Add LABEL/DESC language strings (en-US + en-GB) for all 17 Bootstrap component variable groups now living in the :root theme files: accordion, alert, badge, backdrop, breadcrumb, dropdown, list-group, modal, nav-tabs, nav-pills, pagination, popover, progress, spinner, table, toast, tooltip Each section documents variables with HTML subheadings (Dimensions, Colours, Typography, Stacking, Animation) and <code> tags for every variable name. British English spellings used throughout en-GB. Adds 34 new lines per language file (17 LABEL + 17 DESC pairs, 80 CSS_VARS_* keys total). XML fields were already present from the prior migration commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
546 lines
20 KiB
PHP
546 lines
20 KiB
PHP
<?php
|
|
/* Copyright (C) 2026 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: MokoCassiopeia
|
|
REPO: https://github.com/mokoconsulting-tech/MokoCassiopeia
|
|
PATH: ./templates/mokocassiopeia/index.php
|
|
VERSION: 03.06.02
|
|
BRIEF: Main template index file for MokoCassiopeia 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();
|
|
$input = $app->getInput();
|
|
$document = $app->getDocument();
|
|
$wa = $document->getWebAssetManager();
|
|
|
|
// Template params
|
|
$params_LightColorName = (string) $this->params->get('colorLightName', 'standard'); // standard|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);
|
|
$params_googleanalytics = $this->params->get('googleanalytics', false);
|
|
$params_googleanalyticsid = $this->params->get('googleanalyticsid', null);
|
|
$params_googlesitekey = $this->params->get('googlesitekey', 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);
|
|
|
|
// Theme params
|
|
$params_theme_enabled = $this->params->get('theme_enabled', 1);
|
|
$params_theme_fab_enabled = $this->params->get('theme_fab_enabled', 1);
|
|
$params_theme_fab_pos = $this->params->get('theme_fab_pos', 'br');
|
|
|
|
// 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/mokocassiopeia';
|
|
|
|
// Core template CSS
|
|
$wa->useStyle('template.base'); // css/template.css
|
|
|
|
// Scripts
|
|
$wa->useScript('template.js');
|
|
|
|
// Load Osaka font for site title
|
|
$wa->useStyle('template.font.osaka');
|
|
|
|
// Load GTM script if GTM is enabled
|
|
if (!empty($params_googletagmanager) && !empty($params_googletagmanagerid)) {
|
|
$wa->useScript('gtm.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()->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', $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', $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']
|
|
);
|
|
}
|
|
}
|
|
|
|
// -------------------------------------
|
|
// Brand: logo from params OR siteTitle
|
|
// -------------------------------------
|
|
$brandHtml = '';
|
|
$logoFile = (string) $this->params->get('logoFile');
|
|
|
|
if ($logoFile !== '') {
|
|
$brandHtml = HTMLHelper::_(
|
|
'image',
|
|
Uri::root(false) . htmlspecialchars($logoFile, ENT_QUOTES, 'UTF-8'),
|
|
$sitename,
|
|
['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'],
|
|
false,
|
|
0
|
|
);
|
|
} else {
|
|
// If no logo file, show the title (defaults to "MokoCassiopeia" if not set)
|
|
$siteTitle = $this->params->get('siteTitle', 'MokoCassiopeia');
|
|
$brandHtml = '<span class="site-title" title="' . $sitename . '">'
|
|
. htmlspecialchars($siteTitle, ENT_COMPAT, 'UTF-8')
|
|
. '</span>';
|
|
}
|
|
|
|
// Layout flags
|
|
$hasClass = '';
|
|
if ($this->countModules('sidebar-left', true)) { $hasClass .= ' has-sidebar-left'; }
|
|
if ($this->countModules('sidebar-right', true)) { $hasClass .= ' has-sidebar-right'; }
|
|
if ($this->countModules('drawer-left', true)) { $hasClass .= ' has-drawer-left'; }
|
|
if ($this->countModules('drawer-right', true)) { $hasClass .= ' has-drawer-right'; }
|
|
|
|
// Smart Bootstrap component loading - only load what's needed
|
|
if ($this->countModules('drawer-left', true) || $this->countModules('drawer-right', true)) {
|
|
// Load Bootstrap Offcanvas component for drawers
|
|
HTMLHelper::_('bootstrap.offcanvas');
|
|
}
|
|
|
|
// Container
|
|
$wrapper = $this->params->get('fluidContainer') ? 'wrapper-fluid' : 'wrapper-static';
|
|
$stickyHeader = $this->params->get('stickyHeader') ? 'position-sticky sticky-top' : '';
|
|
|
|
// Meta
|
|
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
|
|
if (!empty($params_googlesitekey)) {
|
|
$this->setMetaData('google-site-verification', htmlspecialchars($params_googlesitekey, ENT_QUOTES, 'UTF-8'));
|
|
}
|
|
|
|
if ($this->params->get('fA6KitCode')) {
|
|
$faKit = "https://kit.fontawesome.com/" . $this->params->get('fA6KitCode') . ".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');
|
|
}
|
|
|
|
}
|
|
}
|
|
$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');
|
|
|
|
// Load theme palette stylesheets based on configuration
|
|
$wa->useStyle('template.light.standard'); // css/theme/light.standard.css
|
|
$wa->useStyle('template.dark.standard'); // css/theme/dark.standard.css
|
|
|
|
// Load custom palettes only if selected in template configuration AND files exist
|
|
if ($params_LightColorName === 'custom' && file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/light.custom.css'))
|
|
{
|
|
$wa->useStyle('template.light.custom');
|
|
}
|
|
if ($params_DarkColorName === 'custom' && file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/dark.custom.css'))
|
|
{
|
|
$wa->useStyle('template.dark.custom');
|
|
}
|
|
|
|
// Load user assets last (after all other styles and scripts)
|
|
$wa->useStyle('template.user'); // css/user.css
|
|
$wa->useScript('user.js'); // js/user.js
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
|
|
<head>
|
|
<?php if (trim($params_custom_head_start)) : ?><?php echo $params_custom_head_start; ?><?php endif; ?>
|
|
<jdoc:include type="head" />
|
|
|
|
<?php if ($params_theme_enabled) : ?>
|
|
<script>
|
|
// Early theme application to avoid FOUC
|
|
(function () {
|
|
try {
|
|
var stored = localStorage.getItem('theme');
|
|
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
var theme = stored ? stored : (prefersDark ? 'dark' : 'light');
|
|
document.documentElement.setAttribute('data-bs-theme', theme);
|
|
document.documentElement.setAttribute('data-aria-theme', theme);
|
|
} catch (e) {}
|
|
})();
|
|
</script>
|
|
<?php endif; ?>
|
|
|
|
<script>
|
|
// Facebook in-app browser warning banner
|
|
window.addEventListener('DOMContentLoaded', function () {
|
|
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
|
var isFacebookBrowser = ua.indexOf('FBAN') > -1 || ua.indexOf('FBAV') > -1;
|
|
if (isFacebookBrowser) {
|
|
var warning = document.createElement('div');
|
|
warning.textContent = '⚠️ KNOWN ISSUE: Images do not load in Facebook Web browser. Please open in external browser for full experience.';
|
|
warning.style.position = 'fixed';
|
|
warning.style.top = '0';
|
|
warning.style.left = '0';
|
|
warning.style.right = '0';
|
|
warning.style.zIndex = '10000';
|
|
warning.style.backgroundColor = '#007bff';
|
|
warning.style.color = '#fff';
|
|
warning.style.padding = '15px';
|
|
warning.style.textAlign = 'center';
|
|
warning.style.fontWeight = 'bold';
|
|
warning.style.fontSize = '16px';
|
|
warning.style.boxShadow = '0 2px 5px rgba(0,0,0,0.2)';
|
|
document.body.appendChild(warning);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<?php if (trim($params_custom_head_end)) : ?><?php echo $params_custom_head_end; ?><?php endif; ?>
|
|
</head>
|
|
<body data-bs-spy="scroll" data-bs-target="#toc"
|
|
data-theme-fab-enabled="<?php echo $params_theme_fab_enabled ? '1' : '0'; ?>"
|
|
data-theme-fab-pos="<?php echo htmlspecialchars($params_theme_fab_pos, ENT_QUOTES, 'UTF-8'); ?>"
|
|
class="site <?php
|
|
echo $option . ' ' . $wrapper
|
|
. ' view-' . $view
|
|
. ($layout ? ' layout-' . $layout : ' no-layout')
|
|
. ($task ? ' task-' . $task : ' no-task')
|
|
. ($itemid ? ' itemid-' . $itemid : '')
|
|
. ($pageclass ? ' ' . $pageclass : '')
|
|
. $hasClass
|
|
. ($this->direction == 'rtl' ? ' rtl' : '');
|
|
?>">
|
|
<?php if (!empty($params_googletagmanager) && !empty($params_googletagmanagerid)) :
|
|
$gtmID = htmlspecialchars($params_googletagmanagerid, ENT_QUOTES, 'UTF-8'); ?>
|
|
<!-- Google Tag Manager -->
|
|
<script>
|
|
(function(w,d,s,l,i){
|
|
w[l]=w[l]||[];
|
|
w[l].push({'gtm.start': new Date().getTime(), event:'gtm.js'});
|
|
var f=d.getElementsByTagName(s)[0],
|
|
j=d.createElement(s),
|
|
dl=l!='dataLayer'?'&l='+l:'';
|
|
j.async=true;
|
|
j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;
|
|
f.parentNode.insertBefore(j,f);
|
|
})(window,document,'script','dataLayer','<?php echo $gtmID; ?>');
|
|
</script>
|
|
<!-- End Google Tag Manager -->
|
|
|
|
<!-- Google Tag Manager (noscript) -->
|
|
<noscript>
|
|
<iframe src="https://www.googletagmanager.com/ns.html?id=<?php echo $gtmID; ?>"
|
|
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
|
</noscript>
|
|
<!-- End Google Tag Manager (noscript) -->
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($params_googleanalytics) && !empty($params_googleanalyticsid)) :
|
|
$gaId = htmlspecialchars($params_googleanalyticsid, ENT_QUOTES, 'UTF-8'); ?>
|
|
<!-- Google Analytics (gtag.js) -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo $gaId; ?>"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
gtag('consent', 'default', {
|
|
'ad_storage': 'denied',
|
|
'analytics_storage': 'granted',
|
|
'ad_user_data': 'denied',
|
|
'ad_personalization': 'denied'
|
|
});
|
|
(function(id){
|
|
if (/^G-/.test(id)) {
|
|
gtag('config', id, { 'anonymize_ip': true });
|
|
} else if (/^UA-/.test(id)) {
|
|
gtag('config', id, { 'anonymize_ip': true });
|
|
console.warn('Using a UA- ID. Universal Analytics is sunset; consider migrating to GA4.');
|
|
} else {
|
|
console.warn('Unrecognized Google Analytics ID format:', id);
|
|
}
|
|
})('<?php echo $gaId; ?>');
|
|
</script>
|
|
<!-- End Google Analytics -->
|
|
<?php endif; ?>
|
|
|
|
<header class="header container-header full-width<?php echo $stickyHeader ? ' ' . $stickyHeader : ''; ?>" role="banner">
|
|
|
|
<?php if ($this->countModules('topbar')) : ?>
|
|
<div class="container-topbar">
|
|
<jdoc:include type="modules" name="topbar" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="header-top">
|
|
<?php if ($this->countModules('below-topbar')) : ?>
|
|
<div class="grid-child container-below-topbar">
|
|
<jdoc:include type="modules" name="below-topbar" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->params->get('brand', 1)) : ?>
|
|
<div class="grid-child header-brand-wrap">
|
|
<div class="navbar-brand">
|
|
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
|
|
<?php echo $brandHtml; ?>
|
|
</a>
|
|
<?php if ($this->params->get('siteDescription')) : ?>
|
|
<div class="site-description">
|
|
<?php echo htmlspecialchars($this->params->get('siteDescription'), ENT_QUOTES, 'UTF-8'); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if ($this->countModules('brand-aside', true)) : ?>
|
|
<div class="container-brand-aside">
|
|
<jdoc:include type="modules" name="brand-aside" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('below-logo')) : ?>
|
|
<div class="grid container-below-logo">
|
|
<jdoc:include type="modules" name="below-logo" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<!-- Drawer Toggle Buttons -->
|
|
<?php if ($this->countModules('drawer-left')) : ?>
|
|
<button class="drawer-toggle-left btn btn-outline-secondary me-2"
|
|
type="button"
|
|
data-bs-toggle="offcanvas"
|
|
data-bs-target="#drawer-left"
|
|
aria-controls="drawer-left">
|
|
<span class="<?php echo $params_leftIcon; ?>"></span>
|
|
</button>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('drawer-right')) : ?>
|
|
<button class="drawer-toggle-right btn btn-outline-secondary"
|
|
type="button"
|
|
data-bs-toggle="offcanvas"
|
|
data-bs-target="#drawer-right"
|
|
aria-controls="drawer-right">
|
|
<span class="<?php echo $params_rightIcon; ?>"></span>
|
|
</button>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('menu', true) || $this->countModules('search', true)) : ?>
|
|
<div class="grid-child container-nav">
|
|
<?php if ($this->countModules('menu', true)) : ?>
|
|
<nav role="navigation" aria-label="Primary">
|
|
<jdoc:include type="modules" name="menu" style="none" />
|
|
</nav>
|
|
<?php endif; ?>
|
|
<?php if ($this->countModules('search', true)) : ?>
|
|
<div class="container-search">
|
|
<jdoc:include type="modules" name="search" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</header>
|
|
|
|
<div class="site-grid">
|
|
<?php if ($this->countModules('banner', true)) : ?>
|
|
<div class="container-banner full-width">
|
|
<jdoc:include type="modules" name="banner" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('top-a', true)) : ?>
|
|
<div class="grid-child container-top-a">
|
|
<jdoc:include type="modules" name="top-a" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('top-b', true)) : ?>
|
|
<div class="grid-child container-top-b">
|
|
<jdoc:include type="modules" name="top-b" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('sidebar-left', true)) : ?>
|
|
<div class="grid-child container-sidebar-left">
|
|
<jdoc:include type="modules" name="sidebar-left" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="grid-child container-component">
|
|
<jdoc:include type="modules" name="breadcrumbs" style="none" />
|
|
<jdoc:include type="modules" name="main-top" style="card" />
|
|
<jdoc:include type="message" />
|
|
<main id="maincontent" role="main">
|
|
<jdoc:include type="component" />
|
|
</main>
|
|
<jdoc:include type="modules" name="main-bottom" style="card" />
|
|
</div>
|
|
|
|
<?php if ($this->countModules('sidebar-right', true)) : ?>
|
|
<div class="grid-child container-sidebar-right">
|
|
<jdoc:include type="modules" name="sidebar-right" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('bottom-a', true)) : ?>
|
|
<div class="grid-child container-bottom-a">
|
|
<jdoc:include type="modules" name="bottom-a" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('bottom-b', true)) : ?>
|
|
<div class="grid-child container-bottom-b">
|
|
<jdoc:include type="modules" name="bottom-b" style="card" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<footer class="container-footer footer full-width">
|
|
<?php if ($this->countModules('footer-menu', true)) : ?>
|
|
<div class="grid-child footer-menu">
|
|
<jdoc:include type="modules" name="footer-menu" />
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php if ($this->countModules('footer', true)) : ?>
|
|
<div class="grid-child">
|
|
<jdoc:include type="modules" name="footer" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
</footer>
|
|
|
|
<?php if ($this->params->get('backTop') == 1) : ?>
|
|
<a href="#top" id="back-top" class="back-to-top-link" aria-label="<?php echo Text::_('TPL_MOKOCASSIOPEIA_BACKTOTOP'); ?>">
|
|
<span class="icon-arrow-up icon-fw" aria-hidden="true"></span>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('drawer-left', true)) : ?>
|
|
<!-- Left Offcanvas Drawer -->
|
|
<aside class="offcanvas offcanvas-start" tabindex="-1" id="drawer-left">
|
|
<div class="offcanvas-header">
|
|
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="<?php echo Text::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<jdoc:include type="modules" name="drawer-left" style="none" />
|
|
</div>
|
|
</aside>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->countModules('drawer-right', true)) : ?>
|
|
<!-- Right Offcanvas Drawer -->
|
|
<aside class="offcanvas offcanvas-end" tabindex="-1" id="drawer-right">
|
|
<div class="offcanvas-header">
|
|
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="<?php echo Text::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<jdoc:include type="modules" name="drawer-right" style="none" />
|
|
</div>
|
|
</aside>
|
|
<?php endif; ?>
|
|
|
|
<jdoc:include type="modules" name="debug" style="none" />
|
|
|
|
</body>
|
|
</html>
|