BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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