|
34 | 34 | 50% { background-position: -200% 0; } |
35 | 35 | } |
36 | 36 |
|
| 37 | +.sidebar { |
| 38 | + --sidebar-width: 17rem; |
| 39 | +} |
| 40 | + |
37 | 41 | .sidebar--collapsed { |
38 | 42 | width: 4.5rem; |
| 43 | + --sidebar-width: 4.5rem; |
39 | 44 | } |
40 | 45 |
|
41 | 46 | .sidebar--expanded { |
42 | 47 | width: 17rem; |
| 48 | + --sidebar-width: 17rem; |
43 | 49 | } |
44 | 50 |
|
45 | | -/* Header Section */ |
46 | | -.sidebar__header { |
47 | | - padding: 2rem 1.5rem; |
48 | | - display: flex; |
49 | | - align-items: center; |
50 | | - justify-content: space-between; |
51 | | - border-bottom: 1px solid rgba(255, 255, 255, 0.1); |
52 | | - background: rgba(0, 0, 0, 0.2); |
53 | | - position: relative; |
54 | | -} |
55 | 51 |
|
56 | | -.sidebar__header::after { |
57 | | - content: ''; |
58 | | - position: absolute; |
59 | | - bottom: 0; |
60 | | - left: 50%; |
61 | | - transform: translateX(-50%); |
62 | | - width: 60%; |
63 | | - height: 1px; |
64 | | - background: linear-gradient(90deg, transparent, #3b82f6, transparent); |
65 | | -} |
66 | | - |
67 | | -.sidebar__title { |
68 | | - font-size: 1.4rem; |
69 | | - font-weight: 800; |
70 | | - color: #f8fafc; |
71 | | - display: flex; |
72 | | - align-items: center; |
73 | | - gap: 0.75rem; |
74 | | - margin: 0; |
75 | | - text-shadow: 0 0 10px rgba(59, 130, 246, 0.3); |
76 | | -} |
77 | | - |
78 | | -.sidebar__title-icon { |
79 | | - width: 1.75rem; |
80 | | - height: 1.75rem; |
81 | | - color: #60a5fa; |
82 | | - filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.4)); |
83 | | -} |
84 | 52 |
|
85 | 53 | .sidebar__toggle { |
86 | | - padding: 0.75rem; |
87 | | - background: linear-gradient(135deg, #374151, #4b5563); |
| 54 | + padding: 0.25rem; |
| 55 | + background: rgba(255, 255, 255, 0.1); |
88 | 56 | color: #e5e7eb; |
89 | | - border: 1px solid rgba(255, 255, 255, 0.1); |
90 | | - border-radius: 50%; |
| 57 | + border: none; |
| 58 | + border-radius: 6px; |
91 | 59 | cursor: pointer; |
92 | | - transition: all 0.3s ease; |
| 60 | + transition: all 0.2s ease; |
93 | 61 | display: flex; |
94 | 62 | align-items: center; |
95 | 63 | justify-content: center; |
96 | | - position: relative; |
97 | | - overflow: auto; |
98 | | -} |
99 | | - |
100 | | -.sidebar__toggle::before { |
101 | | - content: ''; |
102 | 64 | position: absolute; |
103 | | - top: 50%; |
104 | | - left: 50%; |
105 | | - width: 0; |
106 | | - height: 0; |
107 | | - background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%); |
108 | | - transition: all 0.3s ease; |
109 | | - transform: translate(-50%, -50%); |
110 | | -} |
111 | | - |
112 | | -.sidebar__toggle:hover::before { |
113 | | - width: 100px; |
114 | | - height: 100px; |
| 65 | + top: 1rem; |
| 66 | + right: 1rem; |
| 67 | + width: 1.5rem; |
| 68 | + height: 1.5rem; |
| 69 | + z-index: 100; |
115 | 70 | } |
116 | 71 |
|
117 | 72 | .sidebar__toggle:hover { |
118 | | - background: linear-gradient(135deg, #4b5563, #6b7280); |
| 73 | + background: rgba(255, 255, 255, 0.2); |
119 | 74 | color: #f8fafc; |
120 | | - transform: rotate(180deg); |
121 | 75 | } |
122 | 76 |
|
123 | 77 | .sidebar__toggle-icon { |
124 | | - width: 1.25rem; |
125 | | - height: 1.25rem; |
126 | | - z-index: 1; |
| 78 | + width: 0.875rem; |
| 79 | + height: 0.875rem; |
127 | 80 | } |
128 | 81 |
|
129 | 82 | /* Navigation */ |
130 | 83 | .sidebar__nav { |
131 | 84 | flex: 1; |
132 | | - padding: 1.5rem 1rem; |
| 85 | + padding: 3rem 1rem 1.5rem 1rem; |
133 | 86 | display: flex; |
134 | 87 | flex-direction: column; |
135 | | - gap: 0.5rem; |
| 88 | + gap: 0.25rem; |
136 | 89 | position: relative; |
137 | 90 | } |
138 | 91 |
|
| 92 | +.sidebar--collapsed .sidebar__nav { |
| 93 | + padding: 3rem 0.5rem 1.5rem 0.5rem; |
| 94 | + gap: 0.125rem; |
| 95 | +} |
| 96 | + |
139 | 97 | .sidebar__nav::before { |
140 | 98 | content: ''; |
141 | 99 | position: absolute; |
|
213 | 171 |
|
214 | 172 | .sidebar__nav-item--collapsed { |
215 | 173 | justify-content: center; |
216 | | - padding: 1rem 0.5rem; |
| 174 | + padding: 0.75rem; |
| 175 | + margin: 0.25rem; |
| 176 | + border-radius: 8px; |
| 177 | + min-height: 2.5rem; |
| 178 | + width: calc(100% - 0.5rem); |
217 | 179 | } |
218 | 180 |
|
219 | 181 | .sidebar__nav-icon { |
|
223 | 185 | filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.2)); |
224 | 186 | } |
225 | 187 |
|
| 188 | +.sidebar--collapsed .sidebar__nav-icon { |
| 189 | + width: 1.25rem; |
| 190 | + height: 1.25rem; |
| 191 | +} |
| 192 | + |
226 | 193 | .sidebar__nav-label { |
227 | 194 | margin-left: 1rem; |
228 | 195 | font-size: 0.9rem; |
|
273 | 240 |
|
274 | 241 | .sidebar__logout--collapsed { |
275 | 242 | justify-content: center; |
276 | | - padding: 1rem 0.5rem; |
| 243 | + padding: 0.75rem; |
| 244 | + margin: 0.25rem 1rem; |
| 245 | + border-radius: 8px; |
| 246 | + min-height: 2.5rem; |
| 247 | + width: calc(100% - 2.5rem); |
277 | 248 | } |
278 | 249 |
|
279 | 250 | .sidebar__logout-icon { |
|
0 commit comments