vlcsolutions commited on
Commit
01b6626
·
verified ·
1 Parent(s): 4890d85

Apply a pop-up to youtube section

Browse files
Files changed (2) hide show
  1. index.html +44 -6
  2. style.css +23 -0
index.html CHANGED
@@ -378,15 +378,25 @@ class="inline-flex items-center text-[#002060] hover:text-[#8DC63F] px-3 py-2 te
378
  <i data-feather="shopping-bag" class="w-5 h-5" aria-hidden="true"></i>
379
  <span>View VLC IM ON APP SOURCE</span>
380
  </a>
381
-
382
  <!-- YouTube -->
383
- <a href="https://www.youtube.com/watch?v=0O5oZfmJ5AQ" rel="noopener"
384
  class="cta-btn flex-1 inline-flex items-center justify-center gap-2 rounded-lg px-4 py-3 text-sm md:text-base font-semibold border border-white/20 bg-white/10 transition focus:outline-none focus:ring-2 focus:ring-white/50">
385
  <i data-feather="play-circle" class="w-5 h-5" aria-hidden="true"></i>
386
  <span>Watch it in action</span>
387
- </a>
388
 
389
- </div>
 
 
 
 
 
 
 
 
 
 
 
390
  </div>
391
  </section>
392
 
@@ -721,11 +731,39 @@ Request Demo
721
  </div>
722
  </div>
723
  </footer>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
 
 
 
 
 
 
 
 
 
725
 
726
- <script>
727
  // Init animations and handle mobile menu functionality after scripts loaded
728
- document.addEventListener('DOMContentLoaded', () => {
729
  // Initialize AOS (Animation On Scroll)
730
  if (window.AOS) {
731
  AOS.init({
 
378
  <i data-feather="shopping-bag" class="w-5 h-5" aria-hidden="true"></i>
379
  <span>View VLC IM ON APP SOURCE</span>
380
  </a>
 
381
  <!-- YouTube -->
382
+ <button id="youtube-popup-button"
383
  class="cta-btn flex-1 inline-flex items-center justify-center gap-2 rounded-lg px-4 py-3 text-sm md:text-base font-semibold border border-white/20 bg-white/10 transition focus:outline-none focus:ring-2 focus:ring-white/50">
384
  <i data-feather="play-circle" class="w-5 h-5" aria-hidden="true"></i>
385
  <span>Watch it in action</span>
386
+ </button>
387
 
388
+ <!-- YouTube Popup -->
389
+ <div id="youtube-popup" class="fixed inset-0 z-[1000] hidden flex items-center justify-center bg-black/80">
390
+ <div class="relative w-full max-w-4xl">
391
+ <button id="youtube-close" class="absolute -top-10 right-0 text-white hover:text-[var(--vlc-leaf)]">
392
+ <i data-feather="x" class="w-8 h-8"></i>
393
+ </button>
394
+ <div class="aspect-w-16 aspect-h-9">
395
+ <iframe id="youtube-iframe" class="w-full h-full" src="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
396
+ </div>
397
+ </div>
398
+ </div>
399
+ </div>
400
  </div>
401
  </section>
402
 
 
731
  </div>
732
  </div>
733
  </footer>
734
+ <script>
735
+ // YouTube Popup functionality
736
+ (function() {
737
+ const popupButton = document.getElementById('youtube-popup-button');
738
+ const popup = document.getElementById('youtube-popup');
739
+ const closeButton = document.getElementById('youtube-close');
740
+ const iframe = document.getElementById('youtube-iframe');
741
+
742
+ if (!popupButton || !popup) return;
743
+
744
+ popupButton.addEventListener('click', () => {
745
+ iframe.src = 'https://www.youtube.com/embed/0O5oZfmJ5AQ?autoplay=1';
746
+ popup.classList.remove('hidden');
747
+ document.body.style.overflow = 'hidden';
748
+ });
749
+
750
+ closeButton.addEventListener('click', () => {
751
+ iframe.src = '';
752
+ popup.classList.add('hidden');
753
+ document.body.style.overflow = '';
754
+ });
755
 
756
+ popup.addEventListener('click', (e) => {
757
+ if (e.target === popup) {
758
+ iframe.src = '';
759
+ popup.classList.add('hidden');
760
+ document.body.style.overflow = '';
761
+ }
762
+ });
763
+ })();
764
 
 
765
  // Init animations and handle mobile menu functionality after scripts loaded
766
+ document.addEventListener('DOMContentLoaded', () => {
767
  // Initialize AOS (Animation On Scroll)
768
  if (window.AOS) {
769
  AOS.init({
style.css CHANGED
@@ -1,4 +1,27 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /* Mobile menu styles */
3
  @media (max-width: 767px) {
4
  body {
 
1
 
2
+ /* YouTube Popup */
3
+ #youtube-popup {
4
+ transition: opacity 0.3s ease;
5
+ }
6
+ #youtube-popup iframe {
7
+ min-height: 400px;
8
+ }
9
+
10
+ @media (max-width: 1024px) {
11
+ #youtube-popup iframe {
12
+ min-height: 300px;
13
+ }
14
+ }
15
+
16
+ @media (max-width: 640px) {
17
+ #youtube-popup iframe {
18
+ min-height: 200px;
19
+ }
20
+ #youtube-close {
21
+ top: -50px;
22
+ }
23
+ }
24
+
25
  /* Mobile menu styles */
26
  @media (max-width: 767px) {
27
  body {