aside anapssungen

This commit is contained in:
2026-03-05 13:07:43 +01:00
parent b2dab5bd6c
commit 9819cba733
4 changed files with 24 additions and 6 deletions

View File

@@ -42,7 +42,15 @@ $publicTarget = ltrim($publicTarget, '/');
<?php foreach ($locales as $locale): ?>
<?php
$isActive = $locale === I18n::$locale;
$label = strtoupper((string) $locale);
$normalizedLocale = strtolower(trim((string) $locale));
if (strpos($normalizedLocale, '-') !== false) {
$normalizedLocale = explode('-', $normalizedLocale, 2)[0];
}
$languageLabels = [
'de' => t('German'),
'en' => t('English'),
];
$label = $languageLabels[$normalizedLocale] ?? strtoupper((string) $locale);
$publicUrl = $base . '/' . $locale . ($publicTarget !== '' ? '/' . $publicTarget : '');
$switchUrl = $isLoggedIn
? ($baseUrl . '?locale=' . $locale . '&return=' . urlencode($returnTarget))
@@ -52,7 +60,7 @@ $publicTarget = ltrim($publicTarget, '/');
<a href="<?php e($switchUrl); ?>"
class="<?php e($isActive ? 'active' : ''); ?>"
<?php if ($isActive) { ?>aria-current="true"<?php } ?>>
<?php e(t('Language')); ?>: <?php e($label); ?>
<?php e($label); ?>
</a>
</li>
<?php endforeach; ?>

View File

@@ -9,7 +9,7 @@ $addressBookUrl = lurl('address-book');
?>
<aside class="aside-icon-bar" data-aside-storage="app-sidebar-panel">
<nav>
<ul class="aside-icon-group" role="tablist">
<ul class="aside-icon-group" role="tablist" aria-orientation="vertical">
<li>
<button type="button" id="aside-tab-explorer" data-aside-target="explorer" role="tab"
aria-selected="true" aria-controls="aside-panel-explorer" aria-label="<?php e(t('Explorer')); ?>"
@@ -41,8 +41,6 @@ $addressBookUrl = lurl('address-book');
<i class="bi bi-folder"></i>
</button>
</li>
</ul>
<ul>
<?php if ($hasAdminPanel): ?>
<li>
<button type="button" id="aside-tab-admin" data-aside-target="admin" role="tab" aria-selected="false"
@@ -52,6 +50,8 @@ $addressBookUrl = lurl('address-book');
</button>
</li>
<?php endif; ?>
</ul>
<ul role="list">
<li>
<a href="<?php e($accountUrl); ?>" aria-label="<?php e(t('Account')); ?>"
data-tooltip="<?php e($accountTooltip); ?>" data-tooltip-pos="right" data-aside-shortcut="account"><i

View File

@@ -261,7 +261,7 @@ $csrfToken = (string) ($layoutNav['csrfToken'] ?? '');
<aside class="app-sidebar" id="app-sidebar">
<?php if ($currentTenant): ?>
<div class="app-sidebar-tenant-logo">
<a href="/">
<a href="<?php e(lurl('')); ?>">
<?php if ($hasTenantAvatar): ?>
<img src="auth/tenant-avatar-file?uuid=<?php e($tenantUuid); ?>&size=128" alt="<?php e($tenantName); ?>"
title="<?php e($tenantName); ?>">

View File

@@ -66,6 +66,15 @@
border: 0;
}
.app-sidebar .app-sidebar-tenant-logo img {
display: block;
max-width: 100%;
max-height: 48px;
width: auto;
height: auto;
object-fit: contain;
}
.app-sidebar-tenant-toggle {
display: none;
border: 1px solid var(--app-border);
@@ -145,6 +154,7 @@
}
.app-sidebar-tenant-logo img {
max-width: 120px;
max-height: 40px;
flex-shrink: 0;
}
.app-sidebar {