|
1 | 1 | <!-- Sidebar --> |
2 | | -<aside id="crb_sidebar" class="crb_sidebar" |
| 2 | +<aside id="crb_sidebar" |
| 3 | + class="crb_sidebar transition-all duration-300 ease-in-out overflow-hidden" |
3 | 4 | :class="$store.sidebar.expanded ? 'w-72' : 'w-20'" |
4 | 5 | @mouseenter="$store.sidebar.handleEnter()" |
5 | 6 | @mouseleave="$store.sidebar.handleLeave()" |
6 | 7 | x-show="!$store.sidebar.hidden"> |
7 | 8 |
|
8 | 9 | <!-- Logo & Header --> |
9 | | - <div class="flex items-center justify-between p-6 border-b border-slate-700/50"> |
10 | | - <!-- Logo --> |
11 | | - <div class="flex items-center space-x-3 cursor-pointer" |
12 | | - @click="window.location.href='./'" |
13 | | - x-show="$store.sidebar.expanded || $store.sidebar.showLogo" |
14 | | - x-transition.opacity.scale.duration.200ms> |
| 10 | + <div :class="$store.sidebar.expanded |
| 11 | + ? 'flex flex-row items-center justify-between p-6' |
| 12 | + : 'flex flex-col items-center p-6 gap-2'" |
| 13 | + class="border-b border-slate-700/50 transition-all duration-300"> |
15 | 14 |
|
| 15 | + <!-- Left: Logo + App name --> |
| 16 | + <div class="flex items-center gap-3 cursor-pointer" |
| 17 | + @click="window.location.href='./'"> |
| 18 | + |
| 19 | + <!-- Logo --> |
16 | 20 | <img alt="Logo" |
17 | 21 | :src="$store.sidebar.expanded |
18 | | - ? $store.branding.logo.expanded |
19 | | - : $store.branding.logo.collapsed" |
20 | | - :width="$store.sidebar.expanded |
| 22 | + ? $store.branding.logo.expanded |
| 23 | + : $store.branding.logo.collapsed" |
| 24 | + :style="` |
| 25 | + width: ${$store.sidebar.expanded |
21 | 26 | ? $store.branding.size.expanded.width |
22 | | - : $store.branding.size.collapsed.width" |
23 | | - :height="$store.sidebar.expanded |
| 27 | + : $store.branding.size.collapsed.width}px; |
| 28 | + height: ${$store.sidebar.expanded |
24 | 29 | ? $store.branding.size.expanded.height |
25 | | - : $store.branding.size.collapsed.height" |
26 | | - class="transition-all duration-200"/> |
| 30 | + : $store.branding.size.collapsed.height}px; |
| 31 | + `" |
| 32 | + class="transition-all duration-300 object-contain"/> |
| 33 | + |
| 34 | + <!-- App name (only expanded) --> |
27 | 35 | <span x-show="$store.sidebar.expanded && $store.branding.showAppName" |
28 | 36 | x-transition.opacity.duration.200ms |
29 | | - class="font-bold text-xl tracking-tight" |
| 37 | + class="font-bold text-xl tracking-tight whitespace-nowrap" |
30 | 38 | x-text="$store.branding.appName"> |
31 | | - </span> |
| 39 | + </span> |
32 | 40 | </div> |
33 | 41 |
|
34 | 42 | <!-- Burger menu --> |
35 | | - <button class="p-2 h-8 rounded-lg hover:bg-slate-700/50 transition-colors duration-200" |
36 | | - @click="$store.sidebar.toggleSidebar()" |
37 | | - x-show="$store.sidebar.expanded || (!$store.sidebar.expanded && $store.sidebar.hover && !$store.sidebar.showLogo)" |
38 | | - x-transition.opacity.scale.duration.200ms> |
39 | | - <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
40 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/> |
| 43 | + <button @click="$store.sidebar.toggleSidebar()" |
| 44 | + x-transition.opacity.scale.duration.200ms |
| 45 | + class="p-2 h-8 rounded-lg hover:bg-slate-700/50 transition-colors duration-200"> |
| 46 | + <svg xmlns="http://www.w3.org/2000/svg" |
| 47 | + :class="$store.sidebar.expanded ? 'h-5 w-5' : 'h-4 w-4'" |
| 48 | + fill="none" |
| 49 | + viewBox="0 0 24 24" |
| 50 | + stroke="currentColor"> |
| 51 | + <path stroke-linecap="round" |
| 52 | + stroke-linejoin="round" |
| 53 | + stroke-width="2" |
| 54 | + d="M4 6h16M4 12h16M4 18h16"/> |
41 | 55 | </svg> |
42 | 56 | </button> |
43 | 57 | </div> |
|
0 commit comments