vlcsolutions commited on
Commit
5f8e640
·
verified ·
1 Parent(s): 8082653

There is no pop-up close button for popup in youtube section

Browse files
Files changed (1) hide show
  1. components/youtube-modal.js +10 -21
components/youtube-modal.js CHANGED
@@ -93,10 +93,13 @@ position: fixed;
93
  <div class="panel">
94
  <div class="header">
95
  <h4 class="title">Watch Demo</h4>
96
- <button class="close-btn" aria-label="Close">
97
- <i data-feather="x" class="w-5 h-5"></i>
 
 
 
98
  </button>
99
- </div>
100
  <div class="iframe-container">
101
  <iframe id="youtube-iframe"
102
  frameborder="0"
@@ -110,14 +113,10 @@ position: fixed;
110
  }
111
  setupEventListeners() {
112
  this.modal = this.shadowRoot.getElementById('youtube-modal');
113
- this.closeBtn = this.shadowRoot.querySelector('.close-btn');
114
- this.backdrop = this.shadowRoot.getElementById('youtube-modal-backdrop');
115
- // Load feather icons
116
- if (window.feather) {
117
- feather.replace();
118
- }
119
-
120
- if (this.closeBtn) {
121
  this.closeBtn.addEventListener('click', () => this.close());
122
  }
123
 
@@ -130,16 +129,6 @@ position: fixed;
130
  this.close();
131
  }
132
  });
133
-
134
- // Add feather icons dynamically if not already loaded
135
- if (!window.feather && this.closeBtn) {
136
- const script = document.createElement('script');
137
- script.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js';
138
- script.onload = () => {
139
- feather.replace();
140
- };
141
- document.head.appendChild(script);
142
- }
143
  }
144
 
145
  static get observedAttributes() {
 
93
  <div class="panel">
94
  <div class="header">
95
  <h4 class="title">Watch Demo</h4>
96
+ <button class="close-btn" id="modal-close-btn" aria-label="Close">
97
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
98
+ <line x1="18" y1="6" x2="6" y2="18"></line>
99
+ <line x1="6" y1="6" x2="18" y2="18"></line>
100
+ </svg>
101
  </button>
102
+ </div>
103
  <div class="iframe-container">
104
  <iframe id="youtube-iframe"
105
  frameborder="0"
 
113
  }
114
  setupEventListeners() {
115
  this.modal = this.shadowRoot.getElementById('youtube-modal');
116
+ this.closeBtn = this.shadowRoot.getElementById('modal-close-btn');
117
+ this.backdrop = this.shadowRoot.getElementById('youtube-modal-backdrop');
118
+ // Use inline SVG instead of feather icons for better reliability
119
+ if (this.closeBtn) {
 
 
 
 
120
  this.closeBtn.addEventListener('click', () => this.close());
121
  }
122
 
 
129
  this.close();
130
  }
131
  });
 
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
  static get observedAttributes() {