Module overrides with showtitle, suffix, and header_tag support + CSS
New default.php overrides for 11 Joomla core modules: - mod_custom (default + updated hero layout) - mod_articles_latest, mod_articles_popular, mod_articles_news - mod_articles_category, mod_breadcrumbs, mod_footer - mod_login (BS5 form with FA7 icons), mod_finder (BS5 search) - mod_tags_popular (badge layout), mod_tags_similar, mod_related_items All overrides consistently respect: - $module->showtitle — renders title only when enabled - header_tag param — configurable heading level (h1-h6) - header_class param — custom CSS class on the title - moduleclass_sfx — custom suffix class on the wrapper CSS additions in template.css: - Shared __title styles for all module headings - List styling for article/tag/related modules - Newsflash card layout, tag badges, search form, login form - Breadcrumb and footer module styling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
75
src/html/mod_articles_category/default.php
Normal file
75
src/html/mod_articles_category/default.php
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_articles_category.
|
||||||
|
* Adds showtitle support and respects module settings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-articles-category<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-articles-category__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul class="mod-articles-category__list">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<li class="mod-articles-category__item" itemscope itemtype="https://schema.org/Article">
|
||||||
|
<?php if ($params->get('link_titles') == 1) : ?>
|
||||||
|
<a class="mod-articles-category__link" href="<?php echo $item->link; ?>" itemprop="url">
|
||||||
|
<span itemprop="name"><?php echo $item->title; ?></span>
|
||||||
|
</a>
|
||||||
|
<?php else : ?>
|
||||||
|
<span itemprop="name"><?php echo $item->title; ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($item->displayHits) : ?>
|
||||||
|
<span class="mod-articles-category__hits">
|
||||||
|
(<?php echo $item->displayHits; ?>)
|
||||||
|
</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('show_author', 0)) : ?>
|
||||||
|
<span class="mod-articles-category__author">
|
||||||
|
<?php echo $item->displayAuthorName; ?>
|
||||||
|
</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($item->displayDate) : ?>
|
||||||
|
<time class="mod-articles-category__date" datetime="<?php echo HTMLHelper::_('date', $item->displayDate, 'c'); ?>" itemprop="datePublished">
|
||||||
|
<?php echo $item->displayDate; ?>
|
||||||
|
</time>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('show_introtext', 0)) : ?>
|
||||||
|
<div class="mod-articles-category__intro" itemprop="description">
|
||||||
|
<?php echo $item->displayIntrotext; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('show_readmore', 0)) : ?>
|
||||||
|
<a class="mod-articles-category__readmore" href="<?php echo $item->link; ?>" itemprop="url">
|
||||||
|
<?php echo Text::_('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
76
src/html/mod_articles_category/index.html
Normal file
76
src/html/mod_articles_category/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
40
src/html/mod_articles_latest/default.php
Normal file
40
src/html/mod_articles_latest/default.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_articles_latest.
|
||||||
|
* Adds showtitle support and respects module settings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-articles-latest<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-articles-latest__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul class="mod-articles-latest__list">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<li class="mod-articles-latest__item" itemscope itemtype="https://schema.org/Article">
|
||||||
|
<a href="<?php echo $item->link; ?>" itemprop="url">
|
||||||
|
<span itemprop="name"><?php echo $item->title; ?></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
76
src/html/mod_articles_latest/index.html
Normal file
76
src/html/mod_articles_latest/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
58
src/html/mod_articles_news/default.php
Normal file
58
src/html/mod_articles_news/default.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_articles_news (newsflash).
|
||||||
|
* Adds showtitle support with card-based layout.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-articles-news newsflash<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-articles-news__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<div class="mod-articles-news__item" itemscope itemtype="https://schema.org/Article">
|
||||||
|
<?php if ($params->get('item_title')) : ?>
|
||||||
|
<h4 class="mod-articles-news__item-title" itemprop="name">
|
||||||
|
<?php if ($item->link !== '' && $params->get('link_titles')) : ?>
|
||||||
|
<a href="<?php echo $item->link; ?>" itemprop="url"><?php echo $item->title; ?></a>
|
||||||
|
<?php else : ?>
|
||||||
|
<?php echo $item->title; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</h4>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (!empty($item->afterDisplayTitle)) : ?>
|
||||||
|
<?php echo $item->afterDisplayTitle; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('show_introtext', 1)) : ?>
|
||||||
|
<div class="mod-articles-news__intro" itemprop="description">
|
||||||
|
<?php echo $item->introtext; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($item->readmore) && $item->readmore) : ?>
|
||||||
|
<a class="mod-articles-news__readmore" href="<?php echo $item->link; ?>" itemprop="url">
|
||||||
|
<?php echo $item->linkText; ?>
|
||||||
|
</a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
76
src/html/mod_articles_news/index.html
Normal file
76
src/html/mod_articles_news/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
src/html/mod_articles_popular/default.php
Normal file
38
src/html/mod_articles_popular/default.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_articles_popular.
|
||||||
|
* Adds showtitle support and respects module settings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-articles-popular<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-articles-popular__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul class="mod-articles-popular__list">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<li class="mod-articles-popular__item" itemscope itemtype="https://schema.org/Article">
|
||||||
|
<a href="<?php echo $item->link; ?>" itemprop="url">
|
||||||
|
<span itemprop="name"><?php echo $item->title; ?></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
76
src/html/mod_articles_popular/index.html
Normal file
76
src/html/mod_articles_popular/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
45
src/html/mod_breadcrumbs/default.php
Normal file
45
src/html/mod_breadcrumbs/default.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_breadcrumbs.
|
||||||
|
* Bootstrap 5 breadcrumb with schema.org BreadcrumbList markup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<nav class="mod-breadcrumbs<?php echo $suffix ? ' ' . $suffix : ''; ?>" aria-label="<?php echo Text::_('MOD_BREADCRUMBS_HERE'); ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-breadcrumbs__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ol class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||||
|
<?php foreach ($list as $key => $item) : ?>
|
||||||
|
<?php
|
||||||
|
$isLast = ($key === array_key_last($list));
|
||||||
|
?>
|
||||||
|
<li class="breadcrumb-item<?php echo $isLast ? ' active' : ''; ?>" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"
|
||||||
|
<?php echo $isLast ? ' aria-current="page"' : ''; ?>>
|
||||||
|
<?php if (!$isLast && $item->link) : ?>
|
||||||
|
<a href="<?php echo $item->link; ?>" itemprop="item">
|
||||||
|
<span itemprop="name"><?php echo $item->name; ?></span>
|
||||||
|
</a>
|
||||||
|
<?php else : ?>
|
||||||
|
<span itemprop="name"><?php echo $item->name; ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
<meta itemprop="position" content="<?php echo $key + 1; ?>" />
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
76
src/html/mod_breadcrumbs/index.html
Normal file
76
src/html/mod_breadcrumbs/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
39
src/html/mod_custom/default.php
Normal file
39
src/html/mod_custom/default.php
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_custom.
|
||||||
|
* Adds showtitle support and respects all module settings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
|
||||||
|
$modId = 'mod-custom' . $module->id;
|
||||||
|
$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');
|
||||||
|
|
||||||
|
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<?php echo $suffix ? ' ' . $suffix : ''; ?>" id="<?php echo $modId; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-custom__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $module->content; ?>
|
||||||
|
</div>
|
||||||
@@ -18,8 +18,10 @@ defined('_JEXEC') or die;
|
|||||||
use Joomla\CMS\HTML\HTMLHelper;
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
use Joomla\CMS\Uri\Uri;
|
use Joomla\CMS\Uri\Uri;
|
||||||
|
|
||||||
$modId = 'mod-custom' . $module->id;
|
$modId = 'mod-custom' . $module->id;
|
||||||
$moduleclass = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
$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');
|
||||||
|
|
||||||
if ($params->get('backgroundimage')) {
|
if ($params->get('backgroundimage')) {
|
||||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||||
@@ -30,9 +32,11 @@ if ($params->get('backgroundimage')) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
<div class="mod-custom custom banner-overlay custom-hero<?php echo $suffix ? ' ' . $suffix : ''; ?>" id="<?php echo $modId; ?>">
|
||||||
<div class="mod-custom custom banner-overlay custom-hero<?php echo $moduleclass ? ' ' . $moduleclass : ''; ?>" id="<?php echo $modId; ?>">
|
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-custom__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
<?php echo $module->content; ?>
|
<?php echo $module->content; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
48
src/html/mod_finder/default.php
Normal file
48
src/html/mod_finder/default.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_finder (Smart Search).
|
||||||
|
* Bootstrap 5 search form with showtitle support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
|
||||||
|
$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');
|
||||||
|
?>
|
||||||
|
<div class="mod-finder<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-finder__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<form action="<?php echo Route::_($route); ?>" method="get" class="mod-finder__form" role="search">
|
||||||
|
<div class="input-group">
|
||||||
|
<label for="mod-finder-searchword-<?php echo $module->id; ?>" class="visually-hidden">
|
||||||
|
<?php echo Text::_('COM_FINDER_SEARCH_LABEL'); ?>
|
||||||
|
</label>
|
||||||
|
<input type="search" name="q" id="mod-finder-searchword-<?php echo $module->id; ?>"
|
||||||
|
class="form-control" value="<?php echo htmlspecialchars($app->getInput()->get('q', '', 'string'), ENT_COMPAT, 'UTF-8'); ?>"
|
||||||
|
placeholder="<?php echo Text::_('COM_FINDER_SEARCH_LABEL'); ?>">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<span class="fa-solid fa-magnifying-glass" aria-hidden="true"></span>
|
||||||
|
<span class="visually-hidden"><?php echo Text::_('COM_FINDER_SEARCH_LABEL'); ?></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php if ($params->get('show_autosuggest', 1)) : ?>
|
||||||
|
<?php $app->getDocument()->getWebAssetManager()->useScript('awesomplete'); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<input type="hidden" name="option" value="com_finder">
|
||||||
|
<input type="hidden" name="Itemid" value="<?php echo $route; ?>">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
76
src/html/mod_finder/index.html
Normal file
76
src/html/mod_finder/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
30
src/html/mod_footer/default.php
Normal file
30
src/html/mod_footer/default.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_footer.
|
||||||
|
* Adds showtitle support and respects module settings.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-footer<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-footer__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="mod-footer__content">
|
||||||
|
<?php echo $module->content; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
76
src/html/mod_footer/index.html
Normal file
76
src/html/mod_footer/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
123
src/html/mod_login/default.php
Normal file
123
src/html/mod_login/default.php
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_login.
|
||||||
|
* Bootstrap 5 login form with showtitle support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
|
|
||||||
|
$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');
|
||||||
|
?>
|
||||||
|
<div class="mod-login<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-login__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($type === 'logout') : ?>
|
||||||
|
<form action="<?php echo Route::_('index.php', true); ?>" method="post" class="mod-login__form mod-login__form--logout">
|
||||||
|
<?php if ($params->get('greeting', 1)) : ?>
|
||||||
|
<div class="mod-login__greeting">
|
||||||
|
<?php if (!empty($user->name)) : ?>
|
||||||
|
<span class="mod-login__name"><?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->name, ENT_COMPAT, 'UTF-8')); ?></span>
|
||||||
|
<?php else : ?>
|
||||||
|
<span class="mod-login__name"><?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->username, ENT_COMPAT, 'UTF-8')); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="mod-login__submit">
|
||||||
|
<button type="submit" name="Submit" class="btn btn-primary w-100"><?php echo Text::_('JLOGOUT'); ?></button>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="option" value="com_users">
|
||||||
|
<input type="hidden" name="task" value="user.logout">
|
||||||
|
<input type="hidden" name="return" value="<?php echo $return; ?>">
|
||||||
|
<?php echo HTMLHelper::_('form.token'); ?>
|
||||||
|
</form>
|
||||||
|
<?php else : ?>
|
||||||
|
<form action="<?php echo Route::_('index.php', true); ?>" method="post" class="mod-login__form mod-login__form--login">
|
||||||
|
<?php if ($params->get('pretext')) : ?>
|
||||||
|
<div class="mod-login__pretext"><?php echo $params->get('pretext'); ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="mod-login__field mb-3">
|
||||||
|
<label for="modlgn-username-<?php echo $module->id; ?>" class="form-label visually-hidden"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text"><i class="fa-solid fa-user" aria-hidden="true"></i></span>
|
||||||
|
<input id="modlgn-username-<?php echo $module->id; ?>" type="text" name="username" class="form-control" autocomplete="username" placeholder="<?php echo Text::_('JGLOBAL_USERNAME'); ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mod-login__field mb-3">
|
||||||
|
<label for="modlgn-passwd-<?php echo $module->id; ?>" class="form-label visually-hidden"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text"><i class="fa-solid fa-lock" aria-hidden="true"></i></span>
|
||||||
|
<input id="modlgn-passwd-<?php echo $module->id; ?>" type="password" name="password" class="form-control" autocomplete="current-password" placeholder="<?php echo Text::_('JGLOBAL_PASSWORD'); ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (count($twofactormethods) > 1) : ?>
|
||||||
|
<div class="mod-login__field mb-3">
|
||||||
|
<label for="modlgn-secretkey-<?php echo $module->id; ?>" class="form-label visually-hidden"><?php echo Text::_('JGLOBAL_SECRETKEY'); ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text"><i class="fa-solid fa-shield-halved" aria-hidden="true"></i></span>
|
||||||
|
<input id="modlgn-secretkey-<?php echo $module->id; ?>" type="text" name="secretkey" class="form-control" autocomplete="one-time-code" placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('remember', 1)) : ?>
|
||||||
|
<div class="mod-login__remember form-check mb-3">
|
||||||
|
<input id="modlgn-remember-<?php echo $module->id; ?>" type="checkbox" name="remember" class="form-check-input" value="yes">
|
||||||
|
<label for="modlgn-remember-<?php echo $module->id; ?>" class="form-check-label"><?php echo Text::_('JGLOBAL_REMEMBER_ME'); ?></label>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="mod-login__submit mb-3">
|
||||||
|
<button type="submit" name="Submit" class="btn btn-primary w-100"><?php echo Text::_('JLOGIN'); ?></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $usersConfig = \Joomla\CMS\Component\ComponentHelper::getParams('com_users'); ?>
|
||||||
|
<ul class="mod-login__options list-unstyled small">
|
||||||
|
<?php if ($usersConfig->get('allowUserRegistration')) : ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo Route::_('index.php?option=com_users&view=registration'); ?>">
|
||||||
|
<?php echo Text::_('MOD_LOGIN_REGISTER'); ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php endif; ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo Route::_('index.php?option=com_users&view=remind'); ?>">
|
||||||
|
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo Route::_('index.php?option=com_users&view=reset'); ?>">
|
||||||
|
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<input type="hidden" name="option" value="com_users">
|
||||||
|
<input type="hidden" name="task" value="user.login">
|
||||||
|
<input type="hidden" name="return" value="<?php echo $return; ?>">
|
||||||
|
<?php echo HTMLHelper::_('form.token'); ?>
|
||||||
|
|
||||||
|
<?php if ($params->get('posttext')) : ?>
|
||||||
|
<div class="mod-login__posttext"><?php echo $params->get('posttext'); ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</form>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
76
src/html/mod_login/index.html
Normal file
76
src/html/mod_login/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
44
src/html/mod_related_items/default.php
Normal file
44
src/html/mod_related_items/default.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_related_items.
|
||||||
|
* Adds showtitle support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
|
|
||||||
|
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');
|
||||||
|
$showDate = $params->get('showDate', 0);
|
||||||
|
?>
|
||||||
|
<div class="mod-related-items<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-related-items__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul class="mod-related-items__list">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<li class="mod-related-items__item">
|
||||||
|
<a href="<?php echo $item->route; ?>"><?php echo $item->title; ?></a>
|
||||||
|
<?php if ($showDate) : ?>
|
||||||
|
<time class="mod-related-items__date" datetime="<?php echo HTMLHelper::_('date', $item->created, 'c'); ?>">
|
||||||
|
<?php echo HTMLHelper::_('date', $item->created, 'DATE_FORMAT_LC3'); ?>
|
||||||
|
</time>
|
||||||
|
<?php endif; ?>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
76
src/html/mod_related_items/index.html
Normal file
76
src/html/mod_related_items/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
src/html/mod_tags_popular/default.php
Normal file
41
src/html/mod_tags_popular/default.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_tags_popular.
|
||||||
|
* Adds showtitle support with Bootstrap badge-style tags.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-tags-popular<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-tags-popular__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="mod-tags-popular__list d-flex flex-wrap gap-2">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<a class="badge bg-secondary text-decoration-none mod-tags-popular__tag" href="<?php echo $item->link; ?>">
|
||||||
|
<?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?>
|
||||||
|
<?php if ($params->get('show_tag_count', 0)) : ?>
|
||||||
|
<span class="mod-tags-popular__count">(<?php echo $item->count; ?>)</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
76
src/html/mod_tags_popular/index.html
Normal file
76
src/html/mod_tags_popular/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
src/html/mod_tags_similar/default.php
Normal file
38
src/html/mod_tags_similar/default.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default layout override for mod_tags_similar.
|
||||||
|
* Adds showtitle support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<div class="mod-tags-similar<?php echo $suffix ? ' ' . $suffix : ''; ?>">
|
||||||
|
<?php if ($module->showtitle) : ?>
|
||||||
|
<<?php echo $headerTag; ?> class="mod-tags-similar__title<?php echo $headerClass ? ' ' . $headerClass : ''; ?>"><?php echo $module->title; ?></<?php echo $headerTag; ?>>
|
||||||
|
<?php endif; ?>
|
||||||
|
<ul class="mod-tags-similar__list">
|
||||||
|
<?php foreach ($list as $item) : ?>
|
||||||
|
<li class="mod-tags-similar__item">
|
||||||
|
<a href="<?php echo $item->link; ?>"><?php echo htmlspecialchars($item->core_title, ENT_COMPAT, 'UTF-8'); ?></a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
76
src/html/mod_tags_similar/index.html
Normal file
76
src/html/mod_tags_similar/index.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!-- 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
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Redirecting…</title>
|
||||||
|
|
||||||
|
<!-- Search engines: do not index this placeholder redirect page -->
|
||||||
|
<meta name="robots" content="noindex, nofollow, noarchive" />
|
||||||
|
|
||||||
|
<!-- Instant redirect fallback even if JavaScript is disabled -->
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
|
||||||
|
<!-- Canonical root reference -->
|
||||||
|
<link rel="canonical" href="/" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
(function redirectToRoot() {
|
||||||
|
// Configuration object with safe defaults.
|
||||||
|
var opts = {
|
||||||
|
fallbackPath: "/", // string: fallback destination if origin is unavailable
|
||||||
|
delayMs: 0, // number: delay before redirect in ms (0 = immediate)
|
||||||
|
behavior: "replace" // enum: "replace" | "assign"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Determine absolute origin in all mainstream browsers.
|
||||||
|
var origin = (typeof location.origin === "string" && location.origin)
|
||||||
|
|| (location.protocol + "//" + location.host);
|
||||||
|
|
||||||
|
// Final destination: absolute root of the current site, or fallback path.
|
||||||
|
var destination = origin ? origin + "/" : opts.fallbackPath;
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
if (opts.behavior === "assign") {
|
||||||
|
location.assign(destination);
|
||||||
|
} else {
|
||||||
|
location.replace(destination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute redirect, optionally after a short delay.
|
||||||
|
if (opts.delayMs > 0) {
|
||||||
|
setTimeout(go, opts.delayMs);
|
||||||
|
} else {
|
||||||
|
go();
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Secondary meta-refresh for no-JS environments is already set above.
|
||||||
|
Some very old crawlers may ignore JS; the meta refresh ensures coverage.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<!-- Extra defense-in-depth: if JS is disabled, meta refresh (above) handles redirect. -->
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; }
|
||||||
|
body { display:flex; align-items:center; justify-content:center; margin:0; font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
|
||||||
|
.msg { opacity: .75; text-align: center; }
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="msg">Redirecting to the site root… If you are not redirected, <a href="/">click here</a>.</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -14562,6 +14562,147 @@ iframe {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── MODULE TITLES ── */
|
||||||
|
/* Shared styles for module titles rendered by MokoCassiopeia overrides */
|
||||||
|
[class*="__title"] {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: .75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--body-color, #212529);
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Article list modules */
|
||||||
|
.mod-articles-latest__list,
|
||||||
|
.mod-articles-popular__list,
|
||||||
|
.mod-articles-category__list,
|
||||||
|
.mod-related-items__list,
|
||||||
|
.mod-tags-similar__list {
|
||||||
|
list-style: none;
|
||||||
|
padding-left: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-latest__item,
|
||||||
|
.mod-articles-popular__item,
|
||||||
|
.mod-articles-category__item,
|
||||||
|
.mod-related-items__item,
|
||||||
|
.mod-tags-similar__item {
|
||||||
|
padding: .4rem 0;
|
||||||
|
border-bottom: 1px solid var(--border-color, #dee2e6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-latest__item:last-child,
|
||||||
|
.mod-articles-popular__item:last-child,
|
||||||
|
.mod-articles-category__item:last-child,
|
||||||
|
.mod-related-items__item:last-child,
|
||||||
|
.mod-tags-similar__item:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-latest__item a,
|
||||||
|
.mod-articles-popular__item a,
|
||||||
|
.mod-articles-category__link,
|
||||||
|
.mod-related-items__item a,
|
||||||
|
.mod-tags-similar__item a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--link-color, #0d6efd);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-latest__item a:hover,
|
||||||
|
.mod-articles-popular__item a:hover,
|
||||||
|
.mod-articles-category__link:hover,
|
||||||
|
.mod-related-items__item a:hover,
|
||||||
|
.mod-tags-similar__item a:hover {
|
||||||
|
color: var(--link-hover-color, #0a58ca);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Article category module extras */
|
||||||
|
.mod-articles-category__date,
|
||||||
|
.mod-related-items__date {
|
||||||
|
display: block;
|
||||||
|
font-size: .85em;
|
||||||
|
color: var(--secondary-color, #6c757d);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-category__author {
|
||||||
|
font-size: .85em;
|
||||||
|
color: var(--secondary-color, #6c757d);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-category__intro,
|
||||||
|
.mod-articles-news__intro {
|
||||||
|
margin-top: .25rem;
|
||||||
|
font-size: .9em;
|
||||||
|
color: var(--body-color, #212529);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-category__readmore,
|
||||||
|
.mod-articles-news__readmore {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: .25rem;
|
||||||
|
font-size: .85em;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Newsflash module */
|
||||||
|
.mod-articles-news__item {
|
||||||
|
padding: .75rem 0;
|
||||||
|
border-bottom: 1px solid var(--border-color, #dee2e6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-news__item:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-articles-news__item-title {
|
||||||
|
margin-bottom: .25rem;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tags module */
|
||||||
|
.mod-tags-popular__tag {
|
||||||
|
font-size: .85rem;
|
||||||
|
transition: background-color .15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-tags-popular__tag:hover {
|
||||||
|
filter: brightness(1.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Search / Finder module */
|
||||||
|
.mod-finder__form .input-group {
|
||||||
|
border-radius: var(--border-radius, .25rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Login module */
|
||||||
|
.mod-login__greeting {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-login__options {
|
||||||
|
margin-top: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mod-login__options li + li {
|
||||||
|
margin-top: .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Breadcrumbs module */
|
||||||
|
.mod-breadcrumbs .breadcrumb {
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer module */
|
||||||
|
.mod-footer__content {
|
||||||
|
font-size: .9em;
|
||||||
|
color: var(--secondary-color, #6c757d);
|
||||||
|
}
|
||||||
|
|
||||||
/* HERO CONTAINER */
|
/* HERO CONTAINER */
|
||||||
.hero-overlay {
|
.hero-overlay {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
Reference in New Issue
Block a user