|
3 | 3 | Renders the sticky top bar: sidebar toggle, breadcrumb, theme toggle, |
4 | 4 | notifications, and user dropdown. |
5 | 5 |
|
6 | | - The theme toggle button uses a morphing sun/moon SVG. |
7 | | - CSS for .icon-theme-toggle lives in resources/assets/scss/components/_logo.scss. |
8 | | - |
9 | 6 | Usage (from Admin layout, inside .main-wrapper): |
10 | 7 | #view( "_partials/header" )# |
11 | 8 |
|
|
24 | 21 | @click="$store.sidebar.toggle()" |
25 | 22 | :aria-label="$store.sidebar.collapsed ? 'Expand sidebar' : 'Collapse sidebar'" |
26 | 23 | :title="$store.sidebar.collapsed ? 'Expand sidebar' : 'Collapse sidebar'"> |
27 | | - <i class="ph ph-list" aria-hidden="true"></i> |
| 24 | + <i class="ph-duotone ph-list" aria-hidden="true"></i> |
28 | 25 | </button> |
29 | 26 |
|
30 | 27 | <nav aria-label="Breadcrumb"> |
31 | 28 | <ol class="topbar-breadcrumb"> |
32 | 29 | <li class="topbar-breadcrumb-item"> |
33 | | - <a href="/">Home</a> |
| 30 | + <a href="/dashboard">Home</a> |
34 | 31 | </li> |
35 | 32 | <li class="topbar-breadcrumb-item active" aria-current="page"> |
36 | 33 | #( prc.keyExists( "title" ) ? prc.title : "Dashboard" )# |
|
46 | 43 | ---> |
47 | 44 | <ul class="topbar-right"> |
48 | 45 |
|
49 | | - <!--- Theme toggle (morphing sun ↔ crescent-moon SVG) ---> |
| 46 | + <!--- Theme toggle ---> |
50 | 47 | <li> |
51 | 48 | <button class="topbar-btn" |
52 | 49 | x-cloak |
53 | 50 | @click="$store.theme.toggle()" |
54 | 51 | :aria-label="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'" |
55 | 52 | :title="$store.theme.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'"> |
56 | | - <svg xmlns="http://www.w3.org/2000/svg" |
57 | | - width="20" height="20" |
58 | | - viewBox="0 0 32 32" |
59 | | - fill="currentColor" |
60 | | - class="icon-theme-toggle" |
61 | | - :class="{ 'is-dark': $store.theme.mode === 'dark' }" |
62 | | - aria-hidden="true" |
63 | | - focusable="false"> |
64 | | - <clipPath id="topbar-theme-cutout"> |
65 | | - <path d="M0-11h25a1 1 0 0017 13v30H0Z"></path> |
66 | | - </clipPath> |
67 | | - <g clip-path="url(##topbar-theme-cutout)"> |
68 | | - <circle cx="16" cy="16" r="8.4"></circle> |
69 | | - <path d="M18.3 3.2c0 1.3-1 2.3-2.3 2.3s-2.3-1-2.3-2.3S14.7.9 16 .9s2.3 1 2.3 2.3zm-4.6 25.6c0-1.3 1-2.3 2.3-2.3s2.3 1 2.3 2.3-1 2.3-2.3 2.3-2.3-1-2.3-2.3zm15.1-10.5c-1.3 0-2.3-1-2.3-2.3s1-2.3 2.3-2.3 2.3 1 2.3 2.3-1 2.3-2.3 2.3zM3.2 13.7c1.3 0 2.3 1 2.3 2.3s-1 2.3-2.3 2.3S.9 17.3.9 16s1-2.3 2.3-2.3zm5.8-7C9 7.9 7.9 9 6.7 9S4.4 8 4.4 6.7s1-2.3 2.3-2.3S9 5.4 9 6.7zm16.3 21c-1.3 0-2.3-1-2.3-2.3s1-2.3 2.3-2.3 2.3 1 2.3 2.3-1 2.3-2.3 2.3zm2.4-21c0 1.3-1 2.3-2.3 2.3S23 7.9 23 6.7s1-2.3 2.3-2.3 2.4 1 2.4 2.3zM6.7 23C8 23 9 24 9 25.3s-1 2.3-2.3 2.3-2.3-1-2.3-2.3 1-2.3 2.3-2.3z"></path> |
70 | | - </g> |
71 | | - </svg> |
| 53 | + <i class="ph-duotone ph-sun" x-show="$store.theme.mode === 'dark'" aria-hidden="true"></i> |
| 54 | + <i class="ph-duotone ph-moon" x-show="$store.theme.mode === 'light'" aria-hidden="true"></i> |
72 | 55 | </button> |
73 | 56 | </li> |
74 | 57 |
|
75 | | - <!--- Notification bell (returns its own <li>) ---> |
76 | | - #view( "_partials/notificationBell" )# |
77 | | - |
78 | 58 | <!--- Vertical divider ---> |
79 | 59 | <li class="topbar-divider-item" role="separator" aria-hidden="true"> |
80 | 60 | <span class="topbar-divider"></span> |
|
93 | 73 | <span class="topbar-user-name"> |
94 | 74 | #( prc.keyExists( "authUser" ) ? prc.authUser.name : "Admin" )# |
95 | 75 | </span> |
96 | | - <i class="ph ph-caret-down topbar-user-chevron" aria-hidden="true"></i> |
| 76 | + <i class="ph-duotone ph-caret-down topbar-user-chevron" aria-hidden="true"></i> |
97 | 77 | </button> |
98 | 78 | <ul class="dropdown-menu dropdown-menu-end" |
99 | 79 | aria-labelledby="topbarUserMenu"> |
|
105 | 85 | <li><hr class="dropdown-divider"></li> |
106 | 86 | <li> |
107 | 87 | <a class="dropdown-item" href="/profile"> |
108 | | - <i class="ph ph-user" aria-hidden="true"></i> |
| 88 | + <i class="ph-duotone ph-user" aria-hidden="true"></i> |
109 | 89 | Profile |
110 | 90 | </a> |
111 | 91 | </li> |
112 | | - <li> |
113 | | - <a class="dropdown-item" href="/settings"> |
114 | | - <i class="ph ph-gear" aria-hidden="true"></i> |
115 | | - Settings |
116 | | - </a> |
117 | | - </li> |
118 | 92 | <li><hr class="dropdown-divider"></li> |
119 | 93 | <li> |
120 | 94 | <a class="dropdown-item text-danger" href="/auth/logout"> |
121 | | - <i class="ph ph-sign-out" aria-hidden="true"></i> |
| 95 | + <i class="ph-duotone ph-sign-out" aria-hidden="true"></i> |
122 | 96 | Sign out |
123 | 97 | </a> |
124 | 98 | </li> |
|
0 commit comments