* 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>
369 lines
15 KiB
PHP
369 lines
15 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
|
|
|
|
|
|
|
|
# FILE INFORMATION
|
|
DEFGROUP: Joomla.Template.Site
|
|
INGROUP: MokoCassiopeia
|
|
REPO: https://github.com/mokoconsulting-tech/MokoCassiopeia
|
|
PATH: ./templates/mokocassiopeia/offline.php
|
|
VERSION: 03.06.02
|
|
BRIEF: Offline page template file for MokoCassiopeia
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Component\ComponentHelper;
|
|
use Joomla\CMS\Factory;
|
|
use Joomla\CMS\HTML\HTMLHelper;
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\Router\Route;
|
|
use Joomla\CMS\Uri\Uri;
|
|
|
|
/**
|
|
* @var \Joomla\CMS\Document\HtmlDocument $this
|
|
* @var \Joomla\Registry\Registry $this->params
|
|
* @var string $this->language
|
|
* @var string $this->direction
|
|
*/
|
|
|
|
$app = Factory::getApplication();
|
|
$doc = Factory::getDocument();
|
|
$params = $this->params ?: $app->getTemplate(true)->params;
|
|
$direction = $this->direction ?: 'ltr';
|
|
|
|
/* -----------------------
|
|
Load ONLY template.css + theme palettes (with min toggle)
|
|
------------------------ */
|
|
$useMin = !((int) $params->get('development_mode', 0) === 1);
|
|
$assetSuffix = $useMin ? '.min' : '';
|
|
$base = rtrim(Uri::root(true), '/') . '/templates/' . $this->template . '/css/';
|
|
$jsBase = rtrim(Uri::root(true), '/') . '/templates/' . $this->template . '/js/';
|
|
|
|
$doc->addStyleSheet($base . 'template' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-template']);
|
|
|
|
/* Load theme palettes */
|
|
$doc->addStyleSheet($base . 'theme/light.standard' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-light-standard']);
|
|
$doc->addStyleSheet($base . 'theme/dark.standard' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-dark-standard']);
|
|
|
|
/* Load custom palettes only if selected in template configuration AND files exist */
|
|
$params_LightColorName = (string) $params->get('colorLightName', 'standard');
|
|
$params_DarkColorName = (string) $params->get('colorDarkName', 'standard');
|
|
if ($params_LightColorName === 'custom' && file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/light.custom.css'))
|
|
{
|
|
$doc->addStyleSheet($base . 'theme/light.custom' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-light-custom']);
|
|
}
|
|
if ($params_DarkColorName === 'custom' && file_exists(JPATH_ROOT . '/media/templates/site/mokocassiopeia/css/theme/dark.custom.css'))
|
|
{
|
|
$doc->addStyleSheet($base . 'theme/dark.custom' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-dark-custom']);
|
|
}
|
|
|
|
/* Load user assets last (after all other styles and scripts) */
|
|
$doc->addStyleSheet($base . 'user' . $assetSuffix . '.css', ['version' => 'auto'], ['id' => 'moko-user']);
|
|
|
|
/* Bootstrap CSS/JS for accordion behavior; safe to keep. */
|
|
HTMLHelper::_('bootstrap.loadCss', true, $doc);
|
|
HTMLHelper::_('bootstrap.framework');
|
|
|
|
/* Load template.js for theme switcher and other functionality */
|
|
$doc->addScript($jsBase . 'template' . $assetSuffix . '.js', ['version' => 'auto', 'defer' => true], ['id' => 'moko-template-js']);
|
|
|
|
/* Load user.js last for custom user scripts */
|
|
$doc->addScript($jsBase . 'user' . $assetSuffix . '.js', ['version' => 'auto', 'defer' => true], ['id' => 'moko-user-js']);
|
|
|
|
/* -----------------------
|
|
Title + Meta (Include Site Name in Page Titles)
|
|
------------------------ */
|
|
$sitename = (string) $app->get('sitename');
|
|
$baseTitle = Text::_('JGLOBAL_OFFLINE') ?: 'Offline';
|
|
$snSetting = (int) $app->get('sitename_pagetitles', 0); // 0=no, 1=before, 2=after
|
|
|
|
if ($snSetting === 1) {
|
|
$doc->setTitle(Text::sprintf('JPAGETITLE', $sitename, $baseTitle)); // Site Name BEFORE
|
|
} elseif ($snSetting === 2) {
|
|
$doc->setTitle(Text::sprintf('JPAGETITLE', $baseTitle, $sitename)); // Site Name AFTER
|
|
} else {
|
|
$doc->setTitle($baseTitle);
|
|
}
|
|
$doc->setMetaData('robots', 'noindex, nofollow');
|
|
|
|
/* -----------------------
|
|
Offline content from Global Config
|
|
------------------------ */
|
|
$displayOfflineMessage = (int) $app->get('display_offline_message', 1); // 0|1|2
|
|
$offlineMessage = trim((string) $app->get('offline_message', ''));
|
|
|
|
/* -----------------------
|
|
Brand: logo from params OR siteTitle (matches index.php)
|
|
------------------------ */
|
|
$brandHtml = '';
|
|
$logoFile = (string) $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 = $params->get('siteTitle', 'MokoCassiopeia');
|
|
$brandHtml = '<span class="site-title" title="' . $sitename . '">'
|
|
. htmlspecialchars($siteTitle, ENT_COMPAT, 'UTF-8')
|
|
. '</span>';
|
|
}
|
|
|
|
$brandTagline = (string) ($params->get('brand_tagline') ?: $params->get('siteDescription') ?: '');
|
|
$showTagline = (int) $params->get('show_brand_tagline', 0);
|
|
|
|
// Theme params
|
|
$params_theme_enabled = (int) $params->get('theme_enabled', 1);
|
|
|
|
// Analytics params
|
|
$params_googletagmanager = $params->get('googletagmanager', false);
|
|
$params_googletagmanagerid = $params->get('googletagmanagerid', null);
|
|
$params_googleanalytics = $params->get('googleanalytics', false);
|
|
$params_googleanalyticsid = $params->get('googleanalyticsid', null);
|
|
$params_googlesitekey = $params->get('googlesitekey', null);
|
|
|
|
if (!empty($params_googlesitekey)) {
|
|
$doc->setMetaData('google-site-verification', htmlspecialchars($params_googlesitekey, ENT_QUOTES, 'UTF-8'));
|
|
}
|
|
|
|
/* -----------------------
|
|
Login routes & Users
|
|
------------------------ */
|
|
$action = Route::_('index.php', true);
|
|
$return = base64_encode(Uri::base());
|
|
$allowRegistration = (bool) ComponentHelper::getParams('com_users')->get('allowUserRegistration', 0);
|
|
|
|
if (class_exists('\Joomla\Component\Users\Site\Helper\RouteHelper')) {
|
|
$resetUrl = \Joomla\Component\Users\Site\Helper\RouteHelper::getResetRoute();
|
|
$remindUrl = \Joomla\Component\Users\Site\Helper\RouteHelper::getRemindRoute();
|
|
$registrationUrl = \Joomla\Component\Users\Site\Helper\RouteHelper::getRegistrationRoute();
|
|
} else {
|
|
$resetUrl = Route::_('index.php?option=com_users&view=reset');
|
|
$remindUrl = Route::_('index.php?option=com_users&view=remind');
|
|
$registrationUrl = Route::_('index.php?option=com_users&view=registration');
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?php echo htmlspecialchars($this->language ?? 'en', ENT_QUOTES, 'UTF-8'); ?>" dir="<?php echo htmlspecialchars($direction, ENT_QUOTES, 'UTF-8'); ?>">
|
|
<head>
|
|
<jdoc:include type="head" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<?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; ?>
|
|
|
|
<style>
|
|
.moko-offline-wrap { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
|
|
.moko-offline-main { display: grid; place-items: center; padding: 2rem 1rem; }
|
|
.moko-card { max-width: 720px; width: 100%; }
|
|
.moko-brand { display:flex; align-items:center; gap:.75rem; text-decoration:none; }
|
|
.moko-brand .brand-tagline { display:block; opacity:.75; font-size:.875rem; line-height:1.2; }
|
|
.skip-link { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
|
|
.skip-link:focus { position:static; width:auto; height:auto; padding:.5rem 1rem; }
|
|
</style>
|
|
</head>
|
|
<body class="site moko-offline-wrap <?php echo htmlspecialchars($direction, ENT_QUOTES, 'UTF-8'); ?>">
|
|
<?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; ?>
|
|
|
|
<a class="skip-link" href="#maincontent"><?php echo Text::_('JSKIP_TO_CONTENT') ?: 'Skip to content'; ?></a>
|
|
|
|
<header class="container-header header py-3">
|
|
<div class="grid-child container-nav d-flex align-items-center gap-3">
|
|
|
|
<!-- Brand (mutually exclusive image/text) -->
|
|
<a class="moko-brand me-auto" href="<?php echo htmlspecialchars(Uri::base(), ENT_QUOTES, 'UTF-8'); ?>" aria-label="<?php echo htmlspecialchars($sitename, ENT_COMPAT, 'UTF-8'); ?>">
|
|
<?php echo $brandHtml; ?>
|
|
<?php if ($showTagline && $brandTagline): ?>
|
|
<small class="brand-tagline"><?php echo htmlspecialchars($brandTagline, ENT_COMPAT, 'UTF-8'); ?></small>
|
|
<?php endif; ?>
|
|
</a>
|
|
|
|
<!-- Header module position: offline-header -->
|
|
<?php if ($this->countModules('offline-header')) : ?>
|
|
<div class="ms-2">
|
|
<jdoc:include type="modules" name="offline-header" style="none" />
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
<main id="maincontent" class="moko-offline-main">
|
|
<div class="container">
|
|
<jdoc:include type="message" />
|
|
|
|
<div class="moko-card card shadow-sm rounded-3 p-4 p-md-5">
|
|
<?php if ($displayOfflineMessage === 1 && $offlineMessage !== '') : ?>
|
|
<div class="mb-4">
|
|
<h1 class="h3 mb-2"><?php echo Text::_('JOFFLINE_MESSAGE') ?: 'Site Offline'; ?></h1>
|
|
<p class="lead mb-0"><?php echo $offlineMessage; ?></p>
|
|
</div>
|
|
<?php elseif ($displayOfflineMessage === 2) : ?>
|
|
<div class="mb-4">
|
|
<h1 class="h3 mb-2"><?php echo Text::_('JOFFLINE_MESSAGE') ?: 'Site Offline'; ?></h1>
|
|
<p class="lead mb-0">
|
|
<?php echo Text::_('JOFFLINE_MESSAGE_DEFAULT') ?: 'This site is down for maintenance. Please check back soon.'; ?>
|
|
</p>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<!-- Main offline module position -->
|
|
<?php if ($this->countModules('offline')) : ?>
|
|
<section class="mb-4" aria-label="Offline modules">
|
|
<jdoc:include type="modules" name="offline" style="none" />
|
|
</section>
|
|
<?php endif; ?>
|
|
|
|
<!-- Login UNDER an accordion (collapsed by default) -->
|
|
<div class="accordion" id="offlineAccordion">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header" id="headingLogin">
|
|
<button class="accordion-button collapsed" type="button"
|
|
data-bs-toggle="collapse" data-bs-target="#collapseLogin"
|
|
aria-expanded="false" aria-controls="collapseLogin">
|
|
<?php echo Text::_('JLOGIN'); ?>
|
|
</button>
|
|
</h2>
|
|
<div id="collapseLogin" class="accordion-collapse collapse" aria-labelledby="headingLogin" data-bs-parent="#offlineAccordion">
|
|
<div class="accordion-body">
|
|
<form action="<?php echo $action; ?>" method="post" class="form-validate">
|
|
<fieldset>
|
|
<legend class="visually-hidden"><?php echo Text::_('JLOGIN'); ?></legend>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
|
|
<input class="form-control" type="text" name="username" id="username" autocomplete="username" required aria-required="true">
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
|
|
<input class="form-control" type="password" name="password" id="password" autocomplete="current-password" required aria-required="true">
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="secretkey"><?php echo Text::_('JGLOBAL_SECRETKEY'); ?></label>
|
|
<input class="form-control" type="text" name="secretkey" id="secretkey" autocomplete="one-time-code" placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>">
|
|
</div>
|
|
|
|
<div class="form-check mb-4">
|
|
<input class="form-check-input" type="checkbox" name="remember" id="remember">
|
|
<label class="form-check-label" for="remember"><?php echo Text::_('JGLOBAL_REMEMBER_ME'); ?></label>
|
|
</div>
|
|
|
|
<div class="d-grid">
|
|
<button type="submit" class="btn btn-primary"><?php echo Text::_('JLOGIN'); ?></button>
|
|
</div>
|
|
|
|
<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'); ?>
|
|
</fieldset>
|
|
|
|
<nav class="mt-3 small" aria-label="<?php echo Text::_('COM_USERS'); ?>">
|
|
<ul class="list-inline m-0">
|
|
<li class="list-inline-item">
|
|
<a href="<?php echo $resetUrl; ?>"><?php echo Text::_('COM_USERS_LOGIN_RESET'); ?></a>
|
|
</li>
|
|
<li class="list-inline-item">
|
|
<a href="<?php echo $remindUrl; ?>"><?php echo Text::_('COM_USERS_LOGIN_REMIND'); ?></a>
|
|
</li>
|
|
<?php if ($allowRegistration) : ?>
|
|
<li class="list-inline-item">
|
|
<a href="<?php echo $registrationUrl; ?>"><?php echo Text::_('COM_USERS_REGISTER'); ?></a>
|
|
</li>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</nav>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /accordion -->
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<!-- No footer modules on offline page -->
|
|
<jdoc:include type="modules" name="debug" style="none" />
|
|
</body>
|
|
</html>
|