GoGma commited on
Commit
eebe985
·
verified ·
1 Parent(s): 45c8d0a

🐳 22/02 - 12:18 - no funciona pero primero queiro que me arregles estee space para que funcione sin errores

Browse files
Files changed (2) hide show
  1. index.html +81 -27
  2. style.css +73 -18
index.html CHANGED
@@ -201,8 +201,14 @@
201
  </div>
202
 
203
  <script>
204
- // Initialize Lucide icons
205
- lucide.createIcons();
 
 
 
 
 
 
206
 
207
  // Sample data
208
  let files = [
@@ -254,23 +260,41 @@
254
  return colors[type] || 'bg-gray-100 text-gray-600';
255
  }
256
 
 
 
 
 
 
 
 
 
 
 
257
  function renderQuickAccess() {
258
  const container = document.getElementById('quickAccess');
 
 
259
  container.innerHTML = quickAccess.map(item => `
260
  <div class="bg-white p-4 rounded-2xl border border-gray-100 hover:shadow-md transition-all cursor-pointer group">
261
- <div class="w-12 h-12 ${item.color === 'blue' ? 'bg-blue-100 text-blue-600' : item.color === 'purple' ? 'bg-purple-100 text-purple-600' : item.color === 'pink' ? 'bg-pink-100 text-pink-600' : 'bg-orange-100 text-orange-600'} rounded-xl flex items-center justify-center mb-3 group-hover:scale-110 transition-transform">
262
  <i data-lucide="${item.icon}" class="w-6 h-6"></i>
263
  </div>
264
  <h3 class="font-medium text-gray-900 mb-1">${item.name}</h3>
265
  <p class="text-xs text-gray-500">${item.count} archivos</p>
266
  </div>
267
  `).join('');
268
- lucide.createIcons();
 
 
 
269
  }
270
 
271
  function renderFiles() {
272
  const container = document.getElementById('filesContainer');
273
- const searchTerm = document.getElementById('searchInput').value.toLowerCase();
 
 
 
274
  const filtered = files.filter(f => f.name.toLowerCase().includes(searchTerm));
275
 
276
  if (currentView === 'grid') {
@@ -310,13 +334,26 @@
310
  </div>
311
  `).join('');
312
  }
313
- lucide.createIcons();
 
 
 
314
  }
315
 
316
  function toggleView(view) {
317
  currentView = view;
318
- document.getElementById('gridBtn').className = view === 'grid' ? 'p-2 rounded-lg bg-blue-50 text-blue-600' : 'p-2 rounded-lg text-gray-400 hover:bg-gray-100';
319
- document.getElementById('listBtn').className = view === 'list' ? 'p-2 rounded-lg bg-blue-50 text-blue-600' : 'p-2 rounded-lg text-gray-400 hover:bg-gray-100';
 
 
 
 
 
 
 
 
 
 
320
  renderFiles();
321
  }
322
 
@@ -325,18 +362,22 @@
325
  }
326
 
327
  function triggerUpload() {
328
- document.getElementById('fileInput').click();
 
329
  }
330
 
331
  function handleFiles(selectedFiles) {
332
  const modal = document.getElementById('uploadModal');
333
  const list = document.getElementById('uploadList');
 
 
 
334
  modal.classList.remove('hidden');
335
 
336
  Array.from(selectedFiles).forEach(file => {
337
  const id = Date.now() + Math.random();
338
  const item = document.createElement('div');
339
- item.className = 'flex items-center gap-3';
340
  item.innerHTML = `
341
  <div class="w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
342
  <i data-lucide="file" class="w-4 h-4 text-blue-600"></i>
@@ -350,7 +391,10 @@
350
  <span class="text-xs text-gray-500" id="status-${id}">0%</span>
351
  `;
352
  list.appendChild(item);
353
- lucide.createIcons();
 
 
 
354
 
355
  // Simulate upload
356
  let progress = 0;
@@ -359,29 +403,35 @@
359
  if (progress >= 100) {
360
  progress = 100;
361
  clearInterval(interval);
362
- document.getElementById(`status-${id}`).textContent = '✓';
363
- document.getElementById(`status-${id}`).className = 'text-xs text-green-600 font-medium';
 
 
 
364
  setTimeout(() => {
365
  item.remove();
366
  if (list.children.length === 0) closeUploadModal();
367
  }, 1000);
368
  }
369
- document.getElementById(`progress-${id}`).style.width = progress + '%';
370
- document.getElementById(`status-${id}`).textContent = Math.floor(progress) + '%';
 
 
371
  }, 300);
372
  });
373
  }
374
 
375
  function closeUploadModal() {
376
- document.getElementById('uploadModal').classList.add('hidden');
 
377
  }
378
 
379
  function createFolder() {
380
  const name = prompt('Nombre de la nueva carpeta:');
381
- if (name) {
382
  files.unshift({
383
  id: Date.now(),
384
- name: name,
385
  type: 'folder',
386
  size: '0 archivos',
387
  date: new Date().toISOString().split('T')[0],
@@ -393,23 +443,27 @@
393
 
394
  function showSection(section) {
395
  // Visual feedback only for demo
396
- document.querySelectorAll('.nav-item').forEach(btn => {
 
397
  btn.classList.remove('bg-blue-50', 'text-blue-600');
398
  btn.classList.add('text-gray-600');
399
  });
400
- event.currentTarget.classList.remove('text-gray-600');
401
- event.currentTarget.classList.add('bg-blue-50', 'text-blue-600');
 
 
 
 
 
 
 
 
402
  }
403
 
404
  function toggleMenu(id) {
405
- // Context menu logic would go here
406
  console.log('Menu for file:', id);
407
  }
408
-
409
- // Initialize
410
- renderQuickAccess();
411
- renderFiles();
412
  </script>
413
- <script src="https://deepsite.hf.co/deepsite-badge.js"></script>
414
  </body>
415
  </html>
 
201
  </div>
202
 
203
  <script>
204
+ // Initialize Lucide icons when DOM is ready
205
+ document.addEventListener('DOMContentLoaded', function() {
206
+ if (typeof lucide !== 'undefined') {
207
+ lucide.createIcons();
208
+ }
209
+ renderQuickAccess();
210
+ renderFiles();
211
+ });
212
 
213
  // Sample data
214
  let files = [
 
260
  return colors[type] || 'bg-gray-100 text-gray-600';
261
  }
262
 
263
+ function getQuickAccessColor(color) {
264
+ const colorMap = {
265
+ blue: 'bg-blue-100 text-blue-600',
266
+ purple: 'bg-purple-100 text-purple-600',
267
+ pink: 'bg-pink-100 text-pink-600',
268
+ orange: 'bg-orange-100 text-orange-600'
269
+ };
270
+ return colorMap[color] || 'bg-gray-100 text-gray-600';
271
+ }
272
+
273
  function renderQuickAccess() {
274
  const container = document.getElementById('quickAccess');
275
+ if (!container) return;
276
+
277
  container.innerHTML = quickAccess.map(item => `
278
  <div class="bg-white p-4 rounded-2xl border border-gray-100 hover:shadow-md transition-all cursor-pointer group">
279
+ <div class="w-12 h-12 ${getQuickAccessColor(item.color)} rounded-xl flex items-center justify-center mb-3 group-hover:scale-110 transition-transform">
280
  <i data-lucide="${item.icon}" class="w-6 h-6"></i>
281
  </div>
282
  <h3 class="font-medium text-gray-900 mb-1">${item.name}</h3>
283
  <p class="text-xs text-gray-500">${item.count} archivos</p>
284
  </div>
285
  `).join('');
286
+
287
+ if (typeof lucide !== 'undefined') {
288
+ lucide.createIcons();
289
+ }
290
  }
291
 
292
  function renderFiles() {
293
  const container = document.getElementById('filesContainer');
294
+ if (!container) return;
295
+
296
+ const searchInput = document.getElementById('searchInput');
297
+ const searchTerm = searchInput ? searchInput.value.toLowerCase() : '';
298
  const filtered = files.filter(f => f.name.toLowerCase().includes(searchTerm));
299
 
300
  if (currentView === 'grid') {
 
334
  </div>
335
  `).join('');
336
  }
337
+
338
+ if (typeof lucide !== 'undefined') {
339
+ lucide.createIcons();
340
+ }
341
  }
342
 
343
  function toggleView(view) {
344
  currentView = view;
345
+ const gridBtn = document.getElementById('gridBtn');
346
+ const listBtn = document.getElementById('listBtn');
347
+
348
+ if (gridBtn && listBtn) {
349
+ if (view === 'grid') {
350
+ gridBtn.className = 'p-2 rounded-lg bg-blue-50 text-blue-600';
351
+ listBtn.className = 'p-2 rounded-lg text-gray-400 hover:bg-gray-100';
352
+ } else {
353
+ gridBtn.className = 'p-2 rounded-lg text-gray-400 hover:bg-gray-100';
354
+ listBtn.className = 'p-2 rounded-lg bg-blue-50 text-blue-600';
355
+ }
356
+ }
357
  renderFiles();
358
  }
359
 
 
362
  }
363
 
364
  function triggerUpload() {
365
+ const fileInput = document.getElementById('fileInput');
366
+ if (fileInput) fileInput.click();
367
  }
368
 
369
  function handleFiles(selectedFiles) {
370
  const modal = document.getElementById('uploadModal');
371
  const list = document.getElementById('uploadList');
372
+
373
+ if (!modal || !list) return;
374
+
375
  modal.classList.remove('hidden');
376
 
377
  Array.from(selectedFiles).forEach(file => {
378
  const id = Date.now() + Math.random();
379
  const item = document.createElement('div');
380
+ item.className = 'flex items-center gap-3 upload-item-' + id;
381
  item.innerHTML = `
382
  <div class="w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
383
  <i data-lucide="file" class="w-4 h-4 text-blue-600"></i>
 
391
  <span class="text-xs text-gray-500" id="status-${id}">0%</span>
392
  `;
393
  list.appendChild(item);
394
+
395
+ if (typeof lucide !== 'undefined') {
396
+ lucide.createIcons();
397
+ }
398
 
399
  // Simulate upload
400
  let progress = 0;
 
403
  if (progress >= 100) {
404
  progress = 100;
405
  clearInterval(interval);
406
+ const statusEl = document.getElementById(`status-${id}`);
407
+ if (statusEl) {
408
+ statusEl.textContent = '✓';
409
+ statusEl.className = 'text-xs text-green-600 font-medium';
410
+ }
411
  setTimeout(() => {
412
  item.remove();
413
  if (list.children.length === 0) closeUploadModal();
414
  }, 1000);
415
  }
416
+ const progressEl = document.getElementById(`progress-${id}`);
417
+ const statusEl = document.getElementById(`status-${id}`);
418
+ if (progressEl) progressEl.style.width = progress + '%';
419
+ if (statusEl) statusEl.textContent = Math.floor(progress) + '%';
420
  }, 300);
421
  });
422
  }
423
 
424
  function closeUploadModal() {
425
+ const modal = document.getElementById('uploadModal');
426
+ if (modal) modal.classList.add('hidden');
427
  }
428
 
429
  function createFolder() {
430
  const name = prompt('Nombre de la nueva carpeta:');
431
+ if (name && name.trim()) {
432
  files.unshift({
433
  id: Date.now(),
434
+ name: name.trim(),
435
  type: 'folder',
436
  size: '0 archivos',
437
  date: new Date().toISOString().split('T')[0],
 
443
 
444
  function showSection(section) {
445
  // Visual feedback only for demo
446
+ const buttons = document.querySelectorAll('.nav-item');
447
+ buttons.forEach(btn => {
448
  btn.classList.remove('bg-blue-50', 'text-blue-600');
449
  btn.classList.add('text-gray-600');
450
  });
451
+
452
+ // Get the clicked button from event
453
+ const clickedBtn = event ? event.currentTarget : null;
454
+ if (clickedBtn) {
455
+ clickedBtn.classList.remove('text-gray-600');
456
+ clickedBtn.classList.add('bg-blue-50', 'text-blue-600');
457
+ }
458
+
459
+ // Here you would typically load different content based on section
460
+ console.log('Section:', section);
461
  }
462
 
463
  function toggleMenu(id) {
464
+ // Context menu logic - prevent errors
465
  console.log('Menu for file:', id);
466
  }
 
 
 
 
467
  </script>
 
468
  </body>
469
  </html>
style.css CHANGED
@@ -1,28 +1,83 @@
 
 
 
 
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
 
 
28
  }
 
1
+ /* Sofia Cloud Custom Styles */
2
+ * {
3
+ margin: 0;
4
+ padding: 0;
5
+ box-sizing: border-box;
6
+ }
7
+
8
  body {
9
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
10
+ }
11
+
12
+ .glass {
13
+ background: rgba(255, 255, 255, 0.7);
14
+ backdrop-filter: blur(10px);
15
+ -webkit-backdrop-filter: blur(10px);
16
+ border: 1px solid rgba(255, 255, 255, 0.3);
17
+ }
18
+
19
+ .glass-dark {
20
+ background: rgba(17, 24, 39, 0.8);
21
+ backdrop-filter: blur(10px);
22
+ -webkit-backdrop-filter: blur(10px);
23
+ border: 1px solid rgba(255, 255, 255, 0.1);
24
+ }
25
+
26
+ .gradient-bg {
27
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
28
+ }
29
+
30
+ .file-card {
31
+ transition: all 0.3s ease;
32
+ }
33
+
34
+ .file-card:hover {
35
+ transform: translateY(-2px);
36
+ box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2);
37
+ }
38
+
39
+ .storage-bar {
40
+ background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
41
+ transition: width 0.3s ease;
42
+ }
43
+
44
+ @keyframes float {
45
+ 0%, 100% { transform: translateY(0px); }
46
+ 50% { transform: translateY(-10px); }
47
+ }
48
+
49
+ .floating {
50
+ animation: float 3s ease-in-out infinite;
51
+ }
52
+
53
+ /* Scrollbar styling */
54
+ ::-webkit-scrollbar {
55
+ width: 8px;
56
+ height: 8px;
57
  }
58
 
59
+ ::-webkit-scrollbar-track {
60
+ background: #f1f1f1;
61
+ border-radius: 4px;
62
  }
63
 
64
+ ::-webkit-scrollbar-thumb {
65
+ background: #c1c1c1;
66
+ border-radius: 4px;
 
 
67
  }
68
 
69
+ ::-webkit-scrollbar-thumb:hover {
70
+ background: #a8a8a8;
 
 
 
 
71
  }
72
 
73
+ /* Mobile menu animation */
74
+ @media (max-width: 768px) {
75
+ .mobile-menu {
76
+ transform: translateX(-100%);
77
+ transition: transform 0.3s ease-in-out;
78
+ }
79
+
80
+ .mobile-menu.open {
81
+ transform: translateX(0);
82
+ }
83
  }