Fix offline page: white logo bg, remove duplicate message, load language
Some checks failed
Repo Health / Access control (push) Successful in 1s
Repo Health / Release configuration (push) Failing after 4s
Repo Health / Scripts governance (push) Successful in 3s
Auto-Update SHA Hash / Update SHA-256 Hash in updates.xml (release) Failing after 5s
Repo Health / Repository health (push) Failing after 3s

- Logo gets white background with padding and rounded corners
- Removed <jdoc:include type="message" /> (was duplicating offline message)
- Load template language files explicitly (not auto-loaded in offline context)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-04-18 11:50:54 -05:00
parent e4b38df975
commit 7703b04ca8
2 changed files with 9 additions and 7 deletions

View File

@@ -71,8 +71,10 @@
max-height: 120px;
width: auto;
height: auto;
filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.3))
drop-shadow(0 0 24px rgba(255, 255, 255, 0.15));
background: #fff;
padding: 1rem 1.5rem;
border-radius: 0.5rem;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.moko-offline-brand .site-title {

View File

@@ -36,6 +36,11 @@ if (is_file($manifestPath)) {
$wa->getRegistry()->addRegistryFile($manifestPath);
}
// Load template language files (not auto-loaded in offline context)
$lang = Factory::getLanguage();
$lang->load('tpl_' . $this->template, JPATH_ROOT . '/templates/' . $this->template);
$lang->load('tpl_' . $this->template, JPATH_ROOT);
/* -----------------------
Load assets via WebAssetManager (matches index.php pattern)
------------------------ */
@@ -283,11 +288,6 @@ if (class_exists('\Joomla\Component\Users\Site\Helper\RouteHelper')) {
<a class="skip-link" href="#maincontent"><?php echo Text::_('JSKIP_TO_CONTENT') ?: 'Skip to content'; ?></a>
<!-- Joomla system messages -->
<div class="moko-offline-messages">
<jdoc:include type="message" />
</div>
<!-- Centered overlay card -->
<main id="maincontent">
<div class="moko-offline-card">