clusev/resources/views/components/topbar.blade.php

29 lines
1.6 KiB
PHP

@props(['title' => null])
@php
// Default the title in a block (never an inline directive on this line, and never
// the literal directive tokens in a comment — Blade's raw-block matcher eats them;
// see rules.md R17).
$title ??= __('shell.title_default');
@endphp
<header class="sticky top-0 z-20 flex h-14 items-center gap-3 border-b border-line bg-base/90 px-4 backdrop-blur sm:px-6 lg:px-8">
<button type="button" @click="nav = true"
class="grid min-h-11 min-w-11 shrink-0 place-items-center rounded-md text-ink-2 hover:bg-raised hover:text-ink lg:hidden"
aria-label="{{ __('shell.menu_open') }}">
<x-icon name="menu" class="h-5 w-5" />
</button>
<h1 class="min-w-0 truncate font-display text-sm font-semibold text-ink sm:text-base">{{ $title }}</h1>
<div class="ml-auto flex min-w-0 items-center gap-2">
<x-lang-switch />
<button type="button" @click="$dispatch('cmdk-open')"
class="hidden h-8 items-center gap-2 rounded-md border border-line bg-inset px-2.5 text-ink-3 transition-colors hover:border-line-strong hover:text-ink sm:flex"
aria-label="{{ __('shell.commands_open_aria') }}" title="{{ __('shell.commands_title') }}">
<x-icon name="command" class="h-3.5 w-3.5" />
<span class="font-mono text-[10px] uppercase tracking-wider">{{ __('shell.shortcut_ctrl_k') }}</span>
</button>
{{-- Live-polled island so the online count updates when a server goes up/down (not just on nav). --}}
<livewire:shell.fleet-status />
</div>
</header>