BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

522f0db3 History
style.css 13.6 KiB Download Raw
1/* =========================================================
2 RESET & CUSTOM PROPERTIES
3 ========================================================= */
4*,
5*::before,
6*::after {
7 box-sizing: border-box;
8 margin: 0;
9 padding: 0;
10}
11
12:root {
13 --bg: #0f1117;
14 --surface: #1a1d27;
15 --surface2: #21242f;
16 --border: #2e3247;
17 --accent: #5b7fff;
18 --accent-hover: #7b9fff;
19 --text: #e8eaf0;
20 --text-muted: #7880a0;
21 --danger: #e05c6e;
22 --success: #3fcf8e;
23 --radius: 10px;
24 --topbar-h: 56px;
25 --sidebar-w: 300px;
26 --transition: 0.18s ease;
27}
28
29html,
30body {
31 height: 100%;
32 font-family: system-ui, -apple-system, sans-serif;
33}
34
35body {
36 background: var(--bg);
37 color: var(--text);
38 overflow: hidden;
39}
40
41.hidden {
42 display: none !important;
43}
44
45.muted {
46 color: var(--text-muted);
47}
48
49.error {
50 color: var(--danger);
51 font-size: 0.85rem;
52 margin-top: 0.3rem;
53}
54
55/* =========================================================
56 AUTH OVERLAY
57 ========================================================= */
58.overlay {
59 position: fixed;
60 inset: 0;
61 background: var(--bg);
62 display: flex;
63 align-items: center;
64 justify-content: center;
65 z-index: 100;
66}
67
68.auth-card {
69 background: var(--surface);
70 border: 1px solid var(--border);
71 border-radius: var(--radius);
72 padding: 2.5rem 2rem;
73 width: min(420px, 92vw);
74}
75
76.auth-card h1 {
77 font-size: 1.6rem;
78 margin-bottom: 0.5rem;
79}
80
81.auth-subtitle {
82 font-size: 0.88rem;
83 color: var(--text-muted);
84 margin-bottom: 1.2rem;
85}
86
87#auth-form label {
88 display: flex;
89 flex-direction: column;
90 gap: 0.3rem;
91 font-size: 0.85rem;
92 color: var(--text-muted);
93 margin-bottom: 1rem;
94}
95
96#auth-form input {
97 background: var(--bg);
98 border: 1px solid var(--border);
99 border-radius: 6px;
100 padding: 0.55rem 0.75rem;
101 color: var(--text);
102 font-size: 1rem;
103 outline: none;
104 transition: border-color var(--transition);
105}
106
107#auth-form input:focus {
108 border-color: var(--accent);
109}
110
111/* =========================================================
112 BUTTONS
113 ========================================================= */
114button {
115 cursor: pointer;
116 border: none;
117 border-radius: 6px;
118 font-size: 0.9rem;
119 transition: background var(--transition), color var(--transition);
120}
121
122.icon-btn {
123 display: flex;
124 align-items: center;
125 gap: 0.4rem;
126 background: transparent;
127 color: var(--text-muted);
128 padding: 0.4rem 0.7rem;
129 border-radius: 6px;
130}
131
132.icon-btn:hover {
133 background: var(--surface2);
134 color: var(--text);
135}
136
137.icon-btn svg {
138 width: 18px;
139 height: 18px;
140}
141
142button[type="submit"],
143.primary {
144 background: var(--accent);
145 color: #fff;
146 padding: 0.55rem 1.2rem;
147 font-weight: 600;
148 width: 100%;
149 margin-top: 0.5rem;
150}
151
152button[type="submit"]:hover,
153.primary:hover {
154 background: var(--accent-hover);
155}
156
157button.danger {
158 background: var(--surface2);
159 color: var(--danger);
160 padding: 0.55rem 1.2rem;
161 width: 100%;
162 margin-top: 0.5rem;
163}
164
165button.danger:hover {
166 background: var(--border);
167}
168
169/* =========================================================
170 TOP BAR
171 ========================================================= */
172#app {
173 display: flex;
174 flex-direction: column;
175 height: 100vh;
176}
177
178#topbar {
179 height: var(--topbar-h);
180 background: var(--surface);
181 border-bottom: 1px solid var(--border);
182 display: flex;
183 align-items: center;
184 padding: 0 1rem;
185 gap: 0.5rem;
186 flex-shrink: 0;
187}
188
189#breadcrumb-wrap {
190 flex: 1;
191 min-width: 0;
192}
193
194#breadcrumb {
195 display: flex;
196 align-items: center;
197 flex-wrap: wrap;
198 gap: 0.1rem;
199 font-size: 0.9rem;
200 white-space: nowrap;
201 overflow: hidden;
202}
203
204#breadcrumb .crumb {
205 color: var(--text-muted);
206 background: none;
207 padding: 0.2rem 0.35rem;
208 border-radius: 4px;
209 text-decoration: none;
210 cursor: pointer;
211}
212
213#breadcrumb .crumb:hover {
214 color: var(--text);
215 background: var(--surface2);
216}
217
218#breadcrumb .crumb.active {
219 color: var(--text);
220 cursor: default;
221}
222
223#breadcrumb .sep {
224 color: var(--border);
225 user-select: none;
226}
227
228#topbar-actions {
229 display: flex;
230 align-items: center;
231 gap: 0.25rem;
232 flex-shrink: 0;
233}
234
235/* =========================================================
236 MAIN + SIDEBAR LAYOUT
237 ========================================================= */
238#main-content {
239 flex: 1;
240 overflow-y: auto;
241 padding: 1.25rem;
242 position: relative;
243}
244
245#folder-stats {
246 margin-bottom: 0.8rem;
247 font-size: 0.85rem;
248}
249
250/* Drop overlay */
251#drop-overlay {
252 position: absolute;
253 inset: 0;
254 background: rgba(91, 127, 255, 0.12);
255 border: 3px dashed var(--accent);
256 border-radius: var(--radius);
257 display: flex;
258 align-items: center;
259 justify-content: center;
260 z-index: 10;
261 font-size: 1.4rem;
262 color: var(--accent);
263 pointer-events: none;
264}
265
266/* When sidebar is open, shrink main content */
267#app.sidebar-open #main-content {
268 margin-right: var(--sidebar-w);
269}
270
271/* =========================================================
272 FILE GRID
273 ========================================================= */
274#file-grid {
275 display: grid;
276 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
277 gap: 0.75rem;
278}
279
280.file-item {
281 display: flex;
282 flex-direction: column;
283 align-items: center;
284 padding: 0.9rem 0.5rem 0.7rem;
285 border-radius: var(--radius);
286 border: 1px solid transparent;
287 cursor: pointer;
288 user-select: none;
289 transition: background var(--transition), border-color var(--transition);
290 text-align: center;
291 gap: 0.4rem;
292 position: relative;
293}
294
295.file-item:hover {
296 background: var(--surface);
297 border-color: var(--border);
298}
299
300.file-item.selected {
301 background: var(--surface2);
302 border-color: var(--accent);
303}
304
305.file-item .icon {
306 width: 52px;
307 height: 52px;
308 display: flex;
309 align-items: center;
310 justify-content: center;
311}
312
313.file-item .icon svg {
314 width: 100%;
315 height: 100%;
316}
317
318.file-item .name {
319 font-size: 0.8rem;
320 word-break: break-all;
321 max-width: 100%;
322 line-height: 1.3;
323 color: var(--text);
324}
325
326/* =========================================================
327 SIDEBAR
328 ========================================================= */
329#sidebar {
330 position: fixed;
331 top: var(--topbar-h);
332 right: 0;
333 bottom: 0;
334 width: var(--sidebar-w);
335 background: var(--surface);
336 border-left: 1px solid var(--border);
337 padding: 1.25rem;
338 overflow-y: auto;
339 z-index: 20;
340 display: flex;
341 flex-direction: column;
342 gap: 0.75rem;
343}
344
345#sidebar-close {
346 background: none;
347 color: var(--text-muted);
348 align-self: flex-end;
349 font-size: 1.1rem;
350 padding: 0.2rem 0.5rem;
351}
352
353#sidebar-close:hover {
354 color: var(--text);
355}
356
357#sidebar-icon {
358 display: flex;
359 justify-content: center;
360}
361
362#sidebar-icon svg {
363 width: 64px;
364 height: 64px;
365}
366
367#sidebar-name {
368 font-size: 1rem;
369 word-break: break-all;
370 text-align: center;
371}
372
373#sidebar-meta {
374 display: grid;
375 grid-template-columns: auto 1fr;
376 gap: 0.3rem 0.75rem;
377}
378
379#sidebar-meta dt {
380 color: var(--text-muted);
381 font-size: 0.8rem;
382 font-weight: 600;
383}
384
385#sidebar-meta dd {
386 font-size: 0.8rem;
387 word-break: break-all;
388}
389
390#sidebar-actions {
391 display: flex;
392 flex-direction: column;
393 gap: 0.5rem;
394 margin-top: 0.5rem;
395}
396
397#sidebar-actions button {
398 background: var(--surface2);
399 color: var(--text);
400 padding: 0.5rem 0.8rem;
401 text-align: left;
402}
403
404#sidebar-actions button:hover {
405 background: var(--border);
406}
407
408#sidebar-actions button.danger {
409 color: var(--danger);
410}
411
412/* =========================================================
413 MODALS
414 ========================================================= */
415.modal-overlay {
416 position: fixed;
417 inset: 0;
418 background: rgba(0, 0, 0, 0.65);
419 display: flex;
420 align-items: center;
421 justify-content: center;
422 z-index: 50;
423}
424
425.modal {
426 background: var(--surface);
427 border: 1px solid var(--border);
428 border-radius: var(--radius);
429 padding: 2rem;
430 width: min(560px, 94vw);
431 max-height: 90vh;
432 overflow-y: auto;
433 position: relative;
434}
435
436.modal.small {
437 width: min(340px, 94vw);
438}
439
440.modal h2 {
441 font-size: 1.3rem;
442 margin-bottom: 1.25rem;
443}
444
445.modal h3 {
446 font-size: 1rem;
447 color: var(--text-muted);
448 margin: 1rem 0 0.5rem;
449}
450
451.modal-close {
452 position: absolute;
453 top: 0.75rem;
454 right: 0.75rem;
455 background: none;
456 color: var(--text-muted);
457 font-size: 1.1rem;
458 padding: 0.25rem 0.5rem;
459}
460
461.modal-close:hover {
462 color: var(--text);
463}
464
465/* Admin path list */
466.path-row {
467 display: flex;
468 align-items: center;
469 gap: 0.5rem;
470 padding: 0.4rem 0;
471 border-bottom: 1px solid var(--border);
472 font-size: 0.88rem;
473}
474
475.path-row span {
476 flex: 1;
477 word-break: break-all;
478}
479
480.path-row button {
481 background: none;
482 color: var(--danger);
483 padding: 0.2rem 0.5rem;
484}
485
486.path-add-row {
487 display: flex;
488 gap: 0.5rem;
489 margin: 0.5rem 0;
490}
491
492.path-add-row input {
493 flex: 1;
494 background: var(--bg);
495 border: 1px solid var(--border);
496 border-radius: 6px;
497 padding: 0.45rem 0.7rem;
498 color: var(--text);
499 font-size: 0.9rem;
500 outline: none;
501}
502
503.path-add-row input:focus {
504 border-color: var(--accent);
505}
506
507.path-add-row button {
508 background: var(--surface2);
509 color: var(--text);
510 padding: 0.45rem 0.9rem;
511}
512
513.path-add-row button:hover {
514 background: var(--border);
515}
516
517/* User list */
518.user-row {
519 display: flex;
520 align-items: center;
521 gap: 0.6rem;
522 padding: 0.5rem 0;
523 border-bottom: 1px solid var(--border);
524}
525
526.user-row .user-name {
527 flex: 1;
528 font-weight: 600;
529 font-size: 0.9rem;
530}
531
532.user-row .user-admin-badge {
533 font-size: 0.72rem;
534 background: var(--accent);
535 color: #fff;
536 border-radius: 4px;
537 padding: 0.1rem 0.4rem;
538}
539
540.user-row button {
541 background: none;
542 color: var(--text-muted);
543 padding: 0.2rem 0.5rem;
544 font-size: 0.85rem;
545}
546
547.user-row button:hover {
548 color: var(--text);
549}
550
551.user-row button.danger {
552 color: var(--danger);
553}
554
555/* User form permissions */
556#user-permissions {
557 margin-top: 0.75rem;
558}
559
560#user-permissions h4 {
561 font-size: 0.85rem;
562 color: var(--text-muted);
563 margin-bottom: 0.4rem;
564}
565
566.perm-row {
567 display: flex;
568 align-items: center;
569 gap: 0.75rem;
570 flex-wrap: wrap;
571 font-size: 0.85rem;
572 margin-bottom: 0.4rem;
573}
574
575.perm-row .perm-label {
576 min-width: 130px;
577 color: var(--text);
578}
579
580.checkbox-label {
581 display: flex;
582 align-items: center;
583 gap: 0.5rem;
584 font-size: 0.9rem;
585 margin-bottom: 0.5rem;
586}
587
588.checkbox-label input[type="checkbox"] {
589 width: 16px;
590 height: 16px;
591 accent-color: var(--accent);
592}
593
594/* Form labels in modals */
595.modal form label {
596 display: flex;
597 flex-direction: column;
598 gap: 0.3rem;
599 font-size: 0.85rem;
600 color: var(--text-muted);
601 margin-bottom: 0.9rem;
602}
603
604.modal form input[type="text"],
605.modal form input[type="password"] {
606 background: var(--bg);
607 border: 1px solid var(--border);
608 border-radius: 6px;
609 padding: 0.5rem 0.75rem;
610 color: var(--text);
611 font-size: 0.95rem;
612 outline: none;
613 transition: border-color var(--transition);
614}
615
616.modal form input:focus {
617 border-color: var(--accent);
618}
619
620/* =========================================================
621 TOAST
622 ========================================================= */
623#toast {
624 position: fixed;
625 bottom: 1.5rem;
626 left: 50%;
627 transform: translateX(-50%);
628 z-index: 200;
629 display: flex;
630 flex-direction: column;
631 align-items: center;
632 gap: 0.5rem;
633 pointer-events: none;
634}
635
636.toast-msg {
637 background: var(--surface2);
638 border: 1px solid var(--border);
639 border-radius: 8px;
640 padding: 0.6rem 1.25rem;
641 font-size: 0.9rem;
642 animation: slideup 0.25s ease;
643}
644
645.toast-msg.err {
646 border-color: var(--danger);
647 color: var(--danger);
648}
649
650.toast-msg.ok {
651 border-color: var(--success);
652 color: var(--success);
653}
654
655@keyframes slideup {
656 from {
657 opacity: 0;
658 transform: translateY(12px);
659 }
660
661 to {
662 opacity: 1;
663 transform: translateY(0);
664 }
665}
666
667/* =========================================================
668 UPLOAD PROGRESS
669 ========================================================= */
670.upload-bar-wrap {
671 position: fixed;
672 bottom: 0;
673 left: 0;
674 right: 0;
675 background: var(--surface);
676 border-top: 1px solid var(--border);
677 padding: 0.5rem 1rem;
678 z-index: 80;
679 font-size: 0.85rem;
680}
681
682.upload-bar-track {
683 height: 6px;
684 background: var(--border);
685 border-radius: 3px;
686 margin-top: 0.3rem;
687}
688
689.upload-bar-fill {
690 height: 100%;
691 background: var(--accent);
692 border-radius: 3px;
693 transition: width 0.2s linear;
694}
695
696/* =========================================================
697 RESPONSIVE — narrow screens
698 ========================================================= */
699@media (max-width: 600px) {
700 #topbar {
701 height: auto;
702 min-height: var(--topbar-h);
703 padding: 0.5rem 0.6rem;
704 align-items: flex-start;
705 flex-direction: column;
706 }
707
708 #breadcrumb-wrap {
709 width: 100%;
710 }
711
712 #topbar-actions {
713 width: 100%;
714 flex-wrap: wrap;
715 gap: 0.15rem;
716 }
717
718 .icon-btn {
719 padding: 0.4rem 0.55rem;
720 font-size: 0.82rem;
721 }
722
723 #main-content {
724 padding: 0.9rem;
725 }
726
727 #file-grid {
728 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
729 }
730
731 #app.sidebar-open #main-content {
732 margin-right: 0;
733 }
734
735 #sidebar {
736 top: auto;
737 left: 0;
738 height: 60vh;
739 border-left: none;
740 border-top: 1px solid var(--border);
741 width: 100%;
742 }
743
744 .modal {
745 padding: 1.25rem;
746 }
747}
748
749/* =========================================================
750 DIALOG MODALS (confirm / prompt / overwrite)
751 ========================================================= */
752.dialog-message {
753 color: var(--text-muted);
754 font-size: 0.93rem;
755 margin: 0 0 1.5rem;
756 line-height: 1.5;
757 word-break: break-word;
758}
759
760.dialog-actions {
761 display: flex;
762 gap: 0.6rem;
763 justify-content: flex-end;
764 flex-wrap: wrap;
765}
766
767.dialog-actions--overwrite {
768 justify-content: space-between;
769}
770
771.dialog-actions button {
772 min-width: 5rem;
773 background: var(--surface2);
774 color: var(--text);
775 padding: 0.5rem 1rem;
776}
777
778.dialog-actions button:hover {
779 background: var(--border);
780}
781
782/* Override .primary full-width inside dialog rows */
783.dialog-actions button.primary {
784 width: auto;
785 margin-top: 0;
786}