BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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