gaialive commited on
Commit
e2a9e58
·
verified ·
1 Parent(s): d363d54

Upload Sidebar.css

Browse files
Files changed (1) hide show
  1. web/src/components/layout/Sidebar.css +583 -0
web/src/components/layout/Sidebar.css ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Sidebar Component Styles */
2
+ .terra-sidebar {
3
+ position: fixed;
4
+ left: 0;
5
+ top: 0;
6
+ height: 100vh;
7
+ background: #2E7D32;
8
+ color: white;
9
+ transition: width 0.3s ease;
10
+ display: flex;
11
+ flex-direction: column;
12
+ z-index: 1000;
13
+ box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
14
+ overflow: hidden; /* Keep overflow hidden for smooth width transition */
15
+ }
16
+
17
+ .terra-sidebar--open {
18
+ width: 280px;
19
+ }
20
+
21
+ .terra-sidebar--closed {
22
+ width: 70px;
23
+ }
24
+
25
+ /* Header Section */
26
+ .terra-sidebar__header {
27
+ padding: 20px;
28
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ min-height: 80px;
33
+ }
34
+
35
+ .terra-sidebar__logo {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: var(--spacing-md);
39
+ flex: 1;
40
+ min-width: 0;
41
+ }
42
+
43
+ .terra-sidebar__logo-icon {
44
+ font-size: 2.5rem;
45
+ animation: gentle-pulse 3s ease-in-out infinite;
46
+ flex-shrink: 0;
47
+ }
48
+
49
+ @keyframes gentle-pulse {
50
+ 0%, 100% {
51
+ transform: scale(1);
52
+ }
53
+ 50% {
54
+ transform: scale(1.05);
55
+ }
56
+ }
57
+
58
+ .terra-sidebar__logo-text {
59
+ min-width: 0;
60
+ opacity: 1;
61
+ transition: opacity var(--transition-normal);
62
+ }
63
+
64
+ .terra-sidebar--closed .terra-sidebar__logo-text {
65
+ opacity: 0;
66
+ pointer-events: none;
67
+ }
68
+
69
+ .terra-sidebar__logo-title {
70
+ font-size: 1.4rem;
71
+ font-weight: 700;
72
+ margin: 0 0 4px 0;
73
+ color: white;
74
+ white-space: nowrap;
75
+ }
76
+
77
+ .terra-sidebar__logo-subtitle {
78
+ font-size: 0.8rem;
79
+ color: rgba(255, 255, 255, 0.8);
80
+ margin: 0;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ .terra-sidebar__toggle {
85
+ background: rgba(255, 255, 255, 0.2);
86
+ border: none;
87
+ color: white;
88
+ width: 32px;
89
+ height: 32px;
90
+ border-radius: 6px;
91
+ cursor: pointer;
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ transition: all 0.3s ease;
96
+ font-size: 0.9rem;
97
+ }
98
+
99
+ .terra-sidebar__toggle:hover {
100
+ background: rgba(255, 255, 255, 0.25);
101
+ transform: scale(1.05);
102
+ }
103
+
104
+ .terra-sidebar__toggle:focus {
105
+ outline: none;
106
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
107
+ }
108
+
109
+ .terra-sidebar__toggle-icon {
110
+ transition: transform var(--transition-normal);
111
+ }
112
+
113
+ .terra-sidebar__toggle-icon--open {
114
+ transform: rotate(180deg);
115
+ }
116
+
117
+ /* Search Section */
118
+ .terra-sidebar__search {
119
+ padding: 0 var(--spacing-lg) var(--spacing-lg);
120
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
121
+ }
122
+
123
+ .terra-sidebar__search-container {
124
+ position: relative;
125
+ display: flex;
126
+ align-items: center;
127
+ }
128
+
129
+ .terra-sidebar__search-input {
130
+ width: 100%;
131
+ padding: var(--spacing-sm) var(--spacing-md);
132
+ padding-right: 2.5rem;
133
+ background: rgba(255, 255, 255, 0.1);
134
+ border: 1px solid rgba(255, 255, 255, 0.2);
135
+ border-radius: var(--radius-md);
136
+ color: var(--color-white);
137
+ font-size: var(--font-size-sm);
138
+ transition: all var(--transition-normal);
139
+ }
140
+
141
+ .terra-sidebar__search-input::placeholder {
142
+ color: rgba(255, 255, 255, 0.6);
143
+ }
144
+
145
+ .terra-sidebar__search-input:focus {
146
+ outline: none;
147
+ background: rgba(255, 255, 255, 0.15);
148
+ border-color: var(--color-mint-light);
149
+ box-shadow: 0 0 0 2px rgba(168, 230, 163, 0.3);
150
+ }
151
+
152
+ .terra-sidebar__search-icon {
153
+ position: absolute;
154
+ right: var(--spacing-sm);
155
+ color: rgba(255, 255, 255, 0.6);
156
+ font-size: var(--font-size-sm);
157
+ }
158
+
159
+ .terra-sidebar__search-clear {
160
+ background: none;
161
+ border: none;
162
+ color: rgba(255, 255, 255, 0.6);
163
+ cursor: pointer;
164
+ padding: var(--spacing-xs);
165
+ border-radius: var(--radius-sm);
166
+ transition: all var(--transition-normal);
167
+ }
168
+
169
+ .terra-sidebar__search-clear:hover {
170
+ color: var(--color-white);
171
+ background: rgba(255, 255, 255, 0.1);
172
+ }
173
+
174
+ /* Navigation Section */
175
+ .terra-sidebar__nav {
176
+ flex: 1;
177
+ overflow-y: auto;
178
+ padding: var(--spacing-md) 0;
179
+ }
180
+
181
+ .terra-sidebar__nav::-webkit-scrollbar {
182
+ width: 4px;
183
+ }
184
+
185
+ .terra-sidebar__nav::-webkit-scrollbar-track {
186
+ background: transparent;
187
+ }
188
+
189
+ .terra-sidebar__nav::-webkit-scrollbar-thumb {
190
+ background: rgba(255, 255, 255, 0.3);
191
+ border-radius: 2px;
192
+ }
193
+
194
+ .terra-sidebar__nav::-webkit-scrollbar-thumb:hover {
195
+ background: rgba(255, 255, 255, 0.5);
196
+ }
197
+
198
+ .terra-sidebar__nav-content {
199
+ display: flex;
200
+ flex-direction: column;
201
+ gap: var(--spacing-lg);
202
+ }
203
+
204
+ .terra-sidebar__category {
205
+ display: flex;
206
+ flex-direction: column;
207
+ gap: var(--spacing-xs);
208
+ }
209
+
210
+ .terra-sidebar__category-title {
211
+ font-size: var(--font-size-xs);
212
+ font-weight: var(--font-weight-semibold);
213
+ color: rgba(255, 255, 255, 0.7);
214
+ text-transform: uppercase;
215
+ letter-spacing: 0.5px;
216
+ margin: 0;
217
+ padding: 0 var(--spacing-lg);
218
+ }
219
+
220
+ .terra-sidebar__category-items {
221
+ display: flex;
222
+ flex-direction: column;
223
+ gap: var(--spacing-xs);
224
+ }
225
+
226
+ .terra-sidebar__nav-item {
227
+ display: flex;
228
+ align-items: center;
229
+ padding: 12px 16px;
230
+ margin: 2px 12px;
231
+ border-radius: 8px;
232
+ cursor: pointer;
233
+ transition: all 0.3s ease;
234
+ position: relative;
235
+ min-height: 48px;
236
+ }
237
+
238
+ .terra-sidebar__nav-item:hover {
239
+ background: rgba(255, 255, 255, 0.1);
240
+ transform: translateX(4px);
241
+ }
242
+
243
+ .terra-sidebar__nav-item:focus {
244
+ outline: none;
245
+ background: rgba(255, 255, 255, 0.15);
246
+ box-shadow: 0 0 0 2px rgba(168, 230, 163, 0.3);
247
+ }
248
+
249
+ .terra-sidebar__nav-item--active {
250
+ background: rgba(255, 255, 255, 0.2);
251
+ transform: translateX(4px);
252
+ }
253
+
254
+ .terra-sidebar__nav-item--active::before {
255
+ content: '';
256
+ position: absolute;
257
+ left: -12px;
258
+ top: 0;
259
+ bottom: 0;
260
+ width: 4px;
261
+ background: #4CAF50;
262
+ border-radius: 0 2px 2px 0;
263
+ }
264
+
265
+ .terra-sidebar__nav-icon {
266
+ font-size: 1.5rem;
267
+ margin-right: var(--spacing-md);
268
+ min-width: 28px;
269
+ text-align: center;
270
+ flex-shrink: 0;
271
+ }
272
+
273
+ .terra-sidebar__nav-content {
274
+ flex: 1;
275
+ min-width: 0;
276
+ opacity: 1;
277
+ transition: opacity var(--transition-normal);
278
+ }
279
+
280
+ .terra-sidebar--closed .terra-sidebar__nav-content {
281
+ opacity: 0;
282
+ pointer-events: none;
283
+ }
284
+
285
+ .terra-sidebar__nav-name {
286
+ font-weight: var(--font-weight-semibold);
287
+ font-size: var(--font-size-sm);
288
+ display: block;
289
+ margin-bottom: var(--spacing-xs);
290
+ white-space: nowrap;
291
+ overflow: hidden;
292
+ text-overflow: ellipsis;
293
+ }
294
+
295
+ .terra-sidebar__nav-desc {
296
+ font-size: var(--font-size-xs);
297
+ opacity: 0.8;
298
+ color: #b8e6b3;
299
+ white-space: nowrap;
300
+ overflow: hidden;
301
+ text-overflow: ellipsis;
302
+ }
303
+
304
+ .terra-sidebar__nav-indicator {
305
+ position: absolute;
306
+ right: var(--spacing-md);
307
+ width: 6px;
308
+ height: 6px;
309
+ background: var(--color-mint-light);
310
+ border-radius: 50%;
311
+ animation: pulse 2s infinite;
312
+ }
313
+
314
+ /* Footer Section */
315
+ .terra-sidebar__footer {
316
+ padding: var(--spacing-lg);
317
+ border-top: 1px solid rgba(255, 255, 255, 0.15);
318
+ display: flex;
319
+ flex-direction: column;
320
+ gap: var(--spacing-md);
321
+ }
322
+
323
+ .terra-sidebar__stats {
324
+ display: flex;
325
+ gap: var(--spacing-md);
326
+ }
327
+
328
+ .terra-sidebar__stat {
329
+ display: flex;
330
+ align-items: center;
331
+ gap: var(--spacing-sm);
332
+ flex: 1;
333
+ }
334
+
335
+ .terra-sidebar__stat-icon {
336
+ font-size: 1.3rem;
337
+ flex-shrink: 0;
338
+ }
339
+
340
+ .terra-sidebar__stat-content {
341
+ min-width: 0;
342
+ }
343
+
344
+ .terra-sidebar__stat-value {
345
+ font-weight: var(--font-weight-bold);
346
+ font-size: var(--font-size-sm);
347
+ white-space: nowrap;
348
+ }
349
+
350
+ .terra-sidebar__stat-label {
351
+ font-size: var(--font-size-xs);
352
+ opacity: 0.8;
353
+ white-space: nowrap;
354
+ }
355
+
356
+ .terra-sidebar__version {
357
+ text-align: center;
358
+ font-size: var(--font-size-xs);
359
+ opacity: 0.6;
360
+ color: #b8e6b3;
361
+ }
362
+
363
+ /* Language Selector and Version (always visible) */
364
+ .terra-sidebar__bottom-section {
365
+ padding: var(--spacing-lg);
366
+ border-top: 1px solid rgba(255, 255, 255, 0.15);
367
+ display: flex;
368
+ flex-direction: column;
369
+ gap: var(--spacing-md);
370
+ margin-top: auto; /* Pushes it to the bottom */
371
+ }
372
+
373
+ .terra-sidebar--closed .terra-sidebar__bottom-section {
374
+ padding: var(--spacing-md) var(--spacing-sm); /* Adjust padding for collapsed state */
375
+ align-items: center; /* Center items when collapsed */
376
+ }
377
+
378
+ .terra-sidebar__language-selector-container {
379
+ display: flex;
380
+ flex-direction: column;
381
+ gap: var(--spacing-xs);
382
+ width: 100%; /* Ensure it takes full width */
383
+ }
384
+
385
+ .terra-sidebar--closed .terra-sidebar__language-selector-container {
386
+ flex-direction: column; /* Keep column layout for selector */
387
+ align-items: center; /* Center content */
388
+ }
389
+
390
+ .terra-sidebar__language-label {
391
+ font-size: var(--font-size-xs);
392
+ opacity: 0.8;
393
+ color: rgba(255, 255, 255, 0.7);
394
+ text-align: center; /* Center label */
395
+ }
396
+
397
+ .terra-sidebar--closed .terra-sidebar__language-label {
398
+ display: none; /* Hide label when collapsed to save space */
399
+ }
400
+
401
+ .terra-sidebar__language-select {
402
+ width: 100%;
403
+ padding: var(--spacing-xs) var(--spacing-sm);
404
+ background: rgba(255, 255, 255, 0.1);
405
+ border: 1px solid rgba(255, 255, 255, 0.2);
406
+ border-radius: var(--radius-md);
407
+ color: white;
408
+ font-size: var(--font-size-sm);
409
+ cursor: pointer;
410
+ appearance: none; /* Remove default select arrow */
411
+ -webkit-appearance: none;
412
+ -moz-appearance: none;
413
+ background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292%22%20height%3D%22292%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M287%2C197L146%2C56L5%2C197H287z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
414
+ background-repeat: no-repeat;
415
+ background-position: right 8px top 50%;
416
+ background-size: 12px auto;
417
+ }
418
+
419
+ .terra-sidebar--closed .terra-sidebar__language-select {
420
+ width: 40px; /* Make it smaller when collapsed */
421
+ height: 40px; /* Make it square */
422
+ border-radius: 50%; /* Make it circular */
423
+ padding: 0; /* Remove padding */
424
+ text-align: center; /* Center content */
425
+ background-position: center; /* Center arrow */
426
+ font-size: 0; /* Hide text */
427
+ overflow: hidden; /* Hide overflow */
428
+ display: flex; /* Use flex for centering */
429
+ justify-content: center; /* Center content */
430
+ align-items: center; /* Center content */
431
+ }
432
+
433
+ .terra-sidebar--closed .terra-sidebar__language-select option {
434
+ display: none; /* Hide options when collapsed */
435
+ }
436
+
437
+ .terra-sidebar--closed .terra-sidebar__language-select::before {
438
+ content: "🌐"; /* Show globe icon when collapsed */
439
+ font-size: 1.5rem; /* Size of the globe icon */
440
+ color: white; /* Color of the globe icon */
441
+ display: block; /* Make sure it's visible */
442
+ }
443
+
444
+ .terra-sidebar__language-select:focus {
445
+ outline: none;
446
+ border-color: var(--color-mint-light);
447
+ box-shadow: 0 0 0 2px rgba(168, 230, 163, 0.3);
448
+ }
449
+
450
+ /* Tooltip for collapsed state */
451
+ .terra-sidebar__tooltip {
452
+ position: fixed;
453
+ left: 80px;
454
+ background: var(--color-gray-800);
455
+ color: var(--color-white);
456
+ padding: var(--spacing-sm) var(--spacing-md);
457
+ border-radius: var(--radius-sm);
458
+ font-size: var(--font-size-sm);
459
+ white-space: nowrap;
460
+ opacity: 0;
461
+ pointer-events: none;
462
+ transition: opacity var(--transition-normal);
463
+ z-index: var(--z-tooltip);
464
+ box-shadow: var(--shadow-lg);
465
+ }
466
+
467
+ .terra-sidebar__tooltip-arrow {
468
+ position: absolute;
469
+ left: -4px;
470
+ top: 50%;
471
+ transform: translateY(-50%);
472
+ width: 0;
473
+ height: 0;
474
+ border-top: 4px solid transparent;
475
+ border-bottom: 4px solid transparent;
476
+ border-right: 4px solid var(--color-gray-800);
477
+ }
478
+
479
+ /* Responsive Design */
480
+ @media (max-width: 1024px) {
481
+ .terra-sidebar {
482
+ transform: translateX(-100%);
483
+ transition: transform var(--transition-bounce);
484
+ border-radius: 0;
485
+ }
486
+
487
+ .terra-sidebar--open {
488
+ transform: translateX(0);
489
+ width: 280px;
490
+ }
491
+
492
+ .terra-sidebar--closed {
493
+ transform: translateX(-100%);
494
+ }
495
+ }
496
+
497
+ @media (max-width: 640px) {
498
+ .terra-sidebar--open {
499
+ width: 100vw;
500
+ }
501
+
502
+ .terra-sidebar__header {
503
+ padding: var(--spacing-md);
504
+ }
505
+
506
+ .terra-sidebar__search {
507
+ padding: 0 var(--spacing-md) var(--spacing-md);
508
+ }
509
+
510
+ .terra-sidebar__nav-item {
511
+ padding: var(--spacing-md);
512
+ margin: 0 var(--spacing-sm);
513
+ }
514
+
515
+ .terra-sidebar__footer {
516
+ padding: var(--spacing-md);
517
+ }
518
+ }
519
+
520
+ /* High Contrast Mode */
521
+ @media (prefers-contrast: high) {
522
+ .terra-sidebar {
523
+ background: var(--color-forest-deep);
524
+ border-right: 2px solid var(--color-white);
525
+ }
526
+
527
+ .terra-sidebar__nav-item--active {
528
+ background: rgba(255, 255, 255, 0.3);
529
+ border: 1px solid var(--color-white);
530
+ }
531
+ }
532
+
533
+ /* Reduced Motion */
534
+ @media (prefers-reduced-motion: reduce) {
535
+ .terra-sidebar,
536
+ .terra-sidebar__toggle-icon,
537
+ .terra-sidebar__nav-item,
538
+ .terra-sidebar__logo-text,
539
+ .terra-sidebar__nav-content {
540
+ transition: none;
541
+ }
542
+
543
+ .terra-sidebar__logo-icon {
544
+ animation: none;
545
+ }
546
+
547
+ .terra-sidebar__nav-indicator {
548
+ animation: none;
549
+ }
550
+
551
+ .terra-sidebar__nav-item:hover {
552
+ transform: none;
553
+ }
554
+ }
555
+
556
+ /* Focus Management */
557
+ .terra-sidebar__nav-item:focus-visible {
558
+ outline: 2px solid var(--color-mint-light);
559
+ outline-offset: 2px;
560
+ }
561
+
562
+ /* Animation for nav items */
563
+ .terra-sidebar__nav-item {
564
+ animation: slideInLeft 0.3s ease-out;
565
+ animation-fill-mode: both;
566
+ }
567
+
568
+ .terra-sidebar__nav-item:nth-child(1) { animation-delay: 0.1s; }
569
+ .terra-sidebar__nav-item:nth-child(2) { animation-delay: 0.15s; }
570
+ .terra-sidebar__nav-item:nth-child(3) { animation-delay: 0.2s; }
571
+ .terra-sidebar__nav-item:nth-child(4) { animation-delay: 0.25s; }
572
+ .terra-sidebar__nav-item:nth-child(5) { animation-delay: 0.3s; }
573
+
574
+ @keyframes slideInLeft {
575
+ from {
576
+ opacity: 0;
577
+ transform: translateX(-20px);
578
+ }
579
+ to {
580
+ opacity: 1;
581
+ transform: translateX(0);
582
+ }
583
+ }