feat: add WYSIWYG content editor with card display on hero
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Update Server / Update Server (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled

- Add heroContent param with Joomla editor field for rich HTML input
- Add showCard toggle to wrap content in a styled card (white bg, shadow, rounded)
- Card CSS: semi-transparent white, 8px radius, centered, max 700px
- Remove old $module->content fallback — content now comes from params
- Language strings for en-GB and en-US (both .ini and .sys.ini)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-28 22:55:54 -05:00
parent 33980dbe1e
commit d738d75fad
8 changed files with 89 additions and 4 deletions
+10 -4
View File
@@ -23,6 +23,8 @@ use Joomla\CMS\Language\Text;
/** @var float $overlayOpacity */
/** @var string $textAlign */
/** @var string $textColor */
/** @var string $heroContent */
/** @var bool $showCard */
/** @var string $content */
$moduleId = 'mod-mokojoomhero-' . $module->id;
@@ -62,10 +64,14 @@ $heightAttr = htmlspecialchars($heroHeight, ENT_QUOTES, 'UTF-8');
<?php // Overlay + content ?>
<div class="mokojoomhero__overlay" style="background-color: <?php echo $rgba; ?>;">
<div class="mokojoomhero__content" style="text-align: <?php echo htmlspecialchars($textAlign, ENT_QUOTES, 'UTF-8'); ?>; color: <?php echo htmlspecialchars($textColor, ENT_QUOTES, 'UTF-8'); ?>;">
<?php if ($content) : ?>
<?php echo $content; ?>
<?php else : ?>
<p><?php echo Text::_('MOD_MOKOJOOMHERO_NO_CONTENT'); ?></p>
<?php if ($heroContent) : ?>
<?php if ($showCard) : ?>
<div class="mokojoomhero__card">
<?php echo $heroContent; ?>
</div>
<?php else : ?>
<?php echo $heroContent; ?>
<?php endif; ?>
<?php endif; ?>
</div>
</div>