S-Dreamer commited on
Commit
1c6c3ee
·
verified ·
1 Parent(s): ca6e1a8

let's create a wizard walk-through from Try it Free through to taking payment detalis with a zero value transaction against the customers card - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +136 -1
index.html CHANGED
@@ -115,7 +115,7 @@
115
  Visualize, explore, and understand complex repositories in seconds
116
  </p>
117
  <div class="mt-4">
118
- <button class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition-all transform hover:scale-105">
119
  Try It Free
120
  </button>
121
  <button class="ml-3 bg-github-700 hover:bg-github-600 text-white font-medium py-2 px-6 rounded-lg transition-all">
@@ -431,6 +431,85 @@
431
  </footer>
432
  </div>
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  <script>
435
  // Repository data for the grid
436
  const popularRepos = [
@@ -576,6 +655,62 @@
576
  });
577
  });
578
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  function getLanguageColor(language) {
580
  const colors = {
581
  'JavaScript': '#f1e05a',
 
115
  Visualize, explore, and understand complex repositories in seconds
116
  </p>
117
  <div class="mt-4">
118
+ <button onclick="openWizard()" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-6 rounded-lg transition-all transform hover:scale-105">
119
  Try It Free
120
  </button>
121
  <button class="ml-3 bg-github-700 hover:bg-github-600 text-white font-medium py-2 px-6 rounded-lg transition-all">
 
431
  </footer>
432
  </div>
433
 
434
+ <!-- Payment Wizard Modal -->
435
+ <div id="paymentWizard" class="fixed inset-0 z-50 hidden flex items-center justify-center p-4 bg-black bg-opacity-70">
436
+ <div class="bg-github-800 rounded-xl shadow-2xl w-full max-w-md overflow-hidden">
437
+ <!-- Wizard Steps -->
438
+ <div class="flex border-b border-github-700">
439
+ <div class="w-1/3 py-4 text-center border-b-2 border-indigo-500 font-medium text-white">
440
+ <span class="hidden sm:inline">Step</span> 1
441
+ </div>
442
+ <div class="w-1/3 py-4 text-center text-github-400">
443
+ <span class="hidden sm:inline">Step</span> 2
444
+ </div>
445
+ <div class="w-1/3 py-4 text-center text-github-400">
446
+ <span class="hidden sm:inline">Step</span> 3
447
+ </div>
448
+ </div>
449
+
450
+ <!-- Step 1: Account Details -->
451
+ <div id="step1" class="p-6">
452
+ <h3 class="text-xl font-semibold text-white mb-4">Create Your Account</h3>
453
+ <div class="space-y-4">
454
+ <div>
455
+ <label class="block text-github-300 mb-1">Email</label>
456
+ <input type="email" class="w-full bg-github-700 border border-github-600 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
457
+ </div>
458
+ <div>
459
+ <label class="block text-github-300 mb-1">Password</label>
460
+ <input type="password" class="w-full bg-github-700 border border-github-600 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
461
+ </div>
462
+ <div class="pt-2">
463
+ <button onclick="nextStep(1)" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
464
+ Continue
465
+ </button>
466
+ </div>
467
+ </div>
468
+ </div>
469
+
470
+ <!-- Step 2: Payment Details -->
471
+ <div id="step2" class="p-6 hidden">
472
+ <h3 class="text-xl font-semibold text-white mb-4">Payment Verification</h3>
473
+ <p class="text-github-300 mb-4">We'll verify your card with a $0 authorization that will be immediately voided.</p>
474
+ <div class="space-y-4">
475
+ <div>
476
+ <label class="block text-github-300 mb-1">Card Number</label>
477
+ <input type="text" placeholder="4242 4242 4242 4242" class="w-full bg-github-700 border border-github-600 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
478
+ </div>
479
+ <div class="grid grid-cols-2 gap-4">
480
+ <div>
481
+ <label class="block text-github-300 mb-1">Expiry</label>
482
+ <input type="text" placeholder="MM/YY" class="w-full bg-github-700 border border-github-600 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
483
+ </div>
484
+ <div>
485
+ <label class="block text-github-300 mb-1">CVC</label>
486
+ <input type="text" placeholder="123" class="w-full bg-github-700 border border-github-600 rounded-lg px-4 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500">
487
+ </div>
488
+ </div>
489
+ <div class="pt-2">
490
+ <button onclick="nextStep(2)" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
491
+ Verify Card
492
+ </button>
493
+ </div>
494
+ </div>
495
+ </div>
496
+
497
+ <!-- Step 3: Confirmation -->
498
+ <div id="step3" class="p-6 hidden">
499
+ <div class="text-center">
500
+ <div class="w-16 h-16 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-4">
501
+ <i class="fas fa-check text-green-400 text-2xl"></i>
502
+ </div>
503
+ <h3 class="text-xl font-semibold text-white mb-2">Verification Complete!</h3>
504
+ <p class="text-github-300 mb-6">Your card has been successfully verified. You now have full access to all features.</p>
505
+ <button onclick="closeWizard()" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
506
+ Start Exploring
507
+ </button>
508
+ </div>
509
+ </div>
510
+ </div>
511
+ </div>
512
+
513
  <script>
514
  // Repository data for the grid
515
  const popularRepos = [
 
655
  });
656
  });
657
 
658
+ // Wizard functions
659
+ function openWizard() {
660
+ document.getElementById('paymentWizard').classList.remove('hidden');
661
+ resetWizard();
662
+ }
663
+
664
+ function closeWizard() {
665
+ document.getElementById('paymentWizard').classList.add('hidden');
666
+ }
667
+
668
+ function nextStep(currentStep) {
669
+ // Hide current step
670
+ document.getElementById(`step${currentStep}`).classList.add('hidden');
671
+
672
+ // Show next step
673
+ document.getElementById(`step${currentStep + 1}`).classList.remove('hidden');
674
+
675
+ // Update step indicators
676
+ const steps = document.querySelectorAll('#paymentWizard .flex > div');
677
+ steps.forEach((step, index) => {
678
+ if (index <= currentStep) {
679
+ step.classList.add('border-indigo-500', 'text-white', 'font-medium');
680
+ step.classList.remove('text-github-400');
681
+ } else {
682
+ step.classList.remove('border-indigo-500', 'text-white', 'font-medium');
683
+ step.classList.add('text-github-400');
684
+ }
685
+ });
686
+
687
+ // On final step, simulate payment processing
688
+ if (currentStep === 2) {
689
+ setTimeout(() => {
690
+ document.getElementById('step3').classList.remove('hidden');
691
+ }, 1500);
692
+ }
693
+ }
694
+
695
+ function resetWizard() {
696
+ // Reset to step 1
697
+ document.getElementById('step1').classList.remove('hidden');
698
+ document.getElementById('step2').classList.add('hidden');
699
+ document.getElementById('step3').classList.add('hidden');
700
+
701
+ // Reset step indicators
702
+ const steps = document.querySelectorAll('#paymentWizard .flex > div');
703
+ steps.forEach((step, index) => {
704
+ if (index === 0) {
705
+ step.classList.add('border-indigo-500', 'text-white', 'font-medium');
706
+ step.classList.remove('text-github-400');
707
+ } else {
708
+ step.classList.remove('border-indigo-500', 'text-white', 'font-medium');
709
+ step.classList.add('text-github-400');
710
+ }
711
+ });
712
+ }
713
+
714
  function getLanguageColor(language) {
715
  const colors = {
716
  'JavaScript': '#f1e05a',