BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

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