Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,641 @@ TEMPLATE = """
|
|
20 |
<title>HuggingFace Drive - {{ path or 'Root' }}</title>
|
21 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
22 |
<style>
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</head>
|
26 |
<body>
|
27 |
<!-- Upload Overlay -->
|
|
|
20 |
<title>HuggingFace Drive - {{ path or 'Root' }}</title>
|
21 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
22 |
<style>
|
23 |
+
/* Reset and Base Styles */
|
24 |
+
* {
|
25 |
+
margin: 0;
|
26 |
+
padding: 0;
|
27 |
+
box-sizing: border-box;
|
28 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
29 |
+
}
|
30 |
+
|
31 |
+
:root {
|
32 |
+
--bg: #0f172a;
|
33 |
+
--bg-secondary: #1e293b;
|
34 |
+
--bg-tertiary: #334155;
|
35 |
+
--text: #f1f5f9;
|
36 |
+
--text-muted: #94a3b8;
|
37 |
+
--primary: #3b82f6;
|
38 |
+
--primary-hover: #2563eb;
|
39 |
+
--success: #10b981;
|
40 |
+
--success-hover: #059669;
|
41 |
+
--danger: #ef4444;
|
42 |
+
--danger-hover: #dc2626;
|
43 |
+
--border: #475569;
|
44 |
+
--shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
45 |
+
--radius: 8px;
|
46 |
+
--transition: all 0.2s ease;
|
47 |
+
}
|
48 |
+
|
49 |
+
body {
|
50 |
+
background: var(--bg);
|
51 |
+
color: var(--text);
|
52 |
+
line-height: 1.5;
|
53 |
+
min-height: 100vh;
|
54 |
+
overflow-x: hidden;
|
55 |
+
}
|
56 |
+
|
57 |
+
/* Container */
|
58 |
+
.container {
|
59 |
+
max-width: 1400px;
|
60 |
+
margin: 0 auto;
|
61 |
+
padding: 1.5rem;
|
62 |
+
}
|
63 |
+
|
64 |
+
/* Header */
|
65 |
+
.header {
|
66 |
+
display: flex;
|
67 |
+
flex-wrap: wrap;
|
68 |
+
align-items: center;
|
69 |
+
justify-content: space-between;
|
70 |
+
gap: 1rem;
|
71 |
+
padding: 1.25rem;
|
72 |
+
background: var(--bg-secondary);
|
73 |
+
border-radius: var(--radius);
|
74 |
+
box-shadow: var(--shadow);
|
75 |
+
margin-bottom: 2rem;
|
76 |
+
backdrop-filter: blur(10px);
|
77 |
+
}
|
78 |
+
|
79 |
+
.title {
|
80 |
+
display: flex;
|
81 |
+
align-items: center;
|
82 |
+
gap: 0.75rem;
|
83 |
+
font-size: 1.75rem;
|
84 |
+
font-weight: 700;
|
85 |
+
color: var(--primary);
|
86 |
+
}
|
87 |
+
|
88 |
+
.title-icon {
|
89 |
+
width: 28px;
|
90 |
+
height: 28px;
|
91 |
+
transition: var(--transition);
|
92 |
+
}
|
93 |
+
|
94 |
+
.title:hover .title-icon {
|
95 |
+
transform: rotate(15deg) scale(1.15);
|
96 |
+
}
|
97 |
+
|
98 |
+
/* Breadcrumb */
|
99 |
+
.breadcrumb {
|
100 |
+
display: flex;
|
101 |
+
flex-wrap: wrap;
|
102 |
+
align-items: center;
|
103 |
+
gap: 0.5rem;
|
104 |
+
font-size: 0.95rem;
|
105 |
+
}
|
106 |
+
|
107 |
+
.breadcrumb-item {
|
108 |
+
display: flex;
|
109 |
+
align-items: center;
|
110 |
+
gap: 0.5rem;
|
111 |
+
padding: 0.5rem 1rem;
|
112 |
+
border-radius: 6px;
|
113 |
+
cursor: pointer;
|
114 |
+
color: var(--text-muted);
|
115 |
+
transition: var(--transition);
|
116 |
+
}
|
117 |
+
|
118 |
+
.breadcrumb-item:hover {
|
119 |
+
background: var(--bg-tertiary);
|
120 |
+
color: var(--text);
|
121 |
+
transform: translateY(-2px);
|
122 |
+
}
|
123 |
+
|
124 |
+
.breadcrumb-item.active {
|
125 |
+
color: var(--primary);
|
126 |
+
background: rgba(59, 130, 246, 0.15);
|
127 |
+
}
|
128 |
+
|
129 |
+
.breadcrumb-separator {
|
130 |
+
color: var(--text-muted);
|
131 |
+
user-select: none;
|
132 |
+
}
|
133 |
+
|
134 |
+
/* Actions */
|
135 |
+
.actions {
|
136 |
+
display: flex;
|
137 |
+
flex-wrap: wrap;
|
138 |
+
gap: 0.75rem;
|
139 |
+
}
|
140 |
+
|
141 |
+
.btn {
|
142 |
+
display: inline-flex;
|
143 |
+
align-items: center;
|
144 |
+
gap: 0.5rem;
|
145 |
+
padding: 0.75rem 1.5rem;
|
146 |
+
border: none;
|
147 |
+
border-radius: var(--radius);
|
148 |
+
font-size: 0.95rem;
|
149 |
+
font-weight: 500;
|
150 |
+
cursor: pointer;
|
151 |
+
transition: var(--transition);
|
152 |
+
text-decoration: none;
|
153 |
+
position: relative;
|
154 |
+
overflow: hidden;
|
155 |
+
}
|
156 |
+
|
157 |
+
.btn::before {
|
158 |
+
content: '';
|
159 |
+
position: absolute;
|
160 |
+
top: 0;
|
161 |
+
left: -100%;
|
162 |
+
width: 100%;
|
163 |
+
height: 100%;
|
164 |
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
165 |
+
transition: left 0.4s ease;
|
166 |
+
}
|
167 |
+
|
168 |
+
.btn:hover::before {
|
169 |
+
left: 100%;
|
170 |
+
}
|
171 |
+
|
172 |
+
.btn-primary {
|
173 |
+
background: var(--primary);
|
174 |
+
color: #fff;
|
175 |
+
}
|
176 |
+
|
177 |
+
.btn-primary:hover {
|
178 |
+
background: var(--primary-hover);
|
179 |
+
transform: translateY(-2px);
|
180 |
+
box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
|
181 |
+
}
|
182 |
+
|
183 |
+
.btn-secondary {
|
184 |
+
background: var(--bg-tertiary);
|
185 |
+
color: var(--text);
|
186 |
+
border: 1px solid var(--border);
|
187 |
+
}
|
188 |
+
|
189 |
+
.btn-secondary:hover {
|
190 |
+
background: var(--bg-secondary);
|
191 |
+
border-color: var(--primary);
|
192 |
+
transform: translateY(-2px);
|
193 |
+
}
|
194 |
+
|
195 |
+
.btn-success {
|
196 |
+
background: var(--success);
|
197 |
+
color: #fff;
|
198 |
+
}
|
199 |
+
|
200 |
+
.btn-success:hover {
|
201 |
+
background: var(--success-hover);
|
202 |
+
transform: translateY(-2px);
|
203 |
+
box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
|
204 |
+
}
|
205 |
+
|
206 |
+
.btn-danger {
|
207 |
+
background: var(--danger);
|
208 |
+
color: #fff;
|
209 |
+
}
|
210 |
+
|
211 |
+
.btn-danger:hover {
|
212 |
+
background: var(--danger-hover);
|
213 |
+
transform: translateY(-2px);
|
214 |
+
box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
|
215 |
+
}
|
216 |
+
|
217 |
+
.file-input-wrapper {
|
218 |
+
position: relative;
|
219 |
+
overflow: hidden;
|
220 |
+
display: inline-block;
|
221 |
+
}
|
222 |
+
|
223 |
+
.file-input {
|
224 |
+
position: absolute;
|
225 |
+
left: -9999px;
|
226 |
+
opacity: 0;
|
227 |
+
}
|
228 |
+
|
229 |
+
.icon {
|
230 |
+
width: 18px;
|
231 |
+
height: 18px;
|
232 |
+
flex-shrink: 0;
|
233 |
+
}
|
234 |
+
|
235 |
+
/* File Grid */
|
236 |
+
.file-grid {
|
237 |
+
display: grid;
|
238 |
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
239 |
+
gap: 1.25rem;
|
240 |
+
animation: fadeIn 0.5s ease;
|
241 |
+
}
|
242 |
+
|
243 |
+
.file-item {
|
244 |
+
background: var(--bg-secondary);
|
245 |
+
border-radius: var(--radius);
|
246 |
+
border: 1px solid var(--border);
|
247 |
+
transition: var(--transition);
|
248 |
+
position: relative;
|
249 |
+
overflow: hidden;
|
250 |
+
}
|
251 |
+
|
252 |
+
.file-item:hover {
|
253 |
+
transform: translateY(-4px);
|
254 |
+
box-shadow: var(--shadow);
|
255 |
+
border-color: var(--primary);
|
256 |
+
}
|
257 |
+
|
258 |
+
.file-item-content {
|
259 |
+
padding: 1.25rem;
|
260 |
+
display: flex;
|
261 |
+
align-items: center;
|
262 |
+
gap: 1rem;
|
263 |
+
cursor: pointer;
|
264 |
+
}
|
265 |
+
|
266 |
+
.file-info {
|
267 |
+
display: flex;
|
268 |
+
align-items: center;
|
269 |
+
gap: 1rem;
|
270 |
+
flex: 1;
|
271 |
+
}
|
272 |
+
|
273 |
+
.file-icon {
|
274 |
+
width: 48px;
|
275 |
+
height: 48px;
|
276 |
+
border-radius: 8px;
|
277 |
+
display: flex;
|
278 |
+
align-items: center;
|
279 |
+
justify-content: center;
|
280 |
+
transition: var(--transition);
|
281 |
+
}
|
282 |
+
|
283 |
+
.file-icon.dir {
|
284 |
+
background: rgba(59, 130, 246, 0.1);
|
285 |
+
color: var(--primary);
|
286 |
+
}
|
287 |
+
|
288 |
+
.file-icon.file {
|
289 |
+
background: rgba(16, 185, 129, 0.1);
|
290 |
+
color: var(--success);
|
291 |
+
}
|
292 |
+
|
293 |
+
.file-item:hover .file-icon {
|
294 |
+
transform: scale(1.1);
|
295 |
+
}
|
296 |
+
|
297 |
+
.file-details {
|
298 |
+
flex: 1;
|
299 |
+
}
|
300 |
+
|
301 |
+
.file-name {
|
302 |
+
font-weight: 500;
|
303 |
+
margin-bottom: 0.25rem;
|
304 |
+
word-break: break-word;
|
305 |
+
font-size: 1rem;
|
306 |
+
}
|
307 |
+
|
308 |
+
.file-meta {
|
309 |
+
font-size: 0.85rem;
|
310 |
+
color: var(--text-muted);
|
311 |
+
}
|
312 |
+
|
313 |
+
/* Dropdown */
|
314 |
+
.dropdown {
|
315 |
+
position: absolute;
|
316 |
+
top: 0.5rem;
|
317 |
+
right: 0.5rem;
|
318 |
+
}
|
319 |
+
|
320 |
+
.dropdown-toggle {
|
321 |
+
background: none;
|
322 |
+
border: none;
|
323 |
+
color: var(--text-muted);
|
324 |
+
cursor: pointer;
|
325 |
+
padding: 0.5rem;
|
326 |
+
border-radius: 6px;
|
327 |
+
transition: var(--transition);
|
328 |
+
}
|
329 |
+
|
330 |
+
.dropdown-toggle:hover {
|
331 |
+
background: var(--bg-tertiary);
|
332 |
+
color: var(--text);
|
333 |
+
}
|
334 |
+
|
335 |
+
.dropdown-menu {
|
336 |
+
position: absolute;
|
337 |
+
top: 100%;
|
338 |
+
right: 0;
|
339 |
+
background: var(--bg-secondary);
|
340 |
+
border: 1px solid var(--border);
|
341 |
+
border-radius: var(--radius);
|
342 |
+
box-shadow: var(--shadow);
|
343 |
+
min-width: 180px;
|
344 |
+
z-index: 1000;
|
345 |
+
opacity: 0;
|
346 |
+
visibility: hidden;
|
347 |
+
transform: translateY(-10px);
|
348 |
+
transition: var(--transition);
|
349 |
+
}
|
350 |
+
|
351 |
+
.dropdown.active .dropdown-menu {
|
352 |
+
opacity: 1;
|
353 |
+
visibility: visible;
|
354 |
+
transform: translateY(0);
|
355 |
+
}
|
356 |
+
|
357 |
+
.dropdown-item {
|
358 |
+
display: flex;
|
359 |
+
align-items: center;
|
360 |
+
gap: 0.5rem;
|
361 |
+
width: 100%;
|
362 |
+
padding: 0.75rem 1rem;
|
363 |
+
border: none;
|
364 |
+
background: none;
|
365 |
+
color: var(--text);
|
366 |
+
font-size: 0.9rem;
|
367 |
+
cursor: pointer;
|
368 |
+
transition: var(--transition);
|
369 |
+
text-align: left;
|
370 |
+
}
|
371 |
+
|
372 |
+
.dropdown-item:hover {
|
373 |
+
background: var(--bg-tertiary);
|
374 |
+
}
|
375 |
+
|
376 |
+
.dropdown-item.danger {
|
377 |
+
color: var(--danger);
|
378 |
+
}
|
379 |
+
|
380 |
+
.dropdown-item.danger:hover {
|
381 |
+
background: rgba(239, 68, 68, 0.1);
|
382 |
+
}
|
383 |
+
|
384 |
+
/* Empty State */
|
385 |
+
.empty-state {
|
386 |
+
text-align: center;
|
387 |
+
padding: 3rem 1rem;
|
388 |
+
color: var(--text-muted);
|
389 |
+
}
|
390 |
+
|
391 |
+
.empty-state .icon {
|
392 |
+
width: 72px;
|
393 |
+
height: 72px;
|
394 |
+
margin: 0 auto 1rem;
|
395 |
+
opacity: 0.6;
|
396 |
+
}
|
397 |
+
|
398 |
+
.empty-state h3 {
|
399 |
+
margin-bottom: 0.5rem;
|
400 |
+
color: var(--text);
|
401 |
+
font-size: 1.25rem;
|
402 |
+
}
|
403 |
+
|
404 |
+
/* Modals */
|
405 |
+
.modal-overlay {
|
406 |
+
position: fixed;
|
407 |
+
top: 0;
|
408 |
+
left: 0;
|
409 |
+
right: 0;
|
410 |
+
bottom: 0;
|
411 |
+
background: rgba(0, 0, 0, 0.75);
|
412 |
+
display: flex;
|
413 |
+
align-items: center;
|
414 |
+
justify-content: center;
|
415 |
+
z-index: 2000;
|
416 |
+
opacity: 0;
|
417 |
+
visibility: hidden;
|
418 |
+
transition: var(--transition);
|
419 |
+
backdrop-filter: blur(5px);
|
420 |
+
}
|
421 |
+
|
422 |
+
.modal-overlay.active {
|
423 |
+
opacity: 1;
|
424 |
+
visibility: visible;
|
425 |
+
}
|
426 |
+
|
427 |
+
.modal {
|
428 |
+
background: var(--bg-secondary);
|
429 |
+
border-radius: var(--radius);
|
430 |
+
box-shadow: var(--shadow);
|
431 |
+
width: 90%;
|
432 |
+
max-width: 450px;
|
433 |
+
max-height: 90vh;
|
434 |
+
overflow-y: auto;
|
435 |
+
transform: scale(0.95);
|
436 |
+
transition: var(--transition);
|
437 |
+
border: 1px solid var(--border);
|
438 |
+
}
|
439 |
+
|
440 |
+
.modal-overlay.active .modal {
|
441 |
+
transform: scale(1);
|
442 |
+
}
|
443 |
+
|
444 |
+
.modal-title {
|
445 |
+
padding: 1.5rem 1.5rem 0;
|
446 |
+
font-size: 1.3rem;
|
447 |
+
font-weight: 600;
|
448 |
+
}
|
449 |
+
|
450 |
+
.modal-body {
|
451 |
+
padding: 1.5rem;
|
452 |
+
}
|
453 |
+
|
454 |
+
.modal-input {
|
455 |
+
width: 100%;
|
456 |
+
padding: 0.75rem;
|
457 |
+
border: 1px solid var(--border);
|
458 |
+
border-radius: var(--radius);
|
459 |
+
background: var(--bg-tertiary);
|
460 |
+
color: var(--text);
|
461 |
+
font-size: 0.95rem;
|
462 |
+
transition: var(--transition);
|
463 |
+
}
|
464 |
+
|
465 |
+
.modal-input:focus {
|
466 |
+
outline: none;
|
467 |
+
border-color: var(--primary);
|
468 |
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
|
469 |
+
}
|
470 |
+
|
471 |
+
.modal-actions {
|
472 |
+
padding: 0 1.5rem 1.5rem;
|
473 |
+
display: flex;
|
474 |
+
gap: 0.75rem;
|
475 |
+
justify-content: flex-end;
|
476 |
+
}
|
477 |
+
|
478 |
+
/* Upload Overlay */
|
479 |
+
.upload-overlay {
|
480 |
+
position: fixed;
|
481 |
+
top: 0;
|
482 |
+
left: 0;
|
483 |
+
right: 0;
|
484 |
+
bottom: 0;
|
485 |
+
background: rgba(0, 0, 0, 0.85);
|
486 |
+
display: flex;
|
487 |
+
flex-direction: column;
|
488 |
+
align-items: center;
|
489 |
+
justify-content: center;
|
490 |
+
z-index: 3000;
|
491 |
+
opacity: 0;
|
492 |
+
visibility: hidden;
|
493 |
+
transition: var(--transition);
|
494 |
+
}
|
495 |
+
|
496 |
+
.upload-overlay.active {
|
497 |
+
opacity: 1;
|
498 |
+
visibility: visible;
|
499 |
+
}
|
500 |
+
|
501 |
+
.loading-spinner {
|
502 |
+
width: 48px;
|
503 |
+
height: 48px;
|
504 |
+
border: 4px solid var(--border);
|
505 |
+
border-top: 4px solid var(--primary);
|
506 |
+
border-radius: 50%;
|
507 |
+
animation: spin 1s linear infinite;
|
508 |
+
margin-bottom: 1rem;
|
509 |
+
}
|
510 |
+
|
511 |
+
.upload-text {
|
512 |
+
font-size: 1.2rem;
|
513 |
+
color: var(--text);
|
514 |
+
}
|
515 |
+
|
516 |
+
.btn .loading-spinner {
|
517 |
+
width: 20px;
|
518 |
+
height: 20px;
|
519 |
+
border-width: 3px;
|
520 |
+
margin: 0;
|
521 |
+
}
|
522 |
+
|
523 |
+
/* Animations */
|
524 |
+
@keyframes spin {
|
525 |
+
to {
|
526 |
+
transform: rotate(360deg);
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
@keyframes fadeIn {
|
531 |
+
from {
|
532 |
+
opacity: 0;
|
533 |
+
transform: translateY(20px);
|
534 |
+
}
|
535 |
+
to {
|
536 |
+
opacity: 1;
|
537 |
+
transform: translateY(0);
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
/* Scrollbar */
|
542 |
+
::-webkit-scrollbar {
|
543 |
+
width: 10px;
|
544 |
+
}
|
545 |
+
|
546 |
+
::-webkit-scrollbar-track {
|
547 |
+
background: var(--bg-tertiary);
|
548 |
+
}
|
549 |
+
|
550 |
+
::-webkit-scrollbar-thumb {
|
551 |
+
background: var(--border);
|
552 |
+
border-radius: 5px;
|
553 |
+
}
|
554 |
+
|
555 |
+
::-webkit-scrollbar-thumb:hover {
|
556 |
+
background: var(--text-muted);
|
557 |
+
}
|
558 |
+
|
559 |
+
/* Responsive Design */
|
560 |
+
@media (max-width: 1024px) {
|
561 |
+
.container {
|
562 |
+
padding: 1rem;
|
563 |
+
}
|
564 |
+
|
565 |
+
.header {
|
566 |
+
flex-direction: column;
|
567 |
+
align-items: flex-start;
|
568 |
+
gap: 1.5rem;
|
569 |
+
}
|
570 |
+
|
571 |
+
.title {
|
572 |
+
justify-content: center;
|
573 |
+
width: 100%;
|
574 |
+
}
|
575 |
+
|
576 |
+
.breadcrumb {
|
577 |
+
justify-content: center;
|
578 |
+
width: 100%;
|
579 |
+
}
|
580 |
+
|
581 |
+
.actions {
|
582 |
+
justify-content: center;
|
583 |
+
width: 100%;
|
584 |
+
}
|
585 |
+
|
586 |
+
.file-grid {
|
587 |
+
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
588 |
+
gap: 1rem;
|
589 |
+
}
|
590 |
+
}
|
591 |
+
|
592 |
+
@media (max-width: 768px) {
|
593 |
+
.file-grid {
|
594 |
+
grid-template-columns: 1fr;
|
595 |
+
}
|
596 |
+
|
597 |
+
.file-item-content {
|
598 |
+
padding: 1rem;
|
599 |
+
}
|
600 |
+
|
601 |
+
.file-icon {
|
602 |
+
width: 40px;
|
603 |
+
height: 40px;
|
604 |
+
}
|
605 |
+
|
606 |
+
.file-name {
|
607 |
+
font-size: 0.95rem;
|
608 |
+
}
|
609 |
+
|
610 |
+
.modal {
|
611 |
+
width: 95%;
|
612 |
+
margin: 1rem;
|
613 |
+
}
|
614 |
+
|
615 |
+
.modal-actions {
|
616 |
+
flex-direction: column;
|
617 |
+
}
|
618 |
+
|
619 |
+
.btn {
|
620 |
+
width: 100%;
|
621 |
+
justify-content: center;
|
622 |
+
}
|
623 |
+
}
|
624 |
+
|
625 |
+
@media (max-width: 480px) {
|
626 |
+
.title {
|
627 |
+
font-size: 1.5rem;
|
628 |
+
}
|
629 |
+
|
630 |
+
.breadcrumb-item {
|
631 |
+
padding: 0.5rem 0.75rem;
|
632 |
+
font-size: 0.9rem;
|
633 |
+
}
|
634 |
+
|
635 |
+
.file-icon {
|
636 |
+
width: 36px;
|
637 |
+
height: 36px;
|
638 |
+
}
|
639 |
+
|
640 |
+
.file-name {
|
641 |
+
font-size: 0.9rem;
|
642 |
+
}
|
643 |
+
|
644 |
+
.actions {
|
645 |
+
flex-direction: column;
|
646 |
+
}
|
647 |
+
}
|
648 |
+
|
649 |
+
/* Reduced Motion */
|
650 |
+
@media (prefers-reduced-motion: reduce) {
|
651 |
+
* {
|
652 |
+
animation-duration: 0.01ms !important;
|
653 |
+
transition-duration: 0.01ms !important;
|
654 |
+
}
|
655 |
+
}
|
656 |
+
|
657 |
+
</style>
|
658 |
</head>
|
659 |
<body>
|
660 |
<!-- Upload Overlay -->
|