BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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