BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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