From 3929c48ea165de05344789bf51471a55d40be8b8 Mon Sep 17 00:00:00 2001 From: boban Date: Sat, 16 May 2026 07:54:31 +0200 Subject: [PATCH] feat(ui): app layout with sidebar and topbar Implement Nimuli-specific authenticated layout with: - Sidebar navigation with 7 main menu items (dashboard, links, qr codes, link-in-bio, analytics, domains, settings) - Topbar header with user email and logout button - Safe route checking using Route::has() for undefined routes - Workspace display in sidebar when available - Livewire AppLayout base class for future Livewire components --- app/Livewire/Layouts/AppLayout.php | 13 +++++++ resources/views/components/sidebar.blade.php | 38 ++++++++++++++++++++ resources/views/components/topbar.blade.php | 14 ++++++++ resources/views/layouts/nimuli-app.blade.php | 23 ++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 app/Livewire/Layouts/AppLayout.php create mode 100644 resources/views/components/sidebar.blade.php create mode 100644 resources/views/components/topbar.blade.php create mode 100644 resources/views/layouts/nimuli-app.blade.php diff --git a/app/Livewire/Layouts/AppLayout.php b/app/Livewire/Layouts/AppLayout.php new file mode 100644 index 0000000..b6f21d7 --- /dev/null +++ b/app/Livewire/Layouts/AppLayout.php @@ -0,0 +1,13 @@ +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 + diff --git a/resources/views/components/topbar.blade.php b/resources/views/components/topbar.blade.php new file mode 100644 index 0000000..b17c108 --- /dev/null +++ b/resources/views/components/topbar.blade.php @@ -0,0 +1,14 @@ +
+
+ {{ $title ?? '' }} +
+
+ @auth + {{ auth()->user()->email }} +
+ @csrf + +
+ @endauth +
+
diff --git a/resources/views/layouts/nimuli-app.blade.php b/resources/views/layouts/nimuli-app.blade.php new file mode 100644 index 0000000..bb5f11f --- /dev/null +++ b/resources/views/layouts/nimuli-app.blade.php @@ -0,0 +1,23 @@ + + + + + + + {{ $title ?? 'Nimuli' }} + @vite(['resources/css/app.css', 'resources/js/app.js']) + @livewireStyles + + +
+ +
+ +
+ {{ $slot }} +
+
+
+ @livewireScripts + +