BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

style.css 12.8 KiB Download Raw
1/* =========================================================
2 RESET & CUSTOM PROPERTIES
3 ========================================================= */
4*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
5
6:root {
7 --bg: #0f1117;
8 --surface: #1a1d27;
9 --surface2: #21242f;
10 --border: #2e3247;
11 --accent: #5b7fff;
12 --accent-hover:#7b9fff;
13 --text: #e8eaf0;
14 --text-muted: #7880a0;
15 --danger: #e05c6e;
16 --success: #3fcf8e;
17 --radius: 10px;
18 --topbar-h: 56px;
19 --sidebar-w: 300px;
20 --transition: 0.18s ease;
21}
22
23html, body { height: 100%; font-family: system-ui, -apple-system, sans-serif; }
24body { background: var(--bg); color: var(--text); overflow: hidden; }
25
26.hidden { display: none !important; }
27.muted { color: var(--text-muted); }
28.error { color: var(--danger); font-size: 0.85rem; margin-top: 0.3rem; }
29
30/* =========================================================
31 AUTH OVERLAY
32 ========================================================= */
33.overlay {
34 position: fixed; inset: 0;
35 background: var(--bg);
36 display: flex; align-items: center; justify-content: center;
37 z-index: 100;
38}
39
40.auth-card {
41 background: var(--surface);
42 border: 1px solid var(--border);
43 border-radius: var(--radius);
44 padding: 2.5rem 2rem;
45 width: min(420px, 92vw);
46}
47
48.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
49.auth-subtitle { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.2rem; }
50
51#auth-form label {
52 display: flex; flex-direction: column; gap: 0.3rem;
53 font-size: 0.85rem; color: var(--text-muted);
54 margin-bottom: 1rem;
55}
56
57#auth-form input {
58 background: var(--bg);
59 border: 1px solid var(--border);
60 border-radius: 6px;
61 padding: 0.55rem 0.75rem;
62 color: var(--text);
63 font-size: 1rem;
64 outline: none;
65 transition: border-color var(--transition);
66}
67#auth-form input:focus { border-color: var(--accent); }
68
69/* =========================================================
70 BUTTONS
71 ========================================================= */
72button {
73 cursor: pointer;
74 border: none;
75 border-radius: 6px;
76 font-size: 0.9rem;
77 transition: background var(--transition), color var(--transition);
78}
79
80.icon-btn {
81 display: flex; align-items: center; gap: 0.4rem;
82 background: transparent;
83 color: var(--text-muted);
84 padding: 0.4rem 0.7rem;
85 border-radius: 6px;
86}
87.icon-btn:hover { background: var(--surface2); color: var(--text); }
88.icon-btn svg { width: 18px; height: 18px; }
89
90button[type="submit"],
91.primary {
92 background: var(--accent);
93 color: #fff;
94 padding: 0.55rem 1.2rem;
95 font-weight: 600;
96 width: 100%;
97 margin-top: 0.5rem;
98}
99button[type="submit"]:hover,
100.primary:hover { background: var(--accent-hover); }
101
102/* =========================================================
103 TOP BAR
104 ========================================================= */
105#app {
106 display: flex;
107 flex-direction: column;
108 height: 100vh;
109}
110
111#topbar {
112 height: var(--topbar-h);
113 background: var(--surface);
114 border-bottom: 1px solid var(--border);
115 display: flex;
116 align-items: center;
117 padding: 0 1rem;
118 gap: 0.5rem;
119 flex-shrink: 0;
120}
121
122#breadcrumb-wrap { flex: 1; min-width: 0; }
123
124#breadcrumb {
125 display: flex; align-items: center; flex-wrap: wrap;
126 gap: 0.1rem;
127 font-size: 0.9rem;
128 white-space: nowrap;
129 overflow: hidden;
130}
131
132#breadcrumb .crumb {
133 color: var(--text-muted);
134 background: none;
135 padding: 0.2rem 0.35rem;
136 border-radius: 4px;
137 text-decoration: none;
138 cursor: pointer;
139}
140#breadcrumb .crumb:hover { color: var(--text); background: var(--surface2); }
141#breadcrumb .crumb.active { color: var(--text); cursor: default; }
142#breadcrumb .sep { color: var(--border); user-select: none; }
143
144#topbar-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
145
146/* =========================================================
147 MAIN + SIDEBAR LAYOUT
148 ========================================================= */
149#main-content {
150 flex: 1;
151 overflow-y: auto;
152 padding: 1.25rem;
153 position: relative;
154}
155
156#folder-stats {
157 margin-bottom: 0.8rem;
158 font-size: 0.85rem;
159}
160
161/* Drop overlay */
162#drop-overlay {
163 position: absolute; inset: 0;
164 background: rgba(91, 127, 255, 0.12);
165 border: 3px dashed var(--accent);
166 border-radius: var(--radius);
167 display: flex; align-items: center; justify-content: center;
168 z-index: 10;
169 font-size: 1.4rem;
170 color: var(--accent);
171 pointer-events: none;
172}
173
174/* When sidebar is open, shrink main content */
175#app.sidebar-open #main-content { margin-right: var(--sidebar-w); }
176
177/* =========================================================
178 FILE GRID
179 ========================================================= */
180#file-grid {
181 display: grid;
182 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
183 gap: 0.75rem;
184}
185
186.file-item {
187 display: flex; flex-direction: column; align-items: center;
188 padding: 0.9rem 0.5rem 0.7rem;
189 border-radius: var(--radius);
190 border: 1px solid transparent;
191 cursor: pointer;
192 user-select: none;
193 transition: background var(--transition), border-color var(--transition);
194 text-align: center;
195 gap: 0.4rem;
196 position: relative;
197}
198.file-item:hover { background: var(--surface); border-color: var(--border); }
199.file-item.selected { background: var(--surface2); border-color: var(--accent); }
200
201.file-item .icon {
202 width: 52px; height: 52px;
203 display: flex; align-items: center; justify-content: center;
204}
205.file-item .icon svg { width: 100%; height: 100%; }
206
207.file-item .name {
208 font-size: 0.8rem;
209 word-break: break-all;
210 max-width: 100%;
211 line-height: 1.3;
212 color: var(--text);
213}
214
215/* =========================================================
216 SIDEBAR
217 ========================================================= */
218#sidebar {
219 position: fixed;
220 top: var(--topbar-h);
221 right: 0;
222 bottom: 0;
223 width: var(--sidebar-w);
224 background: var(--surface);
225 border-left: 1px solid var(--border);
226 padding: 1.25rem;
227 overflow-y: auto;
228 z-index: 20;
229 display: flex; flex-direction: column; gap: 0.75rem;
230}
231
232#sidebar-close {
233 background: none; color: var(--text-muted);
234 align-self: flex-end; font-size: 1.1rem; padding: 0.2rem 0.5rem;
235}
236#sidebar-close:hover { color: var(--text); }
237
238#sidebar-icon { display: flex; justify-content: center; }
239#sidebar-icon svg { width: 64px; height: 64px; }
240
241#sidebar-name {
242 font-size: 1rem;
243 word-break: break-all;
244 text-align: center;
245}
246
247#sidebar-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.75rem; }
248#sidebar-meta dt { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }
249#sidebar-meta dd { font-size: 0.8rem; word-break: break-all; }
250
251#sidebar-actions {
252 display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem;
253}
254
255#sidebar-actions button {
256 background: var(--surface2); color: var(--text);
257 padding: 0.5rem 0.8rem;
258 text-align: left;
259}
260#sidebar-actions button:hover { background: var(--border); }
261#sidebar-actions button.danger { color: var(--danger); }
262
263/* =========================================================
264 MODALS
265 ========================================================= */
266.modal-overlay {
267 position: fixed; inset: 0;
268 background: rgba(0,0,0,0.65);
269 display: flex; align-items: center; justify-content: center;
270 z-index: 50;
271}
272
273.modal {
274 background: var(--surface);
275 border: 1px solid var(--border);
276 border-radius: var(--radius);
277 padding: 2rem;
278 width: min(560px, 94vw);
279 max-height: 90vh;
280 overflow-y: auto;
281 position: relative;
282}
283.modal.small { width: min(340px, 94vw); }
284
285.modal h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
286.modal h3 { font-size: 1rem; color: var(--text-muted); margin: 1rem 0 0.5rem; }
287
288.modal-close {
289 position: absolute; top: 0.75rem; right: 0.75rem;
290 background: none; color: var(--text-muted); font-size: 1.1rem; padding: 0.25rem 0.5rem;
291}
292.modal-close:hover { color: var(--text); }
293
294/* Admin path list */
295.path-row {
296 display: flex; align-items: center; gap: 0.5rem;
297 padding: 0.4rem 0;
298 border-bottom: 1px solid var(--border);
299 font-size: 0.88rem;
300}
301.path-row span { flex: 1; word-break: break-all; }
302.path-row button { background: none; color: var(--danger); padding: 0.2rem 0.5rem; }
303
304.path-add-row { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
305.path-add-row input {
306 flex: 1; background: var(--bg); border: 1px solid var(--border);
307 border-radius: 6px; padding: 0.45rem 0.7rem; color: var(--text);
308 font-size: 0.9rem; outline: none;
309}
310.path-add-row input:focus { border-color: var(--accent); }
311.path-add-row button {
312 background: var(--surface2); color: var(--text); padding: 0.45rem 0.9rem;
313}
314.path-add-row button:hover { background: var(--border); }
315
316/* User list */
317.user-row {
318 display: flex; align-items: center; gap: 0.6rem;
319 padding: 0.5rem 0;
320 border-bottom: 1px solid var(--border);
321}
322.user-row .user-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
323.user-row .user-admin-badge {
324 font-size: 0.72rem; background: var(--accent); color: #fff;
325 border-radius: 4px; padding: 0.1rem 0.4rem;
326}
327.user-row button { background: none; color: var(--text-muted); padding: 0.2rem 0.5rem; font-size: 0.85rem; }
328.user-row button:hover { color: var(--text); }
329.user-row button.danger { color: var(--danger); }
330
331/* User form permissions */
332#user-permissions { margin-top: 0.75rem; }
333#user-permissions h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }
334.perm-row {
335 display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
336 font-size: 0.85rem; margin-bottom: 0.4rem;
337}
338.perm-row .perm-label { min-width: 130px; color: var(--text); }
339.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 0.5rem; }
340.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
341
342/* Form labels in modals */
343.modal form label {
344 display: flex; flex-direction: column; gap: 0.3rem;
345 font-size: 0.85rem; color: var(--text-muted);
346 margin-bottom: 0.9rem;
347}
348.modal form input[type="text"],
349.modal form input[type="password"] {
350 background: var(--bg); border: 1px solid var(--border);
351 border-radius: 6px; padding: 0.5rem 0.75rem;
352 color: var(--text); font-size: 0.95rem; outline: none;
353 transition: border-color var(--transition);
354}
355.modal form input:focus { border-color: var(--accent); }
356
357/* =========================================================
358 TOAST
359 ========================================================= */
360#toast {
361 position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
362 z-index: 200;
363 display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
364 pointer-events: none;
365}
366
367.toast-msg {
368 background: var(--surface2);
369 border: 1px solid var(--border);
370 border-radius: 8px;
371 padding: 0.6rem 1.25rem;
372 font-size: 0.9rem;
373 animation: slideup 0.25s ease;
374}
375.toast-msg.err { border-color: var(--danger); color: var(--danger); }
376.toast-msg.ok { border-color: var(--success); color: var(--success); }
377
378@keyframes slideup {
379 from { opacity: 0; transform: translateY(12px); }
380 to { opacity: 1; transform: translateY(0); }
381}
382
383/* =========================================================
384 UPLOAD PROGRESS
385 ========================================================= */
386.upload-bar-wrap {
387 position: fixed; bottom: 0; left: 0; right: 0;
388 background: var(--surface);
389 border-top: 1px solid var(--border);
390 padding: 0.5rem 1rem;
391 z-index: 80;
392 font-size: 0.85rem;
393}
394.upload-bar-track {
395 height: 6px; background: var(--border); border-radius: 3px; margin-top: 0.3rem;
396}
397.upload-bar-fill {
398 height: 100%; background: var(--accent); border-radius: 3px;
399 transition: width 0.2s linear;
400}
401
402/* =========================================================
403 RESPONSIVE — narrow screens
404 ========================================================= */
405@media (max-width: 600px) {
406 #topbar {
407 height: auto;
408 min-height: var(--topbar-h);
409 padding: 0.5rem 0.6rem;
410 align-items: flex-start;
411 flex-direction: column;
412 }
413
414 #breadcrumb-wrap {
415 width: 100%;
416 }
417
418 #topbar-actions {
419 width: 100%;
420 flex-wrap: wrap;
421 gap: 0.15rem;
422 }
423
424 .icon-btn {
425 padding: 0.4rem 0.55rem;
426 font-size: 0.82rem;
427 }
428
429 #main-content {
430 padding: 0.9rem;
431 }
432
433 #file-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
434
435 #app.sidebar-open #main-content { margin-right: 0; }
436
437 #sidebar {
438 top: auto;
439 left: 0;
440 height: 60vh;
441 border-left: none;
442 border-top: 1px solid var(--border);
443 width: 100%;
444 }
445
446 .modal { padding: 1.25rem; }
447}
448
449/* =========================================================
450 DIALOG MODALS (confirm / prompt / overwrite)
451 ========================================================= */
452.dialog-message {
453 color: var(--text-muted);
454 font-size: 0.93rem;
455 margin: 0 0 1.5rem;
456 line-height: 1.5;
457 word-break: break-word;
458}
459
460.dialog-actions {
461 display: flex;
462 gap: 0.6rem;
463 justify-content: flex-end;
464 flex-wrap: wrap;
465}
466
467.dialog-actions--overwrite {
468 justify-content: space-between;
469}
470
471.dialog-actions button {
472 min-width: 5rem;
473}