BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

style.css 16.8 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 animation: preview-balloon 220ms cubic-bezier(0.2, 0.9, 0.2, 1.05);
639}
640
641.preview-fold {
642 position: absolute;
643 top: 0;
644 right: 0;
645 width: 64px;
646 height: 64px;
647 background: linear-gradient(135deg, #182135 0%, #0f1525 100%);
648 clip-path: polygon(100% 0, 100% 100%, 0 0);
649 border-left: 1px solid var(--preview-accent);
650 border-bottom: 1px solid var(--preview-accent);
651}
652
653.preview-prep {
654 opacity: 0;
655}
656
657.preview-prep .preview-sheet {
658 opacity: 0;
659}
660
661.preview-ghost {
662 position: fixed;
663 z-index: 130;
664 pointer-events: none;
665 display: block;
666}
667
668.preview-close {
669 position: absolute;
670 top: 8px;
671 right: 8px;
672 width: 28px;
673 height: 28px;
674 background: transparent;
675 color: #d6deef;
676 border-radius: 999px;
677 font-size: 0.95rem;
678 z-index: 2;
679}
680
681.preview-close:hover {
682 background: rgba(255, 255, 255, 0.08);
683}
684
685.preview-title {
686 font-size: 1rem;
687 color: var(--text);
688 padding: 0.85rem 1rem;
689 margin: 0;
690 border-bottom: 1px solid var(--border);
691 white-space: nowrap;
692 overflow: hidden;
693 text-overflow: ellipsis;
694 padding-right: 3.5rem;
695}
696
697.preview-body {
698 flex: 1;
699 min-height: 0;
700 overflow: auto;
701 display: flex;
702 align-items: center;
703 justify-content: center;
704 padding: 0.9rem;
705}
706
707.preview-media {
708 max-width: 100%;
709 max-height: 100%;
710 width: auto;
711 height: auto;
712 object-fit: contain;
713}
714
715.preview-frame {
716 width: 100%;
717 height: 100%;
718 border: none;
719 border-radius: 8px;
720 background: #fff;
721}
722
723.preview-audio {
724 width: min(640px, 95%);
725}
726
727.preview-text {
728 width: 100%;
729 min-height: 100%;
730 color: #dce4ff;
731 background: #0d111a;
732 border: 1px solid var(--border);
733 border-radius: 8px;
734 padding: 0.9rem;
735 font: 0.85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
736 overflow: auto;
737 white-space: pre;
738}
739
740.preview-code .tok-comment {
741 color: #6f7f9a;
742}
743
744.preview-code .tok-string {
745 color: #9ee37d;
746}
747
748.preview-code .tok-number {
749 color: #f8c46a;
750}
751
752.preview-code .tok-keyword {
753 color: #8bb4ff;
754 font-weight: 600;
755}
756
757.preview-code .tok-key {
758 color: #59c8ff;
759}
760
761.preview-unsupported {
762 color: var(--text-muted);
763 font-size: 0.95rem;
764 max-width: 56ch;
765 text-align: center;
766}
767
768.preview-footer {
769 border-top: 1px solid var(--border);
770 padding: 0.8rem 1rem;
771 display: flex;
772 justify-content: flex-end;
773}
774
775.preview-footer .primary {
776 width: auto;
777 margin-top: 0;
778 min-width: 8rem;
779}
780
781@keyframes preview-balloon {
782 from {
783 opacity: 0;
784 transform: scale(0.12);
785 }
786
787 to {
788 opacity: 1;
789 transform: scale(1);
790 }
791}
792
793/* =========================================================
794 TOAST
795 ========================================================= */
796#toast {
797 position: fixed;
798 bottom: 1.5rem;
799 left: 50%;
800 transform: translateX(-50%);
801 z-index: 200;
802 display: flex;
803 flex-direction: column;
804 align-items: center;
805 gap: 0.5rem;
806 pointer-events: none;
807}
808
809.toast-msg {
810 background: var(--surface2);
811 border: 1px solid var(--border);
812 border-radius: 8px;
813 padding: 0.6rem 1.25rem;
814 font-size: 0.9rem;
815 animation: slideup 0.25s ease;
816}
817
818.toast-msg.err {
819 border-color: var(--danger);
820 color: var(--danger);
821}
822
823.toast-msg.ok {
824 border-color: var(--success);
825 color: var(--success);
826}
827
828@keyframes slideup {
829 from {
830 opacity: 0;
831 transform: translateY(12px);
832 }
833
834 to {
835 opacity: 1;
836 transform: translateY(0);
837 }
838}
839
840/* =========================================================
841 UPLOAD PROGRESS
842 ========================================================= */
843.upload-bar-wrap {
844 position: fixed;
845 bottom: 0;
846 left: 0;
847 right: 0;
848 background: var(--surface);
849 border-top: 1px solid var(--border);
850 padding: 0.5rem 1rem;
851 z-index: 80;
852 font-size: 0.85rem;
853}
854
855.upload-bar-track {
856 height: 6px;
857 background: var(--border);
858 border-radius: 3px;
859 margin-top: 0.3rem;
860}
861
862.upload-bar-fill {
863 height: 100%;
864 background: var(--accent);
865 border-radius: 3px;
866 transition: width 0.2s linear;
867}
868
869/* =========================================================
870 RESPONSIVE — narrow screens
871 ========================================================= */
872@media (max-width: 600px) {
873 #topbar {
874 height: auto;
875 min-height: var(--topbar-h);
876 padding: 0.5rem 0.6rem;
877 align-items: flex-start;
878 flex-direction: column;
879 }
880
881 #breadcrumb-wrap {
882 width: 100%;
883 }
884
885 #topbar-actions {
886 width: 100%;
887 flex-wrap: wrap;
888 gap: 0.15rem;
889 }
890
891 .icon-btn {
892 padding: 0.4rem 0.55rem;
893 font-size: 0.82rem;
894 }
895
896 #main-content {
897 padding: 0.9rem;
898 }
899
900 #file-grid {
901 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
902 }
903
904 #app.sidebar-open #main-content {
905 margin-right: 0;
906 }
907
908 #sidebar {
909 top: auto;
910 left: 0;
911 height: 60vh;
912 border-left: none;
913 border-top: 1px solid var(--border);
914 width: 100%;
915 }
916
917 .modal {
918 padding: 1.25rem;
919 }
920
921 .preview-overlay {
922 padding: 0.8rem;
923 }
924
925 .preview-sheet {
926 width: 100%;
927 height: 92vh;
928 }
929
930 .preview-fold {
931 width: 54px;
932 height: 54px;
933 }
934
935 .preview-close {
936 top: 5px;
937 right: 5px;
938 }
939}
940
941/* =========================================================
942 DIALOG MODALS (confirm / prompt / overwrite)
943 ========================================================= */
944.dialog-message {
945 color: var(--text-muted);
946 font-size: 0.93rem;
947 margin: 0 0 1.5rem;
948 line-height: 1.5;
949 word-break: break-word;
950}
951
952.dialog-actions {
953 display: flex;
954 gap: 0.6rem;
955 justify-content: flex-end;
956 flex-wrap: wrap;
957}
958
959.dialog-actions--overwrite {
960 justify-content: space-between;
961}
962
963.dialog-actions button {
964 min-width: 5rem;
965 background: var(--surface2);
966 color: var(--text);
967 padding: 0.5rem 1rem;
968}
969
970.dialog-actions button:hover {
971 background: var(--border);
972}
973
974/* Override .primary full-width inside dialog rows */
975.dialog-actions button.primary {
976 width: auto;
977 margin-top: 0;
978}