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)) : ?> +
+ +