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>
This commit is contained in:
2026-03-17 18:55:43 -05:00
parent 1d17fd9ae9
commit 40cce64afc
3 changed files with 46 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
{
"permissions": {
"allow": [
"Bash(git checkout:*)",
"Bash(git branch:*)"
]
}
}

View File

@@ -0,0 +1,36 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_custom
*
* @copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Template override for mod_custom adding banner-overlay wrapper pattern.
* Based on Cassiopeia's banner layout approach.
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
$modId = 'mod-custom' . $module->id;
$moduleclass = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
if ($params->get('backgroundimage')) {
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$wa->addInlineStyle(
'#' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}',
['name' => $modId]
);
}
?>
<div class="mod-custom custom banner-overlay<?php echo $moduleclass ? ' ' . $moduleclass : ''; ?>" id="<?php echo $modId; ?>">
<div class="overlay">
<?php echo $module->content; ?>
</div>
</div>

View File

@@ -25,7 +25,7 @@
DEFGROUP: Joomla
INGROUP: MokoCassiopeia
PATH: templates/mokocassiopeia/templateDetails.xml
VERSION: 03.08.04
VERSION: 03.09.01
BRIEF: Template manifest XML file for MokoCassiopeia
=========================================================================
-->
@@ -36,7 +36,7 @@
</server>
</updateservers>
<name>MokoCassiopeia</name>
<version>03.09.00</version>
<version>03.09.01</version>
<creationDate>2026-03-08</creationDate>
<author>Jonathan Miller || Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>