77 lines
4.2 KiB
PHP
77 lines
4.2 KiB
PHP
@props(['active' => null])
|
|
|
|
@php
|
|
$items = [
|
|
['name' => 'dashboard', 'label' => 'Dashboard', 'route' => 'dashboard',
|
|
'svg' => '<path d="M3 13h8V3H3v10zm10 8h8V11h-8v10zM3 21h8v-6H3v6zm10-18v6h8V3h-8z"/>'],
|
|
['name' => 'sites', 'label' => 'Sites', 'route' => 'sites.index',
|
|
'svg' => '<circle cx="12" cy="12" r="10"/><path d="M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20"/>',
|
|
'count' => \App\Models\Site::count() ?: null],
|
|
['name' => 'servers', 'label' => 'Server', 'route' => 'servers.index',
|
|
'svg' => '<rect x="3" y="4" width="18" height="7" rx="1.5"/><rect x="3" y="13" width="18" height="7" rx="1.5"/><circle cx="7" cy="7.5" r="0.7" fill="currentColor"/><circle cx="7" cy="16.5" r="0.7" fill="currentColor"/>',
|
|
'count' => \App\Models\Server::count() ?: null],
|
|
['name' => 'backups', 'label' => 'Backups', 'route' => 'backups.index',
|
|
'svg' => '<path d="M21 12c0 5-9 9-9 9s-9-4-9-9V5l9-3 9 3v7z"/>'],
|
|
['name' => 'security', 'label' => 'Sicherheit','route' => 'security.index',
|
|
'svg' => '<path d="M12 3l8 4v5c0 5-3.5 8-8 9-4.5-1-8-4-8-9V7l8-4z"/>'],
|
|
['name' => 'team', 'label' => 'Team', 'route' => 'team.index',
|
|
'svg' => '<circle cx="9" cy="8" r="3.5"/><path d="M3 20v-1c0-3 3-5 6-5s6 2 6 5v1"/><circle cx="17" cy="9" r="2.5"/>'],
|
|
['name' => 'settings', 'label' => 'Einstellungen','route' => 'settings.index',
|
|
'svg' => '<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>'],
|
|
];
|
|
@endphp
|
|
|
|
<aside class="clu-sidebar">
|
|
{{-- Brand --}}
|
|
<div class="clu-brand-row">
|
|
<div class="clu-brand-mark" aria-hidden="true"></div>
|
|
<div class="clu-brand-name">CluPilot<span>v2.4</span></div>
|
|
</div>
|
|
|
|
{{-- Workspace switch --}}
|
|
<div class="clu-ws-switch" role="button" tabindex="0">
|
|
<div class="clu-ws-avatar">AC</div>
|
|
<div class="clu-ws-meta">
|
|
<div class="clu-ws-name">Acme Cluster</div>
|
|
<div class="clu-ws-plan">PRO · 87/100 sites</div>
|
|
</div>
|
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-(--color-muted-2) flex-none" aria-hidden="true">
|
|
<path d="M7 9l5-5 5 5M7 15l5 5 5-5"/>
|
|
</svg>
|
|
</div>
|
|
|
|
{{-- Nav --}}
|
|
<nav class="clu-nav">
|
|
<div class="clu-nav-title">Cluster</div>
|
|
@foreach ($items as $item)
|
|
@php
|
|
$isActive = ($active === $item['route']) || ($active === $item['name']);
|
|
$href = \Illuminate\Support\Facades\Route::has($item['route']) ? route($item['route']) : '#';
|
|
@endphp
|
|
<a href="{{ $href }}" wire:navigate
|
|
class="clu-nav-item @if($isActive) active @endif">
|
|
<svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
|
|
{!! $item['svg'] !!}
|
|
</svg>
|
|
{{ $item['label'] }}
|
|
@if (! empty($item['count']))
|
|
<span class="count">{{ $item['count'] }}</span>
|
|
@endif
|
|
</a>
|
|
@endforeach
|
|
</nav>
|
|
|
|
{{-- Plan box --}}
|
|
<div class="clu-plan-box">
|
|
<div class="clu-plan-row">
|
|
<span class="clu-plan-name">PRO</span>
|
|
<span class="clu-plan-tag">62% USED</span>
|
|
</div>
|
|
<div class="clu-plan-meter"><span style="width:62%;"></span></div>
|
|
<div class="clu-plan-stats">
|
|
<span>87 / 100 sites</span>
|
|
<span>€249/mo</span>
|
|
</div>
|
|
</div>
|
|
</aside>
|