Pin the sidebar header and footer so only the nav list scrolls, and shorten two action labels that wrapped
tests / pest (push) Failing after 7m9s Details
tests / assets (push) Successful in 20s Details
tests / release (push) Has been skipped Details

feat/granted-plans
nexxo 2026-07-28 20:52:12 +02:00
parent f05547921d
commit bda61ca560
4 changed files with 32 additions and 24 deletions

View File

@ -128,7 +128,7 @@ return [
'warning' => 'Warnung',
],
'retry' => 'Erneut versuchen',
'retry' => 'Wiederholen',
'run_retried' => 'Lauf wird erneut gestartet.',
'run_started' => 'Gestartet',
'run_activity' => 'Letzte Aktivität',

View File

@ -15,5 +15,5 @@ return [
'wrong_password' => 'Passwort stimmt nicht.',
'too_many_attempts' => 'Zu viele Versuche. Bitte in :seconds Sekunden erneut versuchen.',
'cancel' => 'Abbrechen',
'admin_action' => 'Als Administrator anmelden',
'admin_action' => 'Adminzugang',
];

View File

@ -15,5 +15,5 @@ return [
'wrong_password' => 'That password is not correct.',
'too_many_attempts' => 'Too many attempts. Try again in :seconds seconds.',
'cancel' => 'Cancel',
'admin_action' => 'Sign in as administrator',
'admin_action' => 'Admin access',
];

View File

@ -17,10 +17,10 @@
density, and that lives in the tokens not here.
--}}
<aside
class="fixed inset-y-0 left-0 z-50 flex w-[15.5rem] flex-col overflow-y-auto border-r border-line bg-surface px-3 py-4 shadow-md transition-transform lg:static lg:h-screen lg:translate-x-0 lg:shadow-none"
class="fixed inset-y-0 left-0 z-50 flex w-[15.5rem] flex-col border-r border-line bg-surface px-3 py-4 shadow-md transition-transform lg:static lg:h-screen lg:translate-x-0 lg:shadow-none"
:class="nav ? 'translate-x-0' : '-translate-x-full'"
>
<div class="flex items-center justify-between gap-2 px-2.5 pb-5">
<div class="flex shrink-0 items-center justify-between gap-2 px-2.5 pb-5">
<a href="{{ $console ? \App\Support\AdminArea::home() : route('dashboard') }}" class="flex items-center gap-2.5">
<x-ui.logo class="size-7" />
{{-- One element: as separate flex children the gap lands inside the
@ -36,27 +36,35 @@
</button>
</div>
@foreach ($groups as $group)
@if (! empty($group['label']))
<p class="px-3 pb-2 pt-5 lbl">{{ $group['label'] }}</p>
@endif
<nav class="space-y-0.5">
@foreach ($group['items'] as [$route, $icon, $key, $capability])
@continue($capability !== null && ! auth()->user()?->can($capability))
<x-ui.nav-item
:href="route($route)"
:active="$console ? \App\Support\AdminArea::routeIs($route) : request()->routeIs($route)"
@click="nav = false"
>
<x-slot:icon><x-ui.icon :name="$icon" class="size-[1.15rem]" /></x-slot:icon>
{{ __($prefix.'.'.$key) }}
</x-ui.nav-item>
@endforeach
</nav>
@endforeach
{{-- The only scroll region in the sidebar: header above and footer below
stay put (operator requirement), only the nav list itself scrolls
when it is taller than the viewport. overflow-y-auto (not -hidden)
on a flex-1 child resolves its automatic min-height to 0, which is
what lets it shrink to the available space instead of stretching the
aside past the viewport same mechanism <main> already relies on. --}}
<div class="min-h-0 flex-1 overflow-y-auto">
@foreach ($groups as $group)
@if (! empty($group['label']))
<p class="px-3 pb-2 pt-5 lbl">{{ $group['label'] }}</p>
@endif
<nav class="space-y-0.5">
@foreach ($group['items'] as [$route, $icon, $key, $capability])
@continue($capability !== null && ! auth()->user()?->can($capability))
<x-ui.nav-item
:href="route($route)"
:active="$console ? \App\Support\AdminArea::routeIs($route) : request()->routeIs($route)"
@click="nav = false"
>
<x-slot:icon><x-ui.icon :name="$icon" class="size-[1.15rem]" /></x-slot:icon>
{{ __($prefix.'.'.$key) }}
</x-ui.nav-item>
@endforeach
</nav>
@endforeach
</div>
@if ($footer)
<p class="mt-auto px-3 pt-6 font-mono text-[11px] leading-relaxed text-muted">{{ $footer }}</p>
<p class="shrink-0 px-3 pt-6 font-mono text-[11px] leading-relaxed text-muted">{{ $footer }}</p>
@endif
</aside>