aasdsd
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 01:23:43 +02:00
parent f5b30d6991
commit 2c1a751e82
3 changed files with 70 additions and 12 deletions

View File

@@ -11,6 +11,15 @@ $headerTitle = $currentModule
? (string)($currentModule['title'] ?? $currentModuleName)
: ('Nexus' . ($isStagingHost ? ' (staging)' : ''));
$headerText = $currentModule ? (string)($currentModule['description'] ?? '') : '';
$headerTitle = isset($GLOBALS['layout_header_title']) && is_string($GLOBALS['layout_header_title']) && trim($GLOBALS['layout_header_title']) !== ''
? trim($GLOBALS['layout_header_title'])
: $headerTitle;
$headerText = isset($GLOBALS['layout_header_text']) && is_string($GLOBALS['layout_header_text'])
? trim($GLOBALS['layout_header_text'])
: $headerText;
$headerActions = isset($GLOBALS['layout_header_actions']) && is_array($GLOBALS['layout_header_actions'])
? $GLOBALS['layout_header_actions']
: [];
$auth = app()->auth();
$authUser = $auth->user();
?>
@@ -55,6 +64,23 @@ $authUser = $auth->user();
<?php endif; ?>
</div>
<div class="theme-switcher" aria-label="Darstellung">
<?php if ($headerActions !== []): ?>
<div class="header-actions">
<?php foreach ($headerActions as $headerAction): ?>
<?php
if (!is_array($headerAction)) {
continue;
}
$actionHref = trim((string) ($headerAction['href'] ?? ''));
$actionLabel = trim((string) ($headerAction['label'] ?? ''));
if ($actionHref === '' || $actionLabel === '') {
continue;
}
?>
<a class="nav-link" href="<?= e($actionHref) ?>"><?= e($actionLabel) ?></a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($auth->isEnabled()): ?>
<a class="auth-pill" href="<?= $authUser === null ? '/auth/login' : '/auth/logout' ?>">
<?= $authUser === null ? 'Login' : 'Logout ' . e((string)($authUser['username'] ?? $authUser['name'] ?? '')) ?>