fix: move Swiper.js initialization into script tag to prevent raw JS from displaying as text
Browse files- index.html +27 -25
index.html
CHANGED
|
@@ -161,31 +161,33 @@
|
|
| 161 |
</div>
|
| 162 |
</div>
|
| 163 |
</section>
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 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">
|