Spaces:
Running
Running
File size: 35,623 Bytes
fd124c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MXPay Crypto Exchange</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>
/* Custom styles */
.gradient-bg {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}
.kyc-step {
display: none;
}
.kyc-step.active {
display: block;
animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.file-upload {
border: 2px dashed #cbd5e0;
transition: all 0.3s ease;
}
.file-upload:hover {
border-color: #3b82f6;
}
.file-upload.dragover {
border-color: #3b82f6;
background-color: #ebf5ff;
}
</style>
</head>
<body class="bg-gray-100 font-sans">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-coins text-2xl text-yellow-400"></i>
<h1 class="text-2xl font-bold">MXPay</h1>
</div>
<nav class="hidden md:flex space-x-6">
<a href="#" class="hover:text-blue-200 transition">Markets</a>
<a href="#" class="hover:text-blue-200 transition">Trade</a>
<a href="#" class="hover:text-blue-200 transition">Futures</a>
<a href="#" class="hover:text-blue-200 transition">Earn</a>
<a href="#" class="hover:text-blue-200 transition">Wallet</a>
</nav>
<div class="flex items-center space-x-4">
<button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-md transition">Login</button>
<button class="px-4 py-2 bg-white text-blue-600 hover:bg-gray-100 rounded-md transition">Register</button>
<button class="md:hidden text-xl">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Dashboard Section -->
<section class="bg-white rounded-lg shadow-md p-6 mb-8">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
<div>
<h2 class="text-2xl font-bold text-gray-800">Welcome back, <span id="username" class="text-blue-600">User</span></h2>
<p class="text-gray-600">Your crypto journey starts here</p>
</div>
<div class="mt-4 md:mt-0 flex space-x-4">
<button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition">
<i class="fas fa-wallet mr-2"></i> Deposit
</button>
<button class="px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition">
<i class="fas fa-exchange-alt mr-2"></i> Trade
</button>
</div>
</div>
<!-- Balance Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-blue-50 p-4 rounded-lg border border-blue-100">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-600">Total Balance</p>
<h3 class="text-2xl font-bold">$0.00</h3>
</div>
<i class="fas fa-wallet text-3xl text-blue-500"></i>
</div>
</div>
<div class="bg-green-50 p-4 rounded-lg border border-green-100">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-600">Available</p>
<h3 class="text-2xl font-bold">$0.00</h3>
</div>
<i class="fas fa-coins text-3xl text-green-500"></i>
</div>
</div>
<div class="bg-purple-50 p-4 rounded-lg border border-purple-100">
<div class="flex justify-between items-center">
<div>
<p class="text-gray-600">In Orders</p>
<h3 class="text-2xl font-bold">$0.00</h3>
</div>
<i class="fas fa-exchange-alt text-3xl text-purple-500"></i>
</div>
</div>
</div>
<!-- Tabs Navigation -->
<div class="border-b border-gray-200 mb-6">
<nav class="flex space-x-8">
<button data-tab="assets" class="tab-button py-2 px-1 border-b-2 font-medium text-sm border-blue-500 text-blue-600">Assets</button>
<button data-tab="transactions" class="tab-button py-2 px-1 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">Transactions</button>
<button data-tab="history" class="tab-button py-2 px-1 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">History</button>
<button data-tab="kyc" class="tab-button py-2 px-1 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">KYC Verification</button>
</nav>
</div>
<!-- Tab Contents -->
<div id="assets" class="tab-content">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Asset</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Price</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Value</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Action</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<i class="fab fa-bitcoin text-yellow-500 text-2xl"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Bitcoin</div>
<div class="text-sm text-gray-500">BTC</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">0.00000000</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">$0.00</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">$0.00</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="text-blue-600 hover:text-blue-900 text-sm font-medium">Trade</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<i class="fab fa-ethereum text-purple-500 text-2xl"></i>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Ethereum</div>
<div class="text-sm text-gray-500">ETH</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">0.00000000</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">$0.00</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">$0.00</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<button class="text-blue-600 hover:text-blue-900 text-sm font-medium">Trade</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="transactions" class="tab-content hidden">
<div class="text-center py-12">
<i class="fas fa-exchange-alt text-4xl text-gray-300 mb-4"></i>
<h3 class="text-lg font-medium text-gray-900">No transactions yet</h3>
<p class="mt-1 text-sm text-gray-500">Get started by making your first deposit or trade.</p>
</div>
</div>
<div id="history" class="tab-content hidden">
<div class="text-center py-12">
<i class="fas fa-history text-4xl text-gray-300 mb-4"></i>
<h3 class="text-lg font-medium text-gray-900">No history available</h3>
<p class="mt-1 text-sm text-gray-500">Your trading history will appear here.</p>
</div>
</div>
<div id="kyc" class="tab-content hidden">
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 mb-6">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-info-circle text-blue-400"></i>
</div>
<div class="ml-3">
<p class="text-sm text-blue-700">
Complete KYC verification to unlock full account features and higher withdrawal limits.
</p>
</div>
</div>
</div>
<!-- KYC Steps -->
<div class="kyc-steps">
<!-- Step 1 -->
<div id="kyc-step-1" class="kyc-step active">
<h3 class="text-lg font-medium text-gray-900 mb-4">Personal Information</h3>
<form class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="first-name" class="block text-sm font-medium text-gray-700">First Name</label>
<input type="text" id="first-name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label for="last-name" class="block text-sm font-medium text-gray-700">Last Name</label>
<input type="text" id="last-name" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div>
<label for="dob" class="block text-sm font-medium text-gray-700">Date of Birth</label>
<input type="date" id="dob" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label for="country" class="block text-sm font-medium text-gray-700">Country</label>
<select id="country" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
<option>Select Country</option>
<option>United States</option>
<option>United Kingdom</option>
<option>Canada</option>
<option>Australia</option>
</select>
</div>
<div class="flex justify-end">
<button type="button" class="next-step px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition" data-next="kyc-step-2">Continue</button>
</div>
</form>
</div>
<!-- Step 2 -->
<div id="kyc-step-2" class="kyc-step">
<h3 class="text-lg font-medium text-gray-900 mb-4">Address Verification</h3>
<form class="space-y-4">
<div>
<label for="address" class="block text-sm font-medium text-gray-700">Street Address</label>
<input type="text" id="address" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div>
<label for="city" class="block text-sm font-medium text-gray-700">City</label>
<input type="text" id="city" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label for="state" class="block text-sm font-medium text-gray-700">State/Province</label>
<input type="text" id="state" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label for="zip" class="block text-sm font-medium text-gray-700">ZIP/Postal Code</label>
<input type="text" id="zip" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div class="flex justify-between">
<button type="button" class="prev-step px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition" data-prev="kyc-step-1">Back</button>
<button type="button" class="next-step px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition" data-next="kyc-step-3">Continue</button>
</div>
</form>
</div>
<!-- Step 3 -->
<div id="kyc-step-3" class="kyc-step">
<h3 class="text-lg font-medium text-gray-900 mb-4">Identity Verification</h3>
<p class="text-sm text-gray-500 mb-6">To comply with regulations, we require identity verification. Please upload a clear photo of your government-issued ID (Passport, Driver's License, or National ID).</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Front of ID</label>
<div class="file-upload relative rounded-lg p-8 text-center cursor-pointer" id="front-upload">
<input type="file" id="front-id" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer" accept="image/*">
<i class="fas fa-camera text-4xl text-gray-400 mb-2"></i>
<p class="text-sm text-gray-500">Drag & drop your file here or click to browse</p>
<p class="text-xs text-gray-400 mt-2">JPG, PNG or PDF (max 5MB)</p>
</div>
<div id="front-preview" class="mt-2 hidden">
<img id="front-preview-img" src="#" alt="Front ID Preview" class="max-h-40 mx-auto">
<button id="remove-front" class="mt-2 text-red-500 text-sm">Remove</button>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Back of ID</label>
<div class="file-upload relative rounded-lg p-8 text-center cursor-pointer" id="back-upload">
<input type="file" id="back-id" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer" accept="image/*">
<i class="fas fa-camera text-4xl text-gray-400 mb-2"></i>
<p class="text-sm text-gray-500">Drag & drop your file here or click to browse</p>
<p class="text-xs text-gray-400 mt-2">JPG, PNG or PDF (max 5MB)</p>
</div>
<div id="back-preview" class="mt-2 hidden">
<img id="back-preview-img" src="#" alt="Back ID Preview" class="max-h-40 mx-auto">
<button id="remove-back" class="mt-2 text-red-500 text-sm">Remove</button>
</div>
</div>
</div>
<div class="mt-8">
<label class="block text-sm font-medium text-gray-700 mb-2">Selfie with ID</label>
<p class="text-sm text-gray-500 mb-4">Please take a selfie while holding your ID next to your face. Make sure all details are clearly visible.</p>
<div class="file-upload relative rounded-lg p-8 text-center cursor-pointer" id="selfie-upload">
<input type="file" id="selfie" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer" accept="image/*">
<i class="fas fa-user-circle text-4xl text-gray-400 mb-2"></i>
<p class="text-sm text-gray-500">Drag & drop your file here or click to browse</p>
<p class="text-xs text-gray-400 mt-2">JPG or PNG (max 5MB)</p>
</div>
<div id="selfie-preview" class="mt-2 hidden">
<img id="selfie-preview-img" src="#" alt="Selfie Preview" class="max-h-40 mx-auto">
<button id="remove-selfie" class="mt-2 text-red-500 text-sm">Remove</button>
</div>
</div>
<div class="flex justify-between mt-8">
<button type="button" class="prev-step px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition" data-prev="kyc-step-2">Back</button>
<button type="button" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition" id="submit-kyc">Submit Verification</button>
</div>
</div>
<!-- Step 4 (Success) -->
<div id="kyc-step-4" class="kyc-step">
<div class="text-center py-12">
<div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100">
<i class="fas fa-check text-green-600"></i>
</div>
<h3 class="mt-3 text-lg font-medium text-gray-900">Verification Submitted!</h3>
<p class="mt-2 text-sm text-gray-500">Your KYC documents have been received. Our team will review them shortly. You'll receive a notification once your verification is complete.</p>
<div class="mt-6">
<button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition">Back to Dashboard</button>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Bonus Notification Modal -->
<div id="bonus-modal" class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 hidden">
<div class="bg-white rounded-lg shadow-xl max-w-md w-full mx-4">
<div class="p-6">
<div class="flex justify-between items-start">
<div>
<h3 class="text-lg font-bold text-gray-900">Congratulations!</h3>
<p class="mt-1 text-sm text-gray-500">You've won a $25 bonus!</p>
</div>
<button id="close-modal" class="text-gray-400 hover:text-gray-500">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-4">
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-exclamation-circle text-yellow-400"></i>
</div>
<div class="ml-3">
<p class="text-sm text-yellow-700">
To claim your bonus, please complete KYC verification as required by crypto regulations.
</p>
</div>
</div>
</div>
</div>
<div class="mt-6 flex justify-end space-x-3">
<button id="cancel-bonus" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition">Maybe Later</button>
<button id="start-kyc" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition">Start KYC</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">MXPay</h3>
<p class="text-gray-400 text-sm">The world's leading cryptocurrency exchange</p>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Products</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Exchange</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Futures</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Earn</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Wallet</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Services</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white text-sm">API</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Trading Rules</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Fees</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Status</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-semibold mb-4">Support</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Help Center</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Contact Us</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Legal</a></li>
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Privacy Policy</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-sm text-gray-400">
<p>© 2023 MXPay. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Tab switching functionality
document.addEventListener('DOMContentLoaded', function() {
// Tab switching
const tabButtons = document.querySelectorAll('.tab-button');
const tabContents = document.querySelectorAll('.tab-content');
tabButtons.forEach(button => {
button.addEventListener('click', () => {
// Remove active class from all buttons and contents
tabButtons.forEach(btn => {
btn.classList.remove('border-blue-500', 'text-blue-600');
btn.classList.add('border-transparent', 'text-gray-500');
});
tabContents.forEach(content => {
content.classList.add('hidden');
});
// Add active class to clicked button
button.classList.remove('border-transparent', 'text-gray-500');
button.classList.add('border-blue-500', 'text-blue-600');
// Show corresponding content
const tabId = button.getAttribute('data-tab');
document.getElementById(tabId).classList.remove('hidden');
});
});
// KYC Steps navigation
const nextButtons = document.querySelectorAll('.next-step');
const prevButtons = document.querySelectorAll('.prev-step');
const kycSteps = document.querySelectorAll('.kyc-step');
nextButtons.forEach(button => {
button.addEventListener('click', () => {
const nextStepId = button.getAttribute('data-next');
const currentStep = button.closest('.kyc-step');
currentStep.classList.remove('active');
document.getElementById(nextStepId).classList.add('active');
});
});
prevButtons.forEach(button => {
button.addEventListener('click', () => {
const prevStepId = button.getAttribute('data-prev');
const currentStep = button.closest('.kyc-step');
currentStep.classList.remove('active');
document.getElementById(prevStepId).classList.add('active');
});
});
// File upload previews
function setupFileUpload(inputId, uploadDivId, previewDivId, previewImgId, removeBtnId) {
const input = document.getElementById(inputId);
const uploadDiv = document.getElementById(uploadDivId);
const previewDiv = document.getElementById(previewDivId);
const previewImg = document.getElementById(previewImgId);
const removeBtn = document.getElementById(removeBtnId);
// Handle drag and drop
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
uploadDiv.addEventListener(eventName, preventDefaults, false);
});
function preventDefaults(e) {
e.preventDefault();
e.stopPropagation();
}
['dragenter', 'dragover'].forEach(eventName => {
uploadDiv.addEventListener(eventName, highlight, false);
});
['dragleave', 'drop'].forEach(eventName => {
uploadDiv.addEventListener(eventName, unhighlight, false);
});
function highlight() {
uploadDiv.classList.add('dragover');
}
function unhighlight() {
uploadDiv.classList.remove('dragover');
}
// Handle file selection
input.addEventListener('change', function() {
if (this.files && this.files[0]) {
const reader = new FileReader();
reader.onload = function(e) {
previewImg.src = e.target.result;
previewDiv.classList.remove('hidden');
uploadDiv.classList.add('hidden');
}
reader.readAsDataURL(this.files[0]);
}
});
// Handle remove button
removeBtn.addEventListener('click', function() {
input.value = '';
previewDiv.classList.add('hidden');
uploadDiv.classList.remove('hidden');
});
}
// Set up file uploads
setupFileUpload('front-id', 'front-upload', 'front-preview', 'front-preview-img', 'remove-front');
setupFileUpload('back-id', 'back-upload', 'back-preview', 'back-preview-img', 'remove-back');
setupFileUpload('selfie', 'selfie-upload', 'selfie-preview', 'selfie-preview-img', 'remove-selfie');
// Submit KYC
document.getElementById('submit-kyc').addEventListener('click', function() {
// In a real app, you would submit the form data to the server here
// For this demo, we'll just show the success step
document.getElementById('kyc-step-3').classList.remove('active');
document.getElementById('kyc-step-4').classList.add('active');
});
// Show bonus modal on page load (simulating login)
setTimeout(() => {
document.getElementById('bonus-modal').classList.remove('hidden');
}, 1000);
// Close modal
document.getElementById('close-modal').addEventListener('click', function() {
document.getElementById('bonus-modal').classList.add('hidden');
});
document.getElementById('cancel-bonus').addEventListener('click', function() {
document.getElementById('bonus-modal').classList.add('hidden');
});
// Start KYC from modal
document.getElementById('start-kyc').addEventListener('click', function() {
document.getElementById('bonus-modal').classList.add('hidden');
// Switch to KYC tab
tabButtons.forEach(btn => {
btn.classList.remove('border-blue-500', 'text-blue-600');
btn.classList.add('border-transparent', 'text-gray-500');
});
tabContents.forEach(content => {
content.classList.add('hidden');
});
document.querySelector('[data-tab="kyc"]').classList.remove('border-transparent', 'text-gray-500');
document.querySelector('[data-tab="kyc"]').classList.add('border-blue-500', 'text-blue-600');
document.getElementById('kyc').classList.remove('hidden');
});
});
</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=dxlorhuggingface/mxp" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |