1
- <nav class =" navigation fixed top-0 w-full flex justify-between" style =" background-color : #f0f0f0 ; padding : 1rem 0 ;" >
2
- <div class =" container" style =" max-width : 1200px ; margin : auto ; display : flex ; justify-content : space-between ; align-items : center ;" >
3
- <a href =" #" style =" font-weight : bold ; text-decoration : none ; color : #333 ;" >CMS ss</a >
4
- <ul style =" list-style : none ; display : flex ; gap : 20px ; margin : 0 ; padding : 0 ;" >
5
- <li ><a href =" /" style =" text-decoration : none ; color : #333 ;" >Home</a ></li >
6
- <li ><a href =" #" style =" text-decoration : none ; color : #333 ;" >About</a ></li >
7
- <li ><a href =" #" style =" text-decoration : none ; color : #333 ;" >Blog</a ></li >
8
- <li ><a href =" #" style =" text-decoration : none ; color : #333 ;" >Contact</a ></li >
9
- </ul >
10
- </div >
11
- </nav >
1
+ <header class =" flex flex-wrap md:justify-start md:flex-nowrap z-50 w-full bg-blue-600" >
2
+ <nav class =" relative max-w-[66rem] w-full md:flex md:items-center md:justify-between md:gap-3 mx-auto px-4 sm:px-6 lg:px-8 py-2" >
3
+ <div class =" flex items-center justify-between" >
4
+ <a class =" flex-none font-semibold text-xl text-white focus:outline-none focus:opacity-80" href =" #" aria-label =" Brand" > {{ config (' app.name' ) } } </a >
5
+
6
+ <div class =" md:hidden" >
7
+ <button type =" button" class =" hs-collapse-toggle relative size-9 flex justify-center items-center text-sm font-semibold rounded-lg border border-white/50 text-white hover:bg-white/10 focus:outline-none focus:bg-white/10 disabled:opacity-50 disabled:pointer-events-none" id =" hs-base-header-collapse" aria-expanded =" false" aria-controls =" hs-base-header" aria-label =" Toggle navigation" data-hs-collapse =" #hs-base-header" >
8
+ <svg class =" hs-collapse-open:hidden size-4" xmlns =" http://www.w3.org/2000/svg" width =" 24" height =" 24" viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><line x1 =" 3" x2 =" 21" y1 =" 6" y2 =" 6" /><line x1 =" 3" x2 =" 21" y1 =" 12" y2 =" 12" /><line x1 =" 3" x2 =" 21" y1 =" 18" y2 =" 18" /></svg >
9
+ <svg class =" hs-collapse-open:block shrink-0 hidden size-4" xmlns =" http://www.w3.org/2000/svg" width =" 24" height =" 24" viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><path d =" M18 6 6 18" /><path d =" m6 6 12 12" /></svg >
10
+ <span class =" sr-only" >Toggle navigation</span >
11
+ </button >
12
+ </div >
13
+ </div >
14
+
15
+ <div id =" hs-base-header" class =" hs-collapse hidden overflow-hidden transition-all duration-300 basis-full grow md:block" aria-labelledby =" hs-base-header-collapse" >
16
+ <div class =" overflow-hidden overflow-y-auto max-h-[75vh] [& ::-webkit-scrollbar]:w-2 [& ::-webkit-scrollbar-thumb]:rounded-full [& ::-webkit-scrollbar-track]:bg-gray-100 [& ::-webkit-scrollbar-thumb]:bg-gray-300 dark:[& ::-webkit-scrollbar-track]:bg-neutral-700 dark:[& ::-webkit-scrollbar-thumb]:bg-neutral-500" >
17
+ <div class =" py-2 md:py-0 flex flex-col md:flex-row md:items-center md:justify-end gap-0.5 md:gap-1" >
18
+
19
+ {!! app (App \Services \MenuService:: class )-> buildMenu () ! !}
20
+
21
+ <div class =" relative flex flex-wrap items-center gap-x-1.5 md:ps-2.5 mt-1 md:mt-0 md:ms-1.5 before:block before:absolute before:top-1/2 before:-start-px before:w-px before:h-4 before:bg-white/30 before:-translate-y-1/2" >
22
+ @if (auth ()-> check () )
23
+ @php
24
+ $user = auth ()-> user ();
25
+ $role = $user -> getRoleNames ()-> first () ?? ' user' ;
26
+ $dashboardUrl = $role === ' admin' ? ' /admin' : ' /' . $role ;
27
+ @endphp
28
+
29
+ <a href =" {{ route (' dashboard' ) } }"
30
+ class =" p-2 w-full flex items-center text-sm text-white/80 hover:text-white focus:outline-none focus:text-white" >
31
+ <svg class =" shrink-0 size-4 me-3 md:me-2" aria-hidden =" true" xmlns =" http://www.w3.org/2000/svg" width =" 24" height =" 24" fill =" currentColor" viewBox =" 0 0 24 24" >
32
+ <path d =" M5 3a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5Zm14 18a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4ZM5 11a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2H5Zm14 2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4Z" />
33
+ </svg >
34
+ {{ ucfirst ($role ) } } Dashboard
35
+ </a >
36
+ @else
37
+ <a href =" {{ route (' login' ) } }"
38
+ class =" p-2 flex items-center text-sm text-white/80 hover:text-white focus:outline-none focus:text-white" >
39
+ <svg class =" shrink-0 size-4 me-3 md:me-2" xmlns =" http://www.w3.org/2000/svg" width =" 24" height =" 24" viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><path d =" M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /><circle cx =" 12" cy =" 7" r =" 4" /></svg >
40
+ Login
41
+ </a >
42
+ <a href =" {{ route (' register' ) } }"
43
+ class =" p-2 flex items-center text-sm text-white/80 hover:text-white focus:outline-none focus:text-white" >
44
+ <svg class =" shrink-0 size-4 me-3 md:me-2" aria-hidden =" true" xmlns =" http://www.w3.org/2000/svg" width =" 24" height =" 24" fill =" currentColor" viewBox =" 0 0 24 24" >
45
+ <path fill-rule =" evenodd" d =" M9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm-2 9a4 4 0 0 0-4 4v1a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-1a4 4 0 0 0-4-4H7Zm8-1a1 1 0 0 1 1-1h1v-1a1 1 0 1 1 2 0v1h1a1 1 0 1 1 0 2h-1v1a1 1 0 1 1-2 0v-1h-1a1 1 0 0 1-1-1Z" clip-rule =" evenodd" />
46
+ </svg >
47
+ Register
48
+ </a >
49
+ @endif
50
+ </div >
51
+ </div >
52
+ </div >
53
+ </div >
54
+ </nav >
55
+ </header >
0 commit comments