| <!DOCTYPE html> |
| <html lang="en" dir="rtl"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Data Collection Form</title> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <script src="https://unpkg.com/feather-icons"></script> |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> |
| <style> |
| @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap'); |
| body { |
| font-family: 'Tajawal', sans-serif; |
| } |
| .form-input { |
| transition: all 0.3s ease; |
| } |
| .form-input:focus { |
| box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3); |
| } |
| </style> |
| </head> |
| <body class="bg-gray-50 min-h-screen"> |
| <div class="max-w-md mx-auto p-6"> |
| <div class="bg-white rounded-xl shadow-lg overflow-hidden mb-8 transition-all duration-300 hover:shadow-xl"> |
| <div class="bg-gradient-to-r from-indigo-500 to-purple-600 p-6 text-white"> |
| <div class="flex items-center justify-between"> |
| <div> |
| <h1 class="text-2xl font-bold">نموذج جمع البيانات</h1> |
| <p class="opacity-90">أدخل معلوماتك وسيتم إرسالها إلى البريد الإلكتروني</p> |
| </div> |
| <i data-feather="mail" class="w-10 h-10"></i> |
| </div> |
| </div> |
|
|
| <form id="dataForm" class="p-6 space-y-4"> |
| <div> |
| <label for="name" class="block text-sm font-medium text-gray-700 mb-1">الاسم الكامل</label> |
| <input type="text" id="name" name="name" required |
| class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 text-right"> |
| </div> |
|
|
| <div> |
| <label for="email" class="block text-sm font-medium text-gray-700 mb-1">البريد الإلكتروني</label> |
| <input type="email" id="email" name="email" required |
| class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 text-right"> |
| </div> |
|
|
| <div> |
| <label for="phone" class="block text-sm font-medium text-gray-700 mb-1">رقم الهاتف</label> |
| <input type="tel" id="phone" name="phone" |
| class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 text-right"> |
| </div> |
|
|
| <div> |
| <label for="message" class="block text-sm font-medium text-gray-700 mb-1">الرسالة</label> |
| <textarea id="message" name="message" rows="4" |
| class="form-input w-full px-4 py-2 border border-gray-300 rounded-lg focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 text-right"></textarea> |
| </div> |
|
|
| <div class="flex items-center justify-between pt-2"> |
| <button type="submit" class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-lg font-medium transition-colors duration-300 flex items-center"> |
| <span>إرسال</span> |
| <i data-feather="send" class="mr-2 w-4 h-4"></i> |
| </button> |
| </div> |
| </form> |
| </div> |
|
|
| <div id="successMessage" class="hidden bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded-lg relative"> |
| <span class="absolute top-0 bottom-0 right-0 px-4 py-3"> |
| <i data-feather="check-circle" class="h-6 w-6 text-green-500"></i> |
| </span> |
| <div class="pr-8"> |
| <strong class="font-bold">تم الإرسال بنجاح!</strong> |
| <span class="block sm:inline">سيتم إرسال البيانات إلى mohammedzzkri@gmail.com</span> |
| </div> |
| </div> |
| </div> |
|
|
| <script> |
| feather.replace(); |
| |
| document.getElementById('dataForm').addEventListener('submit', function(e) { |
| e.preventDefault(); |
| |
| |
| setTimeout(() => { |
| document.getElementById('successMessage').classList.remove('hidden'); |
| document.getElementById('dataForm').reset(); |
| |
| setTimeout(() => { |
| document.getElementById('successMessage').classList.add('hidden'); |
| }, 5000); |
| }, 1000); |
| }); |
| </script> |
| </body> |
| </html> |
|
|