|
5 | 5 | </head> |
6 | 6 | <body class="min-h-screen bg-white dark:bg-zinc-800"> |
7 | 7 | <flux:header container class="border-b border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900"> |
8 | | - <flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" /> |
| 8 | + <flux:sidebar.toggle class="lg:hidden mr-2" icon="bars-2" inset="left" /> |
9 | 9 |
|
10 | | - <a href="{{ route('dashboard') }}" class="ms-2 me-5 flex items-center space-x-2 rtl:space-x-reverse lg:ms-0" wire:navigate> |
11 | | - <x-app-logo /> |
12 | | - </a> |
| 10 | + <x-app-logo href="{{ route('dashboard') }}" wire:navigate /> |
13 | 11 |
|
14 | 12 | <flux:navbar class="-mb-px max-lg:hidden"> |
15 | 13 | <flux:navbar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate> |
@@ -43,78 +41,34 @@ class="h-10 max-lg:hidden [&>div>svg]:size-5" |
43 | 41 | </flux:tooltip> |
44 | 42 | </flux:navbar> |
45 | 43 |
|
46 | | - <!-- Desktop User Menu --> |
47 | | - <flux:dropdown position="top" align="end"> |
48 | | - <flux:profile |
49 | | - class="cursor-pointer" |
50 | | - :initials="auth()->user()->initials()" |
51 | | - /> |
52 | | - |
53 | | - <flux:menu> |
54 | | - <flux:menu.radio.group> |
55 | | - <div class="p-0 text-sm font-normal"> |
56 | | - <div class="flex items-center gap-2 px-1 py-1.5 text-start text-sm"> |
57 | | - <span class="relative flex h-8 w-8 shrink-0 overflow-hidden rounded-lg"> |
58 | | - <span |
59 | | - class="flex h-full w-full items-center justify-center rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white" |
60 | | - > |
61 | | - {{ auth()->user()->initials() }} |
62 | | - </span> |
63 | | - </span> |
64 | | - |
65 | | - <div class="grid flex-1 text-start text-sm leading-tight"> |
66 | | - <span class="truncate font-semibold">{{ auth()->user()->name }}</span> |
67 | | - <span class="truncate text-xs">{{ auth()->user()->email }}</span> |
68 | | - </div> |
69 | | - </div> |
70 | | - </div> |
71 | | - </flux:menu.radio.group> |
72 | | - |
73 | | - <flux:menu.separator /> |
74 | | - |
75 | | - <flux:menu.radio.group> |
76 | | - <flux:menu.item :href="route('profile.edit')" icon="cog" wire:navigate>{{ __('Settings') }}</flux:menu.item> |
77 | | - </flux:menu.radio.group> |
78 | | - |
79 | | - <flux:menu.separator /> |
80 | | - |
81 | | - <form method="POST" action="{{ route('logout') }}" class="w-full"> |
82 | | - @csrf |
83 | | - <flux:menu.item as="button" type="submit" icon="arrow-right-start-on-rectangle" class="w-full" data-test="logout-button"> |
84 | | - {{ __('Log Out') }} |
85 | | - </flux:menu.item> |
86 | | - </form> |
87 | | - </flux:menu> |
88 | | - </flux:dropdown> |
| 44 | + <x-desktop-user-menu /> |
89 | 45 | </flux:header> |
90 | 46 |
|
91 | 47 | <!-- Mobile Menu --> |
92 | | - <flux:sidebar stashable sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900"> |
93 | | - <flux:sidebar.toggle class="lg:hidden" icon="x-mark" /> |
94 | | - |
95 | | - <a href="{{ route('dashboard') }}" class="ms-1 flex items-center space-x-2 rtl:space-x-reverse" wire:navigate> |
96 | | - <x-app-logo /> |
97 | | - </a> |
98 | | - |
99 | | - <flux:navlist variant="outline"> |
100 | | - <flux:navlist.group :heading="__('Platform')"> |
101 | | - <flux:navlist.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate> |
102 | | - {{ __('Dashboard') }} |
103 | | - </flux:navlist.item> |
104 | | - </flux:navlist.group> |
105 | | - </flux:navlist> |
| 48 | + <flux:sidebar collapsible="mobile" sticky class="lg:hidden border-e border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900"> |
| 49 | + <flux:sidebar.header> |
| 50 | + <x-app-logo :sidebar="true" href="{{ route('dashboard') }}" wire:navigate /> |
| 51 | + <flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not-in-data-flux-sidebar-collapsed-desktop:-mr-2" /> |
| 52 | + </flux:sidebar.header> |
| 53 | + |
| 54 | + <flux:sidebar.nav> |
| 55 | + <flux:sidebar.group :heading="__('Platform')"> |
| 56 | + <flux:sidebar.item icon="layout-grid" :href="route('dashboard')" :current="request()->routeIs('dashboard')" wire:navigate> |
| 57 | + {{ __('Dashboard') }} |
| 58 | + </flux:sidebar.item> |
| 59 | + </flux:sidebar.group> |
| 60 | + </flux:sidebar.nav> |
106 | 61 |
|
107 | 62 | <flux:spacer /> |
108 | 63 |
|
109 | | - <flux:navlist variant="outline"> |
110 | | - <flux:navlist.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank"> |
111 | | - {{ __('Repository') }} |
112 | | - </flux:navlist.item> |
113 | | - |
114 | | - <flux:navlist.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank"> |
115 | | - {{ __('Documentation') }} |
116 | | - </flux:navlist.item> |
117 | | - </flux:navlist> |
| 64 | + <flux:sidebar.nav> |
| 65 | + <flux:sidebar.item icon="folder-git-2" href="https://github.com/laravel/livewire-starter-kit" target="_blank"> |
| 66 | + {{ __('Repository') }} |
| 67 | + </flux:sidebar.item> |
| 68 | + <flux:sidebar.item icon="book-open-text" href="https://laravel.com/docs/starter-kits#livewire" target="_blank"> |
| 69 | + {{ __('Documentation') }} |
| 70 | + </flux:sidebar.item> |
| 71 | + </flux:sidebar.nav> |
118 | 72 | </flux:sidebar> |
119 | 73 |
|
120 | 74 | {{ $slot }} |
|
0 commit comments