simorocco02 commited on
Commit
3c41b72
·
verified ·
1 Parent(s): 542802a

come salvo il sito?

Browse files
Files changed (1) hide show
  1. index.html +29 -1
index.html CHANGED
@@ -260,7 +260,10 @@
260
  <h3 class="text-2xl font-bold mb-2">PromptGenius Wizard</h3>
261
  <p class="text-gray-300">Crafting perfect AI prompts since 2023</p>
262
  </div>
263
- <div class="flex space-x-8">
 
 
 
264
  <a href="#" class="text-gray-300 hover:text-white transition duration-300 hover:-translate-y-1 transform">
265
  <i data-feather="github" class="w-6 h-6 hover:text-purple-400"></i>
266
  </a>
@@ -418,6 +421,31 @@
418
  });
419
  }, 300);
420
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  </script>
422
  </body>
423
  </html>
 
260
  <h3 class="text-2xl font-bold mb-2">PromptGenius Wizard</h3>
261
  <p class="text-gray-300">Crafting perfect AI prompts since 2023</p>
262
  </div>
263
+ <div class="flex flex-col space-y-4 md:space-y-0 md:space-x-8">
264
+ <button onclick="saveSite()" class="text-gray-300 hover:text-white transition duration-300 hover:-translate-y-1 transform flex items-center">
265
+ <i data-feather="download" class="w-5 h-5 mr-2"></i> Save Site
266
+ </button>
267
  <a href="#" class="text-gray-300 hover:text-white transition duration-300 hover:-translate-y-1 transform">
268
  <i data-feather="github" class="w-6 h-6 hover:text-purple-400"></i>
269
  </a>
 
421
  });
422
  }, 300);
423
  }
424
+ // Save site functionality
425
+ function saveSite() {
426
+ const htmlContent = document.documentElement.outerHTML;
427
+ const blob = new Blob([htmlContent], { type: 'text/html' });
428
+ const url = URL.createObjectURL(blob);
429
+
430
+ const a = document.createElement('a');
431
+ a.href = url;
432
+ a.download = 'PromptGenius-Wizard.html';
433
+ document.body.appendChild(a);
434
+ a.click();
435
+ document.body.removeChild(a);
436
+ URL.revokeObjectURL(url);
437
+
438
+ // Show feedback
439
+ const originalBtn = event.target.closest('button');
440
+ const originalHTML = originalBtn.innerHTML;
441
+ originalBtn.innerHTML = '<i data-feather="check" class="w-5 h-5 mr-2"></i> Saved!';
442
+ feather.replace();
443
+
444
+ setTimeout(() => {
445
+ originalBtn.innerHTML = originalHTML;
446
+ feather.replace();
447
+ }, 2000);
448
+ }
449
  </script>
450
  </body>
451
  </html>