From a8a7a69945cefa33bb27f48f268087bae70c275a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Mar 2026 03:51:32 +0000 Subject: [PATCH] Add logo/brand display to component.php layout Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com> --- src/component.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/component.php b/src/component.php index 921a01e..f3d21fd 100644 --- a/src/component.php +++ b/src/component.php @@ -182,6 +182,28 @@ $params_rightIcon = htmlspecialchars($this->params->get('drawerRightIco // Theme params $params_theme_enabled = $this->params->get('theme_enabled', 1); +// Brand: logo from params OR siteTitle +// ------------------------------------- +$brandHtml = ''; +$logoFile = (string) $this->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 = $this->params->get('siteTitle', 'MokoCassiopeia'); + $brandHtml = '' + . htmlspecialchars($siteTitle, ENT_COMPAT, 'UTF-8') + . ''; +} + // Load user assets last (after all other styles and scripts) $wa->useStyle('template.user'); // css/user.css $wa->useScript('user.js'); // js/user.js @@ -263,6 +285,14 @@ $wa->useScript('user.js'); // js/user.js + params->get('brand', 1)) : ?> +
+ +