From 9ab91e4d900fa02fae5dc2fc224867dc6c04b7d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 02:38:17 +0000 Subject: [PATCH] Enable dark theme selection in component.php and offline.php matching index.php approach Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- src/templates/component.php | 18 ++++++++ src/templates/offline.php | 84 +++++++------------------------------ 2 files changed, 33 insertions(+), 69 deletions(-) diff --git a/src/templates/component.php b/src/templates/component.php index 9eeb946..75098a0 100644 --- a/src/templates/component.php +++ b/src/templates/component.php @@ -193,6 +193,9 @@ if ($this->params->get('faKitCode')) { $params_leftIcon = htmlspecialchars($this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-left'), ENT_COMPAT, 'UTF-8'); $params_rightIcon = htmlspecialchars($this->params->get('drawerRightIcon', 'fa-solid fa-chevron-right'), ENT_COMPAT, 'UTF-8'); +// Theme params +$params_theme_enabled = $this->params->get('theme_enabled', 1); + $wa->useStyle('template.user'); // css/user.css ?> @@ -202,6 +205,21 @@ $wa->useStyle('template.user'); // css/user.css + + + + diff --git a/src/templates/offline.php b/src/templates/offline.php index 6cfb8b4..8b4ed9b 100644 --- a/src/templates/offline.php +++ b/src/templates/offline.php @@ -103,7 +103,9 @@ if ($logoFile !== '') { $brandTagline = (string) ($params->get('brand_tagline') ?: $params->get('siteDescription') ?: ''); $showTagline = (int) $params->get('show_brand_tagline', 0); -$showSwitcher = (int) $params->get('show_theme_switcher', 1); + +// Theme params +$params_theme_enabled = (int) $params->get('theme_enabled', 1); /* ----------------------- Login routes & Users @@ -129,49 +131,20 @@ if (class_exists('\Joomla\Component\Users\Site\Helper\RouteHelper')) { - + + @@ -198,32 +170,6 @@ if (class_exists('\Joomla\Component\Users\Site\Helper\RouteHelper')) { - - - - - - countModules('offline-header')) : ?>