Add 3 files
Browse filesFiles changed (3)
- README.md+7-5
- index.html+314-19
- prompts.txtAdded+1
123452345678910111012---title: Siteemoji: 📊colorFrom: redcolorTo: bluetitle: siteemoji: 🐳colorFrom: yellowcolorTo: yellowsdk: staticpinned: falsetags: - deepsite---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-referenceCheck out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>User Registration Portal</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> .animate-fade-in { animation: fadeIn 0.5s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .input-highlight:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); } </style></head><body class="bg-gradient-to-br from-blue-50 to-indigo-100 min-h-screen"> <div class="container mx-auto px-4 py-12"> <!-- Header --> <header class="text-center mb-12 animate-fade-in"> <h1 class="text-4xl font-bold text-indigo-800 mb-2">User Registration</h1> <p class="text-lg text-gray-600 max-w-2xl mx-auto">Join our community by filling out this simple form. We'll keep your information secure.</p> </header>
<!-- Main Content --> <div class="flex flex-col lg:flex-row gap-8 items-center justify-center"> <!-- Illustration --> <div class="hidden lg:block lg:w-1/2 animate-fade-in"> <div class="bg-indigo-100 rounded-2xl p-8"> <img src="https://illustrations.popsy.co/amber/secure-login.svg" alt="Registration illustration" class="w-full h-auto"> <div class="mt-6"> <h3 class="text-xl font-semibold text-indigo-800 mb-2">Why Register With Us?</h3> <ul class="space-y-2 text-gray-700"> <li class="flex items-start"> <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i> <span>Secure data storage</span> </li> <li class="flex items-start"> <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i> <span>Exclusive member benefits</span> </li> <li class="flex items-start"> <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i> <span>Personalized experience</span> </li> </ul> </div> </div> </div>
<!-- Registration Form --> <div class="w-full lg:w-1/2 animate-fade-in"> <div class="bg-white rounded-2xl shadow-xl overflow-hidden"> <div class="p-8"> <form id="registrationForm" class="space-y-6"> <!-- Name Field --> <div> <label for="name" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label> <div class="relative"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <i class="fas fa-user text-gray-400"></i> </div> <input type="text" id="name" name="name" required class="input-highlight pl-10 w-full px-4 py-3 rounded-lg border border-gray-300 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 transition duration-200" placeholder="John Doe"> </div> </div>
<!-- Email Field --> <div> <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email Address</label> <div class="relative"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <i class="fas fa-envelope text-gray-400"></i> </div> <input type="email" id="email" name="email" required class="input-highlight pl-10 w-full px-4 py-3 rounded-lg border border-gray-300 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 transition duration-200" placeholder="your@email.com"> </div> </div>
<!-- Phone Field --> <div> <label for="phone" class="block text-sm font-medium text-gray-700 mb-1">Phone Number</label> <div class="relative"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <i class="fas fa-phone text-gray-400"></i> </div> <input type="tel" id="phone" name="phone" class="input-highlight pl-10 w-full px-4 py-3 rounded-lg border border-gray-300 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 transition duration-200" placeholder="+1 (123) 456-7890"> </div> </div>
<!-- Age Field --> <div> <label for="age" class="block text-sm font-medium text-gray-700 mb-1">Age</label> <div class="relative"> <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> <i class="fas fa-birthday-cake text-gray-400"></i> </div> <input type="number" id="age" name="age" min="13" max="120" class="input-highlight pl-10 w-full px-4 py-3 rounded-lg border border-gray-300 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 transition duration-200" placeholder="Your age"> </div> </div>
<!-- Gender Field --> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Gender</label> <div class="grid grid-cols-3 gap-3"> <div> <input type="radio" id="male" name="gender" value="Male" class="hidden peer"> <label for="male" class="flex items-center justify-center px-4 py-3 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200"> <i class="fas fa-mars mr-2"></i> Male </label> </div> <div> <input type="radio" id="female" name="gender" value="Female" class="hidden peer"> <label for="female" class="flex items-center justify-center px-4 py-3 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200"> <i class="fas fa-venus mr-2"></i> Female </label> </div> <div> <input type="radio" id="other" name="gender" value="Other" class="hidden peer"> <label for="other" class="flex items-center justify-center px-4 py-3 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200"> <i class="fas fa-genderless mr-2"></i> Other </label> </div> </div> </div>
<!-- Interests Field --> <div> <label class="block text-sm font-medium text-gray-700 mb-1">Interests (Select up to 3)</label> <div class="grid grid-cols-2 md:grid-cols-3 gap-2"> <div> <input type="checkbox" id="tech" name="interests" value="Technology" class="hidden peer"> <label for="tech" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-laptop-code mr-2"></i> Technology </label> </div> <div> <input type="checkbox" id="sports" name="interests" value="Sports" class="hidden peer"> <label for="sports" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-running mr-2"></i> Sports </label> </div> <div> <input type="checkbox" id="music" name="interests" value="Music" class="hidden peer"> <label for="music" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-music mr-2"></i> Music </label> </div> <div> <input type="checkbox" id="travel" name="interests" value="Travel" class="hidden peer"> <label for="travel" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-plane mr-2"></i> Travel </label> </div> <div> <input type="checkbox" id="food" name="interests" value="Food" class="hidden peer"> <label for="food" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-utensils mr-2"></i> Food </label> </div> <div> <input type="checkbox" id="art" name="interests" value="Art" class="hidden peer"> <label for="art" class="flex items-center justify-center px-3 py-2 border border-gray-300 rounded-lg cursor-pointer peer-checked:border-indigo-500 peer-checked:bg-indigo-50 peer-checked:text-indigo-700 transition duration-200 text-sm"> <i class="fas fa-paint-brush mr-2"></i> Art </label> </div> </div> </div>
<!-- Terms and Conditions --> <div class="flex items-start"> <div class="flex items-center h-5"> <input id="terms" name="terms" type="checkbox" required class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"> </div> <div class="ml-3 text-sm"> <label for="terms" class="font-medium text-gray-700">I agree to the <a href="#" class="text-indigo-600 hover:text-indigo-500">Terms and Conditions</a> and <a href="#" class="text-indigo-600 hover:text-indigo-500">Privacy Policy</a></label> </div> </div>
<!-- Submit Button --> <div> <button type="submit" id="submitBtn" class="w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-lg shadow-sm text-lg font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition duration-200"> <span id="buttonText">Complete Registration</span> <i id="spinner" class="fas fa-spinner fa-spin ml-2 hidden"></i> </button> </div> </form> </div> </div> </div> </div>
<!-- Success Modal (hidden by default) --> <div id="successModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> <div class="bg-white rounded-2xl p-8 max-w-md w-full mx-4 transform transition-all duration-300 scale-95 opacity-0" id="modalContent"> <div class="text-center"> <div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-green-100 mb-4"> <i class="fas fa-check text-green-600 text-2xl"></i> </div> <h3 class="text-2xl font-bold text-gray-900 mb-2">Registration Successful!</h3> <p class="text-gray-600 mb-6">Thank you for registering. We've sent a confirmation email to your address.</p> <button id="closeModal" class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-200"> Close </button> </div> </div> </div> </div>
<script> // Google Apps Script Deployment URL const scriptURL = https://script.google.com/macros/s/AKfycbz-DJnONERnAkU91_5_hTaC1V9Wu8TsFeSp-hWntjXY4irSO3nkZJhaHcuoWSFKIWZk/exec;
document.addEventListener('DOMContentLoaded', function() { const form = document.getElementById('registrationForm'); const submitBtn = document.getElementById('submitBtn'); const buttonText = document.getElementById('buttonText'); const spinner = document.getElementById('spinner'); const successModal = document.getElementById('successModal'); const modalContent = document.getElementById('modalContent'); const closeModal = document.getElementById('closeModal');
// Limit interests selection to 3 const interestCheckboxes = document.querySelectorAll('input[name="interests"]'); interestCheckboxes.forEach(checkbox => { checkbox.addEventListener('change', function() { const checkedCount = document.querySelectorAll('input[name="interests"]:checked').length; if (checkedCount > 3) { this.checked = false; alert('You can select up to 3 interests only.'); } }); });
// Form submission form.addEventListener('submit', async (e) => { e.preventDefault(); // Show loading state submitBtn.disabled = true; buttonText.textContent = 'Processing...'; spinner.classList.remove('hidden'); try { // Get form data const formData = new FormData(form); const data = { name: formData.get('name'), email: formData.get('email'), phone: formData.get('phone'), age: formData.get('age'), gender: form.querySelector('input[name="gender"]:checked')?.value || '', interests: Array.from(document.querySelectorAll('input[name="interests"]:checked')).map(el => el.value).join(', '), timestamp: new Date().toISOString() };
// Send data to Google Sheets via Apps Script const response = await fetch(scriptURL, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(data) });
if (response.ok) { // Show success modal successModal.classList.remove('hidden'); setTimeout(() => { modalContent.classList.add('scale-100', 'opacity-100'); modalContent.classList.remove('scale-95', 'opacity-0'); }, 50); // Reset form form.reset(); } else { throw new Error('Network response was not ok'); } } catch (error) { console.error('Error:', error); alert('There was an error submitting the form. Please try again.'); } finally { // Reset button state submitBtn.disabled = false; buttonText.textContent = 'Complete Registration'; spinner.classList.add('hidden'); } });
// Close modal closeModal.addEventListener('click', function() { modalContent.classList.remove('scale-100', 'opacity-100'); modalContent.classList.add('scale-95', 'opacity-0'); setTimeout(() => { successModal.classList.add('hidden'); }, 300); }); }); </script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=G3Player/site" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>1make a website that registers people and stores people's information in a google spreadsheetREADME.md+7-5
index.html+314-19
prompts.txtAdded+1