undefined / index.html
Ramy7777's picture
<script>
492dffe verified
Raw History Blame Contribute Delete
7.14 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Loading Elegance</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>
.page {
display: none;
}
.active {
display: block;
}
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.progress-container {
height: 6px;
background-color: #e2e8f0;
border-radius: 3px;
overflow: hidden;
}
.progress-bar {
height: 100%;
background: linear-gradient(90deg, #4f46e5 0%, #a855f7 100%);
transition: width 0.75s ease;
}
</style>
</head>
<body class="min-h-screen font-sans antialiased text-gray-800 gradient-bg">
<div class="container mx-auto px-4 py-16 flex flex-col items-center justify-center min-h-screen">
<!-- Page 1 - Loading Screen -->
<div id="page1" class="page active w-full max-w-md bg-white rounded-xl shadow-2xl p-8 text-center">
<div class="mb-8">
<i data-feather="loader" class="w-16 h-16 text-indigo-600 mx-auto animate-spin"></i>
</div>
<h1 class="text-3xl font-bold text-gray-800 mb-2">Loading Your Experience</h1>
<p class="text-gray-600 mb-6">Please wait while we prepare everything for you</p>
<div class="progress-container w-full mb-4">
<div id="progressBar" class="progress-bar" style="width: 0%"></div>
</div>
<p id="percentText" class="text-sm font-medium text-indigo-600">0%</p>
</div>
<!-- Page 2 - ID Input -->
<div id="page2" class="page w-full max-w-md bg-white rounded-xl shadow-2xl p-8">
<div class="mb-6 text-center">
<i data-feather="user" class="w-12 h-12 text-indigo-600 mx-auto"></i>
<h2 class="text-2xl font-bold text-gray-800 mt-4">Enter Your ID</h2>
<p class="text-gray-600 mt-2">We need your ID to proceed</p>
</div>
<div class="mb-6">
<input id="userId" type="text" placeholder="User ID"
class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none transition">
</div>
<button onclick="goToPage3()"
class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-4 rounded-lg transition duration-300 transform hover:scale-105">
Continue
</button>
</div>
<!-- Page 3 - File Upload -->
<div id="page3" class="page w-full max-w-md bg-white rounded-xl shadow-2xl p-8">
<div class="mb-6 text-center">
<i data-feather="upload" class="w-12 h-12 text-indigo-600 mx-auto"></i>
<h2 class="text-2xl font-bold text-gray-800 mt-4">Upload Documents</h2>
<p id="page3Msg" class="text-gray-600 mt-2">Please upload both required images</p>
</div>
<div class="space-y-4 mb-6">
<div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:bg-gray-50 transition">
<label for="img1" class="block">
<i data-feather="image" class="w-8 h-8 text-indigo-500 mx-auto mb-2"></i>
<p class="text-sm text-gray-600">Front Side Image</p>
<input id="img1" type="file" class="hidden" accept="image/*">
</label>
</div>
<div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center cursor-pointer hover:bg-gray-50 transition">
<label for="img2" class="block">
<i data-feather="image" class="w-8 h-8 text-indigo-500 mx-auto mb-2"></i>
<p class="text-sm text-gray-600">Back Side Image</p>
<input id="img2" type="file" class="hidden" accept="image/*">
</label>
</div>
</div>
<button onclick="finishUpload()"
class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-4 rounded-lg transition duration-300 transform hover:scale-105">
Finish Upload
</button>
</div>
<!-- Success Alert (hidden by default) -->
<div id="depositAlert" class="fixed top-4 right-4 hidden max-w-sm w-full">
<div class="bg-green-50 border-l-4 border-green-500 p-4 rounded-lg shadow-lg">
<div class="flex">
<div class="flex-shrink-0">
<i data-feather="check-circle" class="h-5 w-5 text-green-500"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-green-800">
Your documents have been successfully uploaded!
</p>
</div>
</div>
</div>
</div>
</div>
<script>
// 15 second loading simulation
let progress = 0;
let bar = document.getElementById("progressBar");
let percentText = document.getElementById("percentText");
let interval = setInterval(() => {
progress += 5;
bar.style.width = progress + "%";
percentText.textContent = progress + "%";
if (progress >= 100) {
clearInterval(interval);
document.getElementById("page1").classList.remove("active");
document.getElementById("page2").classList.add("active");
}
}, 750);
function goToPage3() {
let id = document.getElementById("userId").value.trim();
if (!id) {
alert("من فضلك أدخل ID");
return;
}
document.getElementById("page2").classList.remove("active");
document.getElementById("page3").classList.add("active");
}
function finishUpload() {
let img1 = document.getElementById("img1").files.length;
let img2 = document.getElementById("img2").files.length;
if (img1 > 0 && img2 > 0) {
document.getElementById("page3").classList.remove("active");
document.getElementById("page1").classList.add("active");
document.getElementById("depositAlert").style.display = "block";
} else {
document.getElementById("page3Msg").textContent = "⚠️ يجب رفع صورتين أولاً";
}
}
</body>
</html>