Fazbeeer commited on
Commit
c188222
·
verified ·
1 Parent(s): ffda2be

make everything functional every single option and pop up perfect it

Browse files
Files changed (1) hide show
  1. index.html +205 -54
index.html CHANGED
@@ -131,10 +131,10 @@
131
  <span class="text-yellow-500 font-semibold">Elite performance.</span>
132
  </p>
133
  <div class="flex space-x-4">
134
- <button class="bg-gradient-to-r from-blue-600 to-blue-800 hover:from-blue-700 hover:to-blue-900 text-white font-bold px-8 py-4 rounded-full text-lg transition-all transform hover:scale-105 hover:shadow-lg hover:shadow-blue-500/30">
135
  Get Started
136
  </button>
137
- <button class="bg-black border-2 border-yellow-500 hover:bg-yellow-500 hover:text-black text-white font-bold px-8 py-4 rounded-full text-lg transition-all transform hover:scale-105 flex items-center">
138
  <i data-feather="play-circle" class="mr-2"></i> View Demo
139
  </button>
140
  </div>
@@ -304,7 +304,7 @@
304
  <span class="text-gray-500">Limited scenario library</span>
305
  </li>
306
  </ul>
307
- <button class="w-full bg-gray-700 hover:bg-gray-600 text-white font-bold py-3 rounded-lg transition">
308
  Get Started
309
  </button>
310
  </div>
@@ -337,7 +337,7 @@
337
  <span class="text-gray-500">Limited professional access</span>
338
  </li>
339
  </ul>
340
- <button class="w-full bg-yellow-500 hover:bg-yellow-600 text-black font-bold py-3 rounded-lg transition">
341
  Get Started
342
  </button>
343
  </div>
@@ -367,7 +367,7 @@
367
  <span>Full scenario library + custom builds</span>
368
  </li>
369
  </ul>
370
- <button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 rounded-lg transition">
371
  Get Started
372
  </button>
373
  </div>
@@ -393,12 +393,12 @@
393
  We at Amplify don't just prepare you for big moments- we help you create them. Our VR headset brings nervous scenarios to life so you can practice and prepare, while our AR technology provides hands-on learning in real-world environments.
394
  </p>
395
  <div class="flex space-x-4">
396
- <button class="border-2 border-yellow-500 hover:bg-yellow-500 hover:text-black text-white font-bold px-6 py-3 rounded-lg transition flex items-center">
397
- <i data-feather="users" class="mr-2"></i> Meet the Team
398
- </button>
399
- <button class="border-2 border-red-500 hover:bg-red-500 hover:text-white text-white font-bold px-6 py-3 rounded-lg transition flex items-center">
400
- <i data-feather="book" class="mr-2"></i> Our Story
401
- </button>
402
  </div>
403
  </div>
404
  <div class="md:w-1/2">
@@ -434,7 +434,7 @@
434
  <p class="text-xl mb-12 max-w-2xl mx-auto text-gray-300">
435
  Join thousands of athletes, performers, and professionals who are mastering their minds with our technology.
436
  </p>
437
- <button class="bg-gradient-to-r from-blue-600 to-blue-800 hover:from-blue-700 hover:to-blue-900 text-white font-bold px-10 py-5 rounded-full text-xl transition-all transform hover:scale-105 hover:shadow-lg hover:shadow-blue-500/30 flex items-center mx-auto">
438
  <i data-feather="zap" class="mr-2"></i> Start Your Free Trial
439
  </button>
440
  <p class="mt-4 text-gray-400 text-sm">*7 days free then $9.99/mo. Cancel anytime.</p>
@@ -514,22 +514,33 @@
514
  </footer>
515
 
516
  <script>
517
- // Simplified Dropdown Toggle Logic
518
  const languageBtn = document.getElementById('language-btn');
519
  const currencyBtn = document.getElementById('currency-btn');
520
  const languageDropdown = document.getElementById('language-dropdown');
521
  const currencyDropdown = document.getElementById('currency-dropdown');
522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  languageBtn.addEventListener('click', (e) => {
524
  e.stopPropagation();
525
- languageDropdown.classList.toggle('hidden');
526
- currencyDropdown.classList.add('hidden');
527
  });
528
 
529
  currencyBtn.addEventListener('click', (e) => {
530
  e.stopPropagation();
531
- currencyDropdown.classList.toggle('hidden');
532
- languageDropdown.classList.add('hidden');
533
  });
534
 
535
  // Close dropdowns when clicking outside
@@ -538,13 +549,44 @@
538
  currencyDropdown.classList.add('hidden');
539
  });
540
 
541
- // Handle selections
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
542
  document.querySelectorAll('#language-dropdown a').forEach(item => {
543
  item.addEventListener('click', (e) => {
544
  e.preventDefault();
545
  document.querySelector('#language-btn span').textContent =
546
  item.getAttribute('data-lang').toUpperCase();
547
  languageDropdown.classList.add('hidden');
 
548
  });
549
  });
550
 
@@ -554,13 +596,18 @@
554
  document.querySelector('#currency-btn span').textContent =
555
  item.getAttribute('data-currency');
556
  currencyDropdown.classList.add('hidden');
 
557
  });
558
  });
559
 
560
- // Performance Dashboard Animation
 
 
 
 
561
  document.addEventListener('DOMContentLoaded', function() {
562
- const metrics = ['confidence-level', 'stress-level', 'focus-level'];
563
  const performanceBar = document.getElementById('performance-bar');
 
564
  function updateMetrics() {
565
  const realisticValues = [
566
  { confidence: 87, stress: 42, focus: 93, width: 72 },
@@ -572,66 +619,170 @@
572
 
573
  const currentValues = realisticValues[Math.floor(Math.random() * realisticValues.length)];
574
 
575
- document.getElementById('confidence-level').textContent = currentValues.confidence + '%';
576
- document.getElementById('stress-level').textContent = currentValues.stress + '%';
577
- document.getElementById('focus-level').textContent = currentValues.focus + '%';
 
578
 
 
 
579
  performanceBar.style.width = `${currentValues.width}%`;
580
  performanceBar.style.background = `linear-gradient(to right,
581
  ${currentValues.width < 30 ? '#ef4444' : currentValues.width < 70 ? '#f59e0b' : '#10b981'},
582
  ${currentValues.width < 30 ? '#f59e0b' : currentValues.width < 70 ? '#10b981' : '#3b82f6'})`;
583
  }
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  // Update every 5 seconds
586
  updateMetrics();
587
  setInterval(updateMetrics, 5000);
588
- });
589
- // Smooth transitions for all interactive elements
590
- document.querySelectorAll('a, button').forEach(el => {
591
- el.addEventListener('click', function(e) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
  e.preventDefault();
593
- document.body.style.opacity = '0.8';
594
  document.body.style.transition = 'opacity 0.3s ease';
595
 
596
  setTimeout(() => {
597
- window.location.href = this.href || '#';
598
  document.body.style.opacity = '1';
599
  }, 300);
600
  });
601
  });
602
 
603
- // Initialize Vanta.js with more dynamic colors
604
- VANTA.GLOBE({
605
- el: "#vanta-bg",
606
- mouseControls: true,
607
- touchControls: true,
608
- gyroControls: false,
609
- minHeight: 200.00,
610
- minWidth: 200.00,
611
- scale: 1.00,
612
- scaleMobile: 1.00,
613
- color: 0x2563eb,
614
- color2: 0x1d4ed8,
615
- backgroundColor: 0x0,
616
- size: 0.8,
617
- speed: 0.7
618
- });
 
 
 
 
 
 
 
619
 
620
- // Add meme-like animations
621
- document.addEventListener('DOMContentLoaded', function() {
 
622
 
 
 
623
  // Feather icons
624
  feather.replace();
625
 
626
- // Add confetti to CTA button
627
- document.querySelector('button.bg-gradient-to-r.from-purple-600').addEventListener('click', function() {
628
- confetti({
629
- particleCount: 100,
630
- spread: 70,
631
- origin: { y: 0.6 },
632
- colors: ['#2563eb', '#1d4ed8', '#f59e0b', '#10b981']
 
 
 
 
 
 
633
  });
634
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
635
  });
636
  </script>
637
  </body>
 
131
  <span class="text-yellow-500 font-semibold">Elite performance.</span>
132
  </p>
133
  <div class="flex space-x-4">
134
+ <button class="bg-gradient-to-r from-blue-600 to-blue-800 hover:from-blue-700 hover:to-blue-900 text-white font-bold px-8 py-4 rounded-full text-lg transition-all transform hover:scale-105 hover:shadow-lg hover:shadow-blue-500/30 cta-button">
135
  Get Started
136
  </button>
137
+ <button class="bg-black border-2 border-yellow-500 hover:bg-yellow-500 hover:text-black text-white font-bold px-8 py-4 rounded-full text-lg transition-all transform hover:scale-105 flex items-center cta-button">
138
  <i data-feather="play-circle" class="mr-2"></i> View Demo
139
  </button>
140
  </div>
 
304
  <span class="text-gray-500">Limited scenario library</span>
305
  </li>
306
  </ul>
307
+ <button class="w-full bg-gray-700 hover:bg-gray-600 text-white font-bold py-3 rounded-lg transition cta-button">
308
  Get Started
309
  </button>
310
  </div>
 
337
  <span class="text-gray-500">Limited professional access</span>
338
  </li>
339
  </ul>
340
+ <button class="w-full bg-yellow-500 hover:bg-yellow-600 text-black font-bold py-3 rounded-lg transition cta-button">
341
  Get Started
342
  </button>
343
  </div>
 
367
  <span>Full scenario library + custom builds</span>
368
  </li>
369
  </ul>
370
+ <button class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 rounded-lg transition cta-button">
371
  Get Started
372
  </button>
373
  </div>
 
393
  We at Amplify don't just prepare you for big moments- we help you create them. Our VR headset brings nervous scenarios to life so you can practice and prepare, while our AR technology provides hands-on learning in real-world environments.
394
  </p>
395
  <div class="flex space-x-4">
396
+ <button class="border-2 border-yellow-500 hover:bg-yellow-500 hover:text-black text-white font-bold px-6 py-3 rounded-lg transition flex items-center cta-button">
397
+ <i data-feather="users" class="mr-2"></i> Meet the Team
398
+ </button>
399
+ <button class="border-2 border-red-500 hover:bg-red-500 hover:text-white text-white font-bold px-6 py-3 rounded-lg transition flex items-center cta-button">
400
+ <i data-feather="book" class="mr-2"></i> Our Story
401
+ </button>
402
  </div>
403
  </div>
404
  <div class="md:w-1/2">
 
434
  <p class="text-xl mb-12 max-w-2xl mx-auto text-gray-300">
435
  Join thousands of athletes, performers, and professionals who are mastering their minds with our technology.
436
  </p>
437
+ <button class="bg-gradient-to-r from-blue-600 to-blue-800 hover:from-blue-700 hover:to-blue-900 text-white font-bold px-10 py-5 rounded-full text-xl transition-all transform hover:scale-105 hover:shadow-lg hover:shadow-blue-500/30 flex items-center mx-auto cta-button">
438
  <i data-feather="zap" class="mr-2"></i> Start Your Free Trial
439
  </button>
440
  <p class="mt-4 text-gray-400 text-sm">*7 days free then $9.99/mo. Cancel anytime.</p>
 
514
  </footer>
515
 
516
  <script>
517
+ // Enhanced Dropdown Toggle Logic with Keyboard Navigation
518
  const languageBtn = document.getElementById('language-btn');
519
  const currencyBtn = document.getElementById('currency-btn');
520
  const languageDropdown = document.getElementById('language-dropdown');
521
  const currencyDropdown = document.getElementById('currency-dropdown');
522
 
523
+ // Toggle dropdowns
524
+ const toggleDropdowns = (dropdownToShow, dropdownToHide) => {
525
+ dropdownToShow.classList.toggle('hidden');
526
+ dropdownToHide.classList.add('hidden');
527
+
528
+ // Focus first item when dropdown opens
529
+ if (!dropdownToShow.classList.contains('hidden')) {
530
+ setTimeout(() => {
531
+ dropdownToShow.querySelector('a').focus();
532
+ }, 100);
533
+ }
534
+ };
535
+
536
  languageBtn.addEventListener('click', (e) => {
537
  e.stopPropagation();
538
+ toggleDropdowns(languageDropdown, currencyDropdown);
 
539
  });
540
 
541
  currencyBtn.addEventListener('click', (e) => {
542
  e.stopPropagation();
543
+ toggleDropdowns(currencyDropdown, languageDropdown);
 
544
  });
545
 
546
  // Close dropdowns when clicking outside
 
549
  currencyDropdown.classList.add('hidden');
550
  });
551
 
552
+ // Keyboard navigation for dropdowns
553
+ const handleDropdownKeyboardNav = (dropdown, btn) => {
554
+ const items = dropdown.querySelectorAll('a');
555
+ const firstItem = items[0];
556
+ const lastItem = items[items.length - 1];
557
+
558
+ items.forEach(item => {
559
+ item.addEventListener('keydown', (e) => {
560
+ // Close on Escape
561
+ if (e.key === 'Escape') {
562
+ dropdown.classList.add('hidden');
563
+ btn.focus();
564
+ }
565
+
566
+ // Navigate with arrow keys
567
+ if (e.key === 'ArrowDown') {
568
+ e.preventDefault();
569
+ if (item === lastItem) firstItem.focus();
570
+ else item.nextElementSibling.focus();
571
+ }
572
+
573
+ if (e.key === 'ArrowUp') {
574
+ e.preventDefault();
575
+ if (item === firstItem) lastItem.focus();
576
+ else item.previousElementSibling.focus();
577
+ }
578
+ });
579
+ });
580
+ };
581
+
582
+ // Handle selections with proper focus management
583
  document.querySelectorAll('#language-dropdown a').forEach(item => {
584
  item.addEventListener('click', (e) => {
585
  e.preventDefault();
586
  document.querySelector('#language-btn span').textContent =
587
  item.getAttribute('data-lang').toUpperCase();
588
  languageDropdown.classList.add('hidden');
589
+ languageBtn.focus();
590
  });
591
  });
592
 
 
596
  document.querySelector('#currency-btn span').textContent =
597
  item.getAttribute('data-currency');
598
  currencyDropdown.classList.add('hidden');
599
+ currencyBtn.focus();
600
  });
601
  });
602
 
603
+ // Initialize keyboard nav
604
+ handleDropdownKeyboardNav(languageDropdown, languageBtn);
605
+ handleDropdownKeyboardNav(currencyDropdown, currencyBtn);
606
+
607
+ // Enhanced Performance Dashboard Animation
608
  document.addEventListener('DOMContentLoaded', function() {
 
609
  const performanceBar = document.getElementById('performance-bar');
610
+
611
  function updateMetrics() {
612
  const realisticValues = [
613
  { confidence: 87, stress: 42, focus: 93, width: 72 },
 
619
 
620
  const currentValues = realisticValues[Math.floor(Math.random() * realisticValues.length)];
621
 
622
+ // Animate number changes
623
+ animateValue('confidence-level', currentValues.confidence);
624
+ animateValue('stress-level', currentValues.stress);
625
+ animateValue('focus-level', currentValues.focus);
626
 
627
+ // Animate progress bar
628
+ performanceBar.style.transition = 'width 1s ease, background 1s ease';
629
  performanceBar.style.width = `${currentValues.width}%`;
630
  performanceBar.style.background = `linear-gradient(to right,
631
  ${currentValues.width < 30 ? '#ef4444' : currentValues.width < 70 ? '#f59e0b' : '#10b981'},
632
  ${currentValues.width < 30 ? '#f59e0b' : currentValues.width < 70 ? '#10b981' : '#3b82f6'})`;
633
  }
634
 
635
+ // Smooth number animation
636
+ function animateValue(id, targetValue) {
637
+ const element = document.getElementById(id);
638
+ const start = parseInt(element.textContent);
639
+ const duration = 1000;
640
+ let startTime = null;
641
+
642
+ function animation(currentTime) {
643
+ if (!startTime) startTime = currentTime;
644
+ const timeElapsed = currentTime - startTime;
645
+ const progress = Math.min(timeElapsed / duration, 1);
646
+ const value = Math.floor(progress * (targetValue - start) + start);
647
+ element.textContent = value + '%';
648
+
649
+ if (progress < 1) {
650
+ requestAnimationFrame(animation);
651
+ }
652
+ }
653
+
654
+ requestAnimationFrame(animation);
655
+ }
656
+
657
  // Update every 5 seconds
658
  updateMetrics();
659
  setInterval(updateMetrics, 5000);
660
+
661
+ // Interactive dashboard hover effects
662
+ performanceBar.addEventListener('mouseenter', () => {
663
+ performanceBar.style.transition = 'width 0.5s ease, background 0.5s ease';
664
+ performanceBar.style.width = '100%';
665
+ });
666
+
667
+ performanceBar.addEventListener('mouseleave', () => {
668
+ performanceBar.style.width = `${parseInt(performanceBar.style.width)}%`;
669
+ });
670
+ });
671
+
672
+ // Enhanced Navigation with proper link handling
673
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
674
+ anchor.addEventListener('click', function (e) {
675
+ e.preventDefault();
676
+
677
+ const targetId = this.getAttribute('href');
678
+ const targetElement = document.querySelector(targetId);
679
+
680
+ if (targetElement) {
681
+ window.scrollTo({
682
+ top: targetElement.offsetTop - 100,
683
+ behavior: 'smooth'
684
+ });
685
+
686
+ // Update URL without reload
687
+ history.pushState(null, null, targetId);
688
+ }
689
+ });
690
+ });
691
+
692
+ // Only prevent default for # links
693
+ document.querySelectorAll('a:not([href^="#"])').forEach(anchor => {
694
+ anchor.addEventListener('click', function(e) {
695
+ if (this.getAttribute('href') !== '#') {
696
+ // Normal link behavior
697
+ return;
698
+ }
699
+
700
  e.preventDefault();
701
+ document.body.style.opacity = '0.9';
702
  document.body.style.transition = 'opacity 0.3s ease';
703
 
704
  setTimeout(() => {
 
705
  document.body.style.opacity = '1';
706
  }, 300);
707
  });
708
  });
709
 
710
+ // Initialize Vanta.js with better performance
711
+ let vantaEffect;
712
+ function initVanta() {
713
+ if (window.innerWidth > 768) {
714
+ vantaEffect = VANTA.GLOBE({
715
+ el: "#vanta-bg",
716
+ mouseControls: true,
717
+ touchControls: true,
718
+ gyroControls: false,
719
+ minHeight: 200.00,
720
+ minWidth: 200.00,
721
+ scale: 1.00,
722
+ scaleMobile: 1.00,
723
+ color: 0x2563eb,
724
+ color2: 0x1d4ed8,
725
+ backgroundColor: 0x0,
726
+ size: 0.8,
727
+ speed: 0.7
728
+ });
729
+ } else if (vantaEffect) {
730
+ vantaEffect.destroy();
731
+ }
732
+ }
733
 
734
+ // Initialize on load and resize
735
+ initVanta();
736
+ window.addEventListener('resize', initVanta);
737
 
738
+ // Enhanced Confetti Effects
739
+ document.addEventListener('DOMContentLoaded', function() {
740
  // Feather icons
741
  feather.replace();
742
 
743
+ // Add confetti to all CTA buttons
744
+ document.querySelectorAll('.cta-button').forEach(button => {
745
+ button.addEventListener('click', function() {
746
+ if (this.getAttribute('href') === '#' || !this.getAttribute('href')) {
747
+ confetti({
748
+ particleCount: 150,
749
+ spread: 90,
750
+ origin: { y: 0.6 },
751
+ colors: ['#2563eb', '#1d4ed8', '#f59e0b', '#10b981', '#ef4444'],
752
+ shapes: ['square', 'circle'],
753
+ gravity: 0.8
754
+ });
755
+ }
756
  });
757
  });
758
+
759
+ // Add subtle animation to all interactive elements
760
+ document.querySelectorAll('button, a, .social-btn').forEach(el => {
761
+ el.addEventListener('mouseenter', () => {
762
+ el.style.transform = 'translateY(-3px) scale(1.05)';
763
+ el.style.filter = 'drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3))';
764
+ });
765
+
766
+ el.addEventListener('mouseleave', () => {
767
+ el.style.transform = '';
768
+ el.style.filter = 'drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25))';
769
+ });
770
+ });
771
+ });
772
+
773
+ // Accessibility improvements
774
+ document.addEventListener('keydown', function(e) {
775
+ // Skip to main content
776
+ if (e.key === '1' && e.ctrlKey) {
777
+ e.preventDefault();
778
+ document.querySelector('main')?.focus();
779
+ }
780
+
781
+ // Skip to navigation
782
+ if (e.key === '2' && e.ctrlKey) {
783
+ e.preventDefault();
784
+ document.querySelector('nav')?.focus();
785
+ }
786
  });
787
  </script>
788
  </body>