BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

import project
timfa Tim Falken · pushed by timfa · 6 months ago
d3c0b911 History
style.css 11.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/* Drop overlay */
157#drop-overlay {
158 position: absolute; inset: 0;
159 background: rgba(91, 127, 255, 0.12);
160 border: 3px dashed var(--accent);
161 border-radius: var(--radius);
162 display: flex; align-items: center; justify-content: center;
163 z-index: 10;
164 font-size: 1.4rem;
165 color: var(--accent);
166 pointer-events: none;
167}
168
169/* When sidebar is open, shrink main content */
170#app.sidebar-open #main-content { margin-right: var(--sidebar-w); }
171
172/* =========================================================
173 FILE GRID
174 ========================================================= */
175#file-grid {
176 display: grid;
177 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
178 gap: 0.75rem;
179}
180
181.file-item {
182 display: flex; flex-direction: column; align-items: center;
183 padding: 0.9rem 0.5rem 0.7rem;
184 border-radius: var(--radius);
185 border: 1px solid transparent;
186 cursor: pointer;
187 user-select: none;
188 transition: background var(--transition), border-color var(--transition);
189 text-align: center;
190 gap: 0.4rem;
191 position: relative;
192}
193.file-item:hover { background: var(--surface); border-color: var(--border); }
194.file-item.selected { background: var(--surface2); border-color: var(--accent); }
195
196.file-item .icon {
197 width: 52px; height: 52px;
198 display: flex; align-items: center; justify-content: center;
199}
200.file-item .icon svg { width: 100%; height: 100%; }
201
202.file-item .name {
203 font-size: 0.8rem;
204 word-break: break-all;
205 max-width: 100%;
206 line-height: 1.3;
207 color: var(--text);
208}
209
210/* =========================================================
211 SIDEBAR
212 ========================================================= */
213#sidebar {
214 position: fixed;
215 top: var(--topbar-h);
216 right: 0;
217 bottom: 0;
218 width: var(--sidebar-w);
219 background: var(--surface);
220 border-left: 1px solid var(--border);
221 padding: 1.25rem;
222 overflow-y: auto;
223 z-index: 20;
224 display: flex; flex-direction: column; gap: 0.75rem;
225}
226
227#sidebar-close {
228 background: none; color: var(--text-muted);
229 align-self: flex-end; font-size: 1.1rem; padding: 0.2rem 0.5rem;
230}
231#sidebar-close:hover { color: var(--text); }
232
233#sidebar-icon { display: flex; justify-content: center; }
234#sidebar-icon svg { width: 64px; height: 64px; }
235
236#sidebar-name {
237 font-size: 1rem;
238 word-break: break-all;
239 text-align: center;
240}
241
242#sidebar-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.75rem; }
243#sidebar-meta dt { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }
244#sidebar-meta dd { font-size: 0.8rem; word-break: break-all; }
245
246#sidebar-actions {
247 display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem;
248}
249
250#sidebar-actions button {
251 background: var(--surface2); color: var(--text);
252 padding: 0.5rem 0.8rem;
253 text-align: left;
254}
255#sidebar-actions button:hover { background: var(--border); }
256#sidebar-actions button.danger { color: var(--danger); }
257
258/* =========================================================
259 MODALS
260 ========================================================= */
261.modal-overlay {
262 position: fixed; inset: 0;
263 background: rgba(0,0,0,0.65);
264 display: flex; align-items: center; justify-content: center;
265 z-index: 50;
266}
267
268.modal {
269 background: var(--surface);
270 border: 1px solid var(--border);
271 border-radius: var(--radius);
272 padding: 2rem;
273 width: min(560px, 94vw);
274 max-height: 90vh;
275 overflow-y: auto;
276 position: relative;
277}
278.modal.small { width: min(340px, 94vw); }
279
280.modal h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
281.modal h3 { font-size: 1rem; color: var(--text-muted); margin: 1rem 0 0.5rem; }
282
283.modal-close {
284 position: absolute; top: 0.75rem; right: 0.75rem;
285 background: none; color: var(--text-muted); font-size: 1.1rem; padding: 0.25rem 0.5rem;
286}
287.modal-close:hover { color: var(--text); }
288
289/* Admin path list */
290.path-row {
291 display: flex; align-items: center; gap: 0.5rem;
292 padding: 0.4rem 0;
293 border-bottom: 1px solid var(--border);
294 font-size: 0.88rem;
295}
296.path-row span { flex: 1; word-break: break-all; }
297.path-row button { background: none; color: var(--danger); padding: 0.2rem 0.5rem; }
298
299.path-add-row { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
300.path-add-row input {
301 flex: 1; background: var(--bg); border: 1px solid var(--border);
302 border-radius: 6px; padding: 0.45rem 0.7rem; color: var(--text);
303 font-size: 0.9rem; outline: none;
304}
305.path-add-row input:focus { border-color: var(--accent); }
306.path-add-row button {
307 background: var(--surface2); color: var(--text); padding: 0.45rem 0.9rem;
308}
309.path-add-row button:hover { background: var(--border); }
310
311/* User list */
312.user-row {
313 display: flex; align-items: center; gap: 0.6rem;
314 padding: 0.5rem 0;
315 border-bottom: 1px solid var(--border);
316}
317.user-row .user-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
318.user-row .user-admin-badge {
319 font-size: 0.72rem; background: var(--accent); color: #fff;
320 border-radius: 4px; padding: 0.1rem 0.4rem;
321}
322.user-row button { background: none; color: var(--text-muted); padding: 0.2rem 0.5rem; font-size: 0.85rem; }
323.user-row button:hover { color: var(--text); }
324.user-row button.danger { color: var(--danger); }
325
326/* User form permissions */
327#user-permissions { margin-top: 0.75rem; }
328#user-permissions h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }
329.perm-row {
330 display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
331 font-size: 0.85rem; margin-bottom: 0.4rem;
332}
333.perm-row .perm-label { min-width: 130px; color: var(--text); }
334.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 0.5rem; }
335.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
336
337/* Form labels in modals */
338.modal form label {
339 display: flex; flex-direction: column; gap: 0.3rem;
340 font-size: 0.85rem; color: var(--text-muted);
341 margin-bottom: 0.9rem;
342}
343.modal form input[type="text"],
344.modal form input[type="password"] {
345 background: var(--bg); border: 1px solid var(--border);
346 border-radius: 6px; padding: 0.5rem 0.75rem;
347 color: var(--text); font-size: 0.95rem; outline: none;
348 transition: border-color var(--transition);
349}
350.modal form input:focus { border-color: var(--accent); }
351
352/* =========================================================
353 TOAST
354 ========================================================= */
355#toast {
356 position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
357 z-index: 200;
358 display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
359 pointer-events: none;
360}
361
362.toast-msg {
363 background: var(--surface2);
364 border: 1px solid var(--border);
365 border-radius: 8px;
366 padding: 0.6rem 1.25rem;
367 font-size: 0.9rem;
368 animation: slideup 0.25s ease;
369}
370.toast-msg.err { border-color: var(--danger); color: var(--danger); }
371.toast-msg.ok { border-color: var(--success); color: var(--success); }
372
373@keyframes slideup {
374 from { opacity: 0; transform: translateY(12px); }
375 to { opacity: 1; transform: translateY(0); }
376}
377
378/* =========================================================
379 UPLOAD PROGRESS
380 ========================================================= */
381.upload-bar-wrap {
382 position: fixed; bottom: 0; left: 0; right: 0;
383 background: var(--surface);
384 border-top: 1px solid var(--border);
385 padding: 0.5rem 1rem;
386 z-index: 80;
387 font-size: 0.85rem;
388}
389.upload-bar-track {
390 height: 6px; background: var(--border); border-radius: 3px; margin-top: 0.3rem;
391}
392.upload-bar-fill {
393 height: 100%; background: var(--accent); border-radius: 3px;
394 transition: width 0.2s linear;
395}
396
397/* =========================================================
398 RESPONSIVE — narrow screens
399 ========================================================= */
400@media (max-width: 600px) {
401 #file-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
402
403 #app.sidebar-open #main-content { margin-right: 0; }
404
405 #sidebar {
406 top: auto;
407 left: 0;
408 height: 60vh;
409 border-left: none;
410 border-top: 1px solid var(--border);
411 width: 100%;
412 }
413
414 .modal { padding: 1.25rem; }
415}