BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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