From 7f0737f1bb31bd86a1b14ae6da79eef78b4d5a6e Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Sat, 4 Apr 2026 11:49:26 -0500 Subject: [PATCH] Add module overrides with showtitle, fix footer and a11y positioning New module overrides with showtitle support: - mod_stats, mod_feed, mod_wrapper, mod_whosonline, mod_users_latest Footer CSS: - Each footer module now stacks full-width (flex-direction: column) - Remove hardcoded padding-right: 300px inline style - Dynamic footer padding-right based on theme FAB and a11y toolbar Accessibility toolbar positioning: - Toolbar now sits to the right of the theme FAB (bottom-right area) - Shifts automatically when theme FAB is enabled via CSS attribute selectors on body data attributes Co-Authored-By: Claude Opus 4.6 (1M context) --- src/html/mod_feed/default.php | 88 +++++++++++++++++++++++++++ src/html/mod_feed/index.html | 76 +++++++++++++++++++++++ src/html/mod_stats/default.php | 37 +++++++++++ src/html/mod_stats/index.html | 76 +++++++++++++++++++++++ src/html/mod_users_latest/default.php | 41 +++++++++++++ src/html/mod_users_latest/index.html | 76 +++++++++++++++++++++++ src/html/mod_whosonline/default.php | 43 +++++++++++++ src/html/mod_whosonline/index.html | 76 +++++++++++++++++++++++ src/html/mod_wrapper/default.php | 39 ++++++++++++ src/html/mod_wrapper/index.html | 76 +++++++++++++++++++++++ src/index.php | 3 - src/media/css/template.css | 33 ++++++---- 12 files changed, 650 insertions(+), 14 deletions(-) create mode 100644 src/html/mod_feed/default.php create mode 100644 src/html/mod_feed/index.html create mode 100644 src/html/mod_stats/default.php create mode 100644 src/html/mod_stats/index.html create mode 100644 src/html/mod_users_latest/default.php create mode 100644 src/html/mod_users_latest/index.html create mode 100644 src/html/mod_whosonline/default.php create mode 100644 src/html/mod_whosonline/index.html create mode 100644 src/html/mod_wrapper/default.php create mode 100644 src/html/mod_wrapper/index.html diff --git a/src/html/mod_feed/default.php b/src/html/mod_feed/default.php new file mode 100644 index 0000000..f9ddb8f --- /dev/null +++ b/src/html/mod_feed/default.php @@ -0,0 +1,88 @@ + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/** + * Default layout override for mod_feed. + * Adds showtitle support. + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\HTML\HTMLHelper; + +if (!$feed) { + return; +} + +$suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); +$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); +$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); +$rssurl = $params->get('rssurl', ''); +$rsstitle = $params->get('rsstitle', 1); +$rssdesc = $params->get('rssrtl', 0) ? ' feed-rtl' : ''; +$rssimage = $params->get('rssimage', 1); +$rssitems = $params->get('rssitems', 5); +$rssitemdesc = $params->get('rssitemdesc', 1); +$word_count = $params->get('word_count', 0); +?> +
+ showtitle) : ?> + < class="mod-feed__title">title; ?>> + + + title && $rsstitle) : ?> +

+ + + title; ?> + + + title; ?> + +

+ + + description && $rssdesc) : ?> +

description; ?>

+ + + image) : ?> + <?php echo $feed->image->title ?? ''; ?> + + + items)) : ?> + + +
diff --git a/src/html/mod_feed/index.html b/src/html/mod_feed/index.html new file mode 100644 index 0000000..1a6c6cf --- /dev/null +++ b/src/html/mod_feed/index.html @@ -0,0 +1,76 @@ + + + + + + + Redirecting… + + + + + + + + + + + + + + + + + + + +
Redirecting to the site root… If you are not redirected, click here.
+ + diff --git a/src/html/mod_stats/default.php b/src/html/mod_stats/default.php new file mode 100644 index 0000000..1c78908 --- /dev/null +++ b/src/html/mod_stats/default.php @@ -0,0 +1,37 @@ + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/** + * Default layout override for mod_stats. + * Adds showtitle support. + */ + +defined('_JEXEC') or die; + +if (empty($list)) { + return; +} + +$suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); +$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); +$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); +?> +
+ showtitle) : ?> + < class="mod-stats__title">title; ?>> + + +
diff --git a/src/html/mod_stats/index.html b/src/html/mod_stats/index.html new file mode 100644 index 0000000..1a6c6cf --- /dev/null +++ b/src/html/mod_stats/index.html @@ -0,0 +1,76 @@ + + + + + + + Redirecting… + + + + + + + + + + + + + + + + + + + +
Redirecting to the site root… If you are not redirected, click here.
+ + diff --git a/src/html/mod_users_latest/default.php b/src/html/mod_users_latest/default.php new file mode 100644 index 0000000..48c3404 --- /dev/null +++ b/src/html/mod_users_latest/default.php @@ -0,0 +1,41 @@ + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/** + * Default layout override for mod_users_latest. + * Adds showtitle support. + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\HTML\HTMLHelper; + +if (empty($names)) { + return; +} + +$suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); +$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); +$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); +?> +
+ showtitle) : ?> + < class="mod-users-latest__title">title; ?>> + + +
diff --git a/src/html/mod_users_latest/index.html b/src/html/mod_users_latest/index.html new file mode 100644 index 0000000..1a6c6cf --- /dev/null +++ b/src/html/mod_users_latest/index.html @@ -0,0 +1,76 @@ + + + + + + + Redirecting… + + + + + + + + + + + + + + + + + + + +
Redirecting to the site root… If you are not redirected, click here.
+ + diff --git a/src/html/mod_whosonline/default.php b/src/html/mod_whosonline/default.php new file mode 100644 index 0000000..e3942fc --- /dev/null +++ b/src/html/mod_whosonline/default.php @@ -0,0 +1,43 @@ + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/** + * Default layout override for mod_whosonline. + * Adds showtitle support. + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Language\Text; + +$suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); +$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); +$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); +$showmode = $params->get('showmode', 0); +?> +
+ showtitle) : ?> + < class="mod-whosonline__title">title; ?>> + + + +

+
+ +

+ + + + + +
diff --git a/src/html/mod_whosonline/index.html b/src/html/mod_whosonline/index.html new file mode 100644 index 0000000..1a6c6cf --- /dev/null +++ b/src/html/mod_whosonline/index.html @@ -0,0 +1,76 @@ + + + + + + + Redirecting… + + + + + + + + + + + + + + + + + + + +
Redirecting to the site root… If you are not redirected, click here.
+ + diff --git a/src/html/mod_wrapper/default.php b/src/html/mod_wrapper/default.php new file mode 100644 index 0000000..91b608b --- /dev/null +++ b/src/html/mod_wrapper/default.php @@ -0,0 +1,39 @@ + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +/** + * Default layout override for mod_wrapper. + * Adds showtitle support. + */ + +defined('_JEXEC') or die; + +$suffix = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8'); +$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_COMPAT, 'UTF-8'); +$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_COMPAT, 'UTF-8'); +$url = htmlspecialchars($params->get('url', ''), ENT_COMPAT, 'UTF-8'); +$width = htmlspecialchars($params->get('width', '100%'), ENT_COMPAT, 'UTF-8'); +$height = htmlspecialchars($params->get('height', '500'), ENT_COMPAT, 'UTF-8'); +$scrolling = $params->get('scrolling', 'auto'); +$frameborder = $params->get('frameborder', 0) ? '1' : '0'; +?> +
+ showtitle) : ?> + < class="mod-wrapper__title">title; ?>> + + +
diff --git a/src/html/mod_wrapper/index.html b/src/html/mod_wrapper/index.html new file mode 100644 index 0000000..1a6c6cf --- /dev/null +++ b/src/html/mod_wrapper/index.html @@ -0,0 +1,76 @@ + + + + + + + Redirecting… + + + + + + + + + + + + + + + + + + + +
Redirecting to the site root… If you are not redirected, click here.
+ + diff --git a/src/index.php b/src/index.php index 5ac9797..d6a208b 100644 --- a/src/index.php +++ b/src/index.php @@ -280,9 +280,6 @@ $wa->useScript('user.js'); // js/user.js }); - - - diff --git a/src/media/css/template.css b/src/media/css/template.css index 3cb7a12..2c25ee8 100644 --- a/src/media/css/template.css +++ b/src/media/css/template.css @@ -13992,18 +13992,27 @@ meter { color: var(--body-bg, #e6ebf1); background-color: var(--nav-bg-color); padding-left: 100px; + padding-right: 60px; +} + +/* Increase footer right padding when floating controls are present */ +body[data-theme-fab-enabled="1"] .footer { + padding-right: 220px; +} + +body[data-theme-fab-enabled="1"][data-a11y-toolbar="1"] .footer { + padding-right: 420px; } .footer .grid-child { display: -webkit-box; display: -ms-flexbox; display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + width: 100%; padding: 2.5rem 0.5em; } @@ -17241,15 +17250,17 @@ html.a11y-pause-animations *::after { z-index: 1201; display: flex; flex-direction: column; - align-items: flex-start; + align-items: flex-end; gap: .25rem; font-family: inherit; + bottom: 1rem; + right: 2.5rem; } -#mokoA11yToolbar.a11y-pos-tl { top: 1rem; left: 1rem; } -#mokoA11yToolbar.a11y-pos-tr { top: 1rem; right: 1rem; align-items: flex-end; } -#mokoA11yToolbar.a11y-pos-bl { bottom: 1rem; left: 1rem; } -#mokoA11yToolbar.a11y-pos-br { bottom: 1rem; right: 1rem; align-items: flex-end; } +/* When theme FAB is present, shift a11y toolbar to sit to its right */ +body[data-theme-fab-enabled="1"] #mokoA11yToolbar { + right: calc(2.5rem + 200px); +} /* Toggle button */ .a11y-toggle {