nimuli/resources/views/components/sidebar.blade.php

39 lines
1.9 KiB
PHP

@php
$workspace = app()->bound('current_workspace') ? app('current_workspace') : null;
$nav = [
['label' => 'Dashboard', 'route' => 'dashboard', 'icon' => '⊞'],
['label' => 'Links', 'route' => 'links.index', 'icon' => '↗'],
['label' => 'QR Codes', 'route' => 'qr.index', 'icon' => '▦'],
['label' => 'Link-in-Bio', 'route' => 'bio.index', 'icon' => '≡'],
['label' => 'Analytics', 'route' => 'analytics.index', 'icon' => '↑'],
['label' => 'Domains', 'route' => 'domains.index', 'icon' => '◎'],
['label' => 'Settings', 'route' => 'settings.index', 'icon' => '⚙'],
];
@endphp
<aside class="w-60 flex-shrink-0 bg-gray-900 border-r border-gray-800 flex flex-col">
<div class="h-16 flex items-center px-5 border-b border-gray-800">
<span class="text-lg font-bold tracking-tight">Nimuli</span>
</div>
@if($workspace)
<div class="px-3 py-3 border-b border-gray-800">
<div class="text-xs text-gray-500 uppercase tracking-wider mb-1">Workspace</div>
<div class="text-sm font-medium truncate">{{ $workspace->name }}</div>
</div>
@endif
<nav class="flex-1 px-2 py-3 space-y-0.5">
@foreach($nav as $item)
<a href="{{ Route::has($item['route']) ? route($item['route']) : '#' }}"
class="flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors
{{ request()->routeIs($item['route'] . '*') ? 'bg-gray-800 text-white' : 'text-gray-400 hover:text-white hover:bg-gray-800' }}">
<span class="w-5 text-center">{{ $item['icon'] }}</span>
{{ $item['label'] }}
</a>
@endforeach
</nav>
@if($workspace?->plan)
<div class="px-3 py-3 border-t border-gray-800">
<div class="text-xs text-gray-500">Plan: {{ ucfirst($workspace->plan->name) }}</div>
</div>
@endif
</aside>