John2121 commited on
Commit
128be19
·
1 Parent(s): ebe0d56

fix: move Swiper.js initialization into script tag to prevent raw JS from displaying as text

Browse files
Files changed (1) hide show
  1. index.html +27 -25
index.html CHANGED
@@ -161,31 +161,33 @@
161
  </div>
162
  </div>
163
  </section>
164
- // Swiper.js initialization for dynamic card carousel
165
- document.addEventListener('DOMContentLoaded', function () {
166
- feather.replace();
167
- new Swiper('.mySwiper', {
168
- loop: true,
169
- autoplay: { delay: 4000, disableOnInteraction: false },
170
- effect: 'coverflow',
171
- grabCursor: true,
172
- centeredSlides: true,
173
- slidesPerView: 1,
174
- coverflowEffect: {
175
- rotate: 30,
176
- stretch: 0,
177
- depth: 100,
178
- modifier: 1,
179
- slideShadows: true,
180
- },
181
- pagination: { el: '.swiper-pagination', clickable: true },
182
- navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' },
183
- breakpoints: {
184
- 768: { slidesPerView: 1 },
185
- 1024: { slidesPerView: 2 },
186
- },
187
- });
188
- });
 
 
189
  <!-- Call to Action -->
190
  <section class="bg-gradient-to-br from-green-700 to-green-600 py-16">
191
  <div class="container mx-auto px-4 text-center">
 
161
  </div>
162
  </div>
163
  </section>
164
+ <!-- Swiper.js initialization for dynamic card carousel -->
165
+ <script>
166
+ document.addEventListener('DOMContentLoaded', function () {
167
+ feather.replace();
168
+ new Swiper('.mySwiper', {
169
+ loop: true,
170
+ autoplay: { delay: 4000, disableOnInteraction: false },
171
+ effect: 'coverflow',
172
+ grabCursor: true,
173
+ centeredSlides: true,
174
+ slidesPerView: 1,
175
+ coverflowEffect: {
176
+ rotate: 30,
177
+ stretch: 0,
178
+ depth: 100,
179
+ modifier: 1,
180
+ slideShadows: true,
181
+ },
182
+ pagination: { el: '.swiper-pagination', clickable: true },
183
+ navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev' },
184
+ breakpoints: {
185
+ 768: { slidesPerView: 1 },
186
+ 1024: { slidesPerView: 2 },
187
+ },
188
+ });
189
+ });
190
+ </script>
191
  <!-- Call to Action -->
192
  <section class="bg-gradient-to-br from-green-700 to-green-600 py-16">
193
  <div class="container mx-auto px-4 text-center">