BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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