BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

style.css 16.0 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 position: relative;
312}
313
314.file-item .icon.thumb-pending::after {
315 content: '';
316 position: absolute;
317 width: 14px;
318 height: 14px;
319 right: -2px;
320 bottom: -2px;
321 border: 2px solid rgba(232, 234, 240, 0.35);
322 border-top-color: var(--accent);
323 border-radius: 50%;
324 animation: icon-thumb-spin 0.75s linear infinite;
325 background: rgba(15, 17, 23, 0.85);
326}
327
328@keyframes icon-thumb-spin {
329 to {
330 transform: rotate(360deg);
331 }
332}
333
334.file-item .icon svg {
335 width: 100%;
336 height: 100%;
337}
338
339.file-item .name {
340 font-size: 0.8rem;
341 word-break: break-all;
342 max-width: 100%;
343 line-height: 1.3;
344 color: var(--text);
345}
346
347/* =========================================================
348 SIDEBAR
349 ========================================================= */
350#sidebar {
351 position: fixed;
352 top: var(--topbar-h);
353 right: 0;
354 bottom: 0;
355 width: var(--sidebar-w);
356 background: var(--surface);
357 border-left: 1px solid var(--border);
358 padding: 1.25rem;
359 overflow-y: auto;
360 z-index: 20;
361 display: flex;
362 flex-direction: column;
363 gap: 0.75rem;
364}
365
366#sidebar-close {
367 display: none;
368 align-items: center;
369 justify-content: center;
370 width: 1.7rem;
371 height: 1.7rem;
372 border: 1px solid transparent;
373 border-radius: 999px;
374 background: transparent;
375 color: var(--text-muted);
376 font-size: 1rem;
377 line-height: 1;
378}
379
380#sidebar-close:hover {
381 background: var(--surface2);
382 color: var(--text);
383}
384
385#sidebar-icon {
386 display: flex;
387 justify-content: center;
388}
389
390#sidebar-icon svg {
391 width: 64px;
392 height: 64px;
393}
394
395#sidebar-name {
396 font-size: 1rem;
397 word-break: break-all;
398 text-align: center;
399}
400
401#sidebar-meta {
402 display: grid;
403 grid-template-columns: auto 1fr;
404 gap: 0.3rem 0.75rem;
405}
406
407#sidebar-meta dt {
408 color: var(--text-muted);
409 font-size: 0.8rem;
410 font-weight: 600;
411}
412
413#sidebar-meta dd {
414 font-size: 0.8rem;
415 word-break: break-all;
416}
417
418#sidebar-actions {
419 display: flex;
420 flex-direction: column;
421 gap: 0.5rem;
422 margin-top: 0.5rem;
423}
424
425#sidebar-actions button {
426 background: var(--surface2);
427 color: var(--text);
428 padding: 0.5rem 0.8rem;
429 text-align: left;
430}
431
432#sidebar-actions button:hover {
433 background: var(--border);
434}
435
436#sidebar-actions button.danger {
437 color: var(--danger);
438}
439
440/* =========================================================
441 MODALS
442 ========================================================= */
443.modal-overlay {
444 position: fixed;
445 inset: 0;
446 background: rgba(0, 0, 0, 0.65);
447 display: flex;
448 align-items: center;
449 justify-content: center;
450 z-index: 50;
451}
452
453.modal {
454 background: var(--surface);
455 border: 1px solid var(--border);
456 border-radius: var(--radius);
457 padding: 2rem;
458 width: min(560px, 94vw);
459 max-height: 90vh;
460 overflow-y: auto;
461 position: relative;
462}
463
464.modal.small {
465 width: min(340px, 94vw);
466}
467
468.modal h2 {
469 font-size: 1.3rem;
470 margin-bottom: 1.25rem;
471}
472
473.modal h3 {
474 font-size: 1rem;
475 color: var(--text-muted);
476 margin: 1rem 0 0.5rem;
477}
478
479.modal-close {
480 position: absolute;
481 top: 0.75rem;
482 right: 0.75rem;
483 background: none;
484 color: var(--text-muted);
485 font-size: 1.1rem;
486 padding: 0.25rem 0.5rem;
487}
488
489.modal-close:hover {
490 color: var(--text);
491}
492
493/* Admin path list */
494.path-row {
495 display: flex;
496 align-items: center;
497 gap: 0.5rem;
498 padding: 0.4rem 0;
499 border-bottom: 1px solid var(--border);
500 font-size: 0.88rem;
501}
502
503.path-row span {
504 flex: 1;
505 word-break: break-all;
506}
507
508.path-row button {
509 background: none;
510 color: var(--danger);
511 padding: 0.2rem 0.5rem;
512}
513
514.path-add-row {
515 display: flex;
516 gap: 0.5rem;
517 margin: 0.5rem 0;
518}
519
520.path-add-row input {
521 flex: 1;
522 background: var(--bg);
523 border: 1px solid var(--border);
524 border-radius: 6px;
525 padding: 0.45rem 0.7rem;
526 color: var(--text);
527 font-size: 0.9rem;
528 outline: none;
529}
530
531.path-add-row input:focus {
532 border-color: var(--accent);
533}
534
535.path-add-row button {
536 background: var(--surface2);
537 color: var(--text);
538 padding: 0.45rem 0.9rem;
539}
540
541.path-add-row button:hover {
542 background: var(--border);
543}
544
545/* User list */
546.user-row {
547 display: flex;
548 align-items: center;
549 gap: 0.6rem;
550 padding: 0.5rem 0;
551 border-bottom: 1px solid var(--border);
552}
553
554.user-row .user-name {
555 flex: 1;
556 font-weight: 600;
557 font-size: 0.9rem;
558}
559
560.user-row .user-admin-badge {
561 font-size: 0.72rem;
562 background: var(--accent);
563 color: #fff;
564 border-radius: 4px;
565 padding: 0.1rem 0.4rem;
566}
567
568.user-row button {
569 background: none;
570 color: var(--text-muted);
571 padding: 0.2rem 0.5rem;
572 font-size: 0.85rem;
573}
574
575.user-row button:hover {
576 color: var(--text);
577}
578
579.user-row button.danger {
580 color: var(--danger);
581}
582
583/* User form permissions */
584#user-permissions {
585 margin-top: 0.75rem;
586}
587
588#user-permissions h4 {
589 font-size: 0.85rem;
590 color: var(--text-muted);
591 margin-bottom: 0.4rem;
592}
593
594.perm-row {
595 display: flex;
596 align-items: center;
597 gap: 0.75rem;
598 flex-wrap: wrap;
599 font-size: 0.85rem;
600 margin-bottom: 0.4rem;
601}
602
603.perm-row .perm-label {
604 min-width: 130px;
605 color: var(--text);
606}
607
608.checkbox-label {
609 display: flex;
610 align-items: center;
611 gap: 0.5rem;
612 font-size: 0.9rem;
613 margin-bottom: 0.5rem;
614}
615
616.checkbox-label input[type="checkbox"] {
617 width: 16px;
618 height: 16px;
619 accent-color: var(--accent);
620}
621
622/* Form labels in modals */
623.modal form label {
624 display: flex;
625 flex-direction: column;
626 gap: 0.3rem;
627 font-size: 0.85rem;
628 color: var(--text-muted);
629 margin-bottom: 0.9rem;
630}
631
632.modal form input[type="text"],
633.modal form input[type="password"] {
634 background: var(--bg);
635 border: 1px solid var(--border);
636 border-radius: 6px;
637 padding: 0.5rem 0.75rem;
638 color: var(--text);
639 font-size: 0.95rem;
640 outline: none;
641 transition: border-color var(--transition);
642}
643
644.modal form input:focus {
645 border-color: var(--accent);
646}
647
648/* =========================================================
649 FILE PREVIEW — SHARED MEDIA STYLES
650 ========================================================= */
651.preview-media {
652 max-width: 100%;
653 max-height: 100%;
654 width: auto;
655 height: auto;
656 object-fit: contain;
657}
658
659.preview-frame {
660 width: 100%;
661 height: 100%;
662 border: none;
663 border-radius: 8px;
664 background: #fff;
665}
666
667.preview-audio {
668 width: min(640px, 95%);
669}
670
671.preview-text {
672 width: 100%;
673 min-height: 100%;
674 color: #dce4ff;
675 background: #0d111a;
676 border: 1px solid var(--border);
677 border-radius: 8px;
678 padding: 0.9rem;
679 font: 0.85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
680 overflow: auto;
681 white-space: pre;
682 text-align: left;
683}
684
685.preview-code .tok-comment {
686 color: #6f7f9a;
687}
688
689.preview-code .tok-string {
690 color: #9ee37d;
691}
692
693.preview-code .tok-number {
694 color: #f8c46a;
695}
696
697.preview-code .tok-keyword {
698 color: #8bb4ff;
699 font-weight: 600;
700}
701
702.preview-code .tok-key {
703 color: #59c8ff;
704}
705
706.preview-unsupported {
707 color: var(--text-muted);
708 font-size: 0.95rem;
709 max-width: 56ch;
710 text-align: center;
711}
712
713.preview-footer {
714 border-top: 1px solid var(--border);
715 padding: 0.8rem 1rem;
716 display: flex;
717 justify-content: flex-end;
718}
719
720.preview-footer .primary {
721 width: auto;
722 margin-top: 0;
723 min-width: 8rem;
724}
725
726
727
728/* =========================================================
729
730.toast-msg {
731 background: var(--surface2);
732 border: 1px solid var(--border);
733 border-radius: 8px;
734 padding: 0.6rem 1.25rem;
735 font-size: 0.9rem;
736 animation: slideup 0.25s ease;
737}
738
739.toast-msg.err {
740 border-color: var(--danger);
741 color: var(--danger);
742}
743
744.toast-msg.ok {
745 border-color: var(--success);
746 color: var(--success);
747}
748
749@keyframes slideup {
750 from {
751 opacity: 0;
752 transform: translateY(12px);
753 }
754
755 to {
756 opacity: 1;
757 transform: translateY(0);
758 }
759}
760
761/* =========================================================
762 UPLOAD PROGRESS
763 ========================================================= */
764.upload-bar-wrap {
765 position: fixed;
766 bottom: 0;
767 left: 0;
768 right: 0;
769 background: var(--surface);
770 border-top: 1px solid var(--border);
771 padding: 0.5rem 1rem;
772 z-index: 80;
773 font-size: 0.85rem;
774}
775
776.upload-bar-track {
777 height: 6px;
778 background: var(--border);
779 border-radius: 3px;
780 margin-top: 0.3rem;
781}
782
783.upload-bar-fill {
784 height: 100%;
785 background: var(--accent);
786 border-radius: 3px;
787 transition: width 0.2s linear;
788}
789
790/* =========================================================
791 RESPONSIVE — narrow screens
792 ========================================================= */
793@media (max-width: 600px) {
794 #topbar {
795 height: auto;
796 min-height: var(--topbar-h);
797 padding: 0.5rem 0.6rem;
798 align-items: flex-start;
799 flex-direction: column;
800 }
801
802 #breadcrumb-wrap {
803 width: 100%;
804 }
805
806 #topbar-actions {
807 width: 100%;
808 flex-wrap: wrap;
809 gap: 0.15rem;
810 }
811
812 .icon-btn {
813 padding: 0.4rem 0.55rem;
814 font-size: 0.82rem;
815 }
816
817 #main-content {
818 padding: 0.9rem;
819 }
820
821 #file-grid {
822 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
823 }
824
825 #app.sidebar-open #main-content {
826 margin-right: 0;
827 }
828
829 #sidebar {
830 top: auto;
831 right: 0;
832 bottom: 0;
833 left: 0;
834 height: auto;
835 max-height: min(68vh, calc(100vh - 0.5rem));
836 padding: 0.9rem 0.9rem 1rem;
837 border-left: none;
838 border-top: 1px solid var(--border);
839 width: 100%;
840 border-radius: 14px 14px 0 0;
841 box-shadow: 0 -12px 26px rgba(0, 0, 0, 0.34);
842 gap: 0.55rem;
843 }
844
845 #sidebar-close {
846 display: inline-flex;
847 position: absolute;
848 top: 0.45rem;
849 right: 0.45rem;
850 border-color: var(--border);
851 background: var(--surface2);
852 }
853
854 #sidebar-name {
855 padding-right: 2rem;
856 }
857
858 #sidebar-icon svg {
859 width: 54px;
860 height: 54px;
861 }
862
863 #sidebar-actions {
864 margin-top: 0.2rem;
865 }
866
867 .modal {
868 padding: 1.25rem;
869 }
870
871 .preview-overlay {
872 padding: 0.8rem;
873 }
874
875 .preview-sheet {
876 width: 100%;
877 height: 92vh;
878 }
879
880 .preview-fold {
881 width: 54px;
882 height: 54px;
883 }
884
885 .preview-close {
886 top: 5px;
887 right: 5px;
888 }
889}
890
891/* =========================================================
892 DIALOG MODALS (confirm / prompt / overwrite)
893 ========================================================= */
894.dialog-message {
895 color: var(--text-muted);
896 font-size: 0.93rem;
897 margin: 0 0 1.5rem;
898 line-height: 1.5;
899 word-break: break-word;
900}
901
902.dialog-actions {
903 display: flex;
904 gap: 0.6rem;
905 justify-content: flex-end;
906 flex-wrap: wrap;
907}
908
909.dialog-actions--overwrite {
910 justify-content: space-between;
911}
912
913.dialog-actions button {
914 min-width: 5rem;
915 background: var(--surface2);
916 color: var(--text);
917 padding: 0.5rem 1rem;
918}
919
920.dialog-actions button:hover {
921 background: var(--border);
922}
923
924/* Override .primary full-width inside dialog rows */
925.dialog-actions button.primary {
926 width: auto;
927 margin-top: 0;
928}