Skip to content

Commit

Permalink
add swiper paginations to template & js settings with styling bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
goldipl committed Jun 13, 2024
1 parent b7eac03 commit ae25c4d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ <h3>Szafy z lustrem</h3>
</div>
</a>
</div>
<div class="swiper-pagination"></div>
<!-- Add navigation buttons if desired -->
<div class="swiper-button-next fav-swiper-next"></div>
<div class="swiper-button-prev fav-swiper-prev"></div>
Expand Down Expand Up @@ -638,6 +639,7 @@ <h3>werikon</h3>
</div>
</a>
</div>
<div class="swiper-pagination"></div>
<!-- Add navigation buttons if desired -->
<div class="swiper-button-next garden-time-swiper-next"></div>
<div class="swiper-button-prev garden-time-swiper-prev"></div>
Expand Down
5 changes: 5 additions & 0 deletions js/home-swipers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ document.addEventListener('DOMContentLoaded', () => {
slidesPerView: 5,
slidesPerGroup: 1,
spaceBetween: 20,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next.sale-swiper-next',
prevEl: '.swiper-button-prev.sale-swiper-prev',
Expand Down Expand Up @@ -131,6 +135,7 @@ document.addEventListener('DOMContentLoaded', () => {
slidesPerGroup: 1,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next.bundle-promo-swiper-next',
Expand Down
8 changes: 5 additions & 3 deletions sass/home/_hero_swiper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
&.mobile-hero-swiper {
display: none;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active {
background-color: $furnipol_orange;
}
}
}
}

// Global swiper style
.swiper-pagination-bullet.swiper-pagination-bullet-active {
background-color: $furnipol_orange;
}

@media (max-width: 760px) {
.main-2-0 {
#hero-swiper {
Expand Down
3 changes: 2 additions & 1 deletion sass/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ body {
.main-2-0 #hero-swiper .hero-swiper.mobile-hero-swiper {
display: none;
}
.main-2-0 #hero-swiper .hero-swiper .swiper-pagination-bullet.swiper-pagination-bullet-active {

.swiper-pagination-bullet.swiper-pagination-bullet-active {
background-color: #eb7d3f;
}

Expand Down
2 changes: 1 addition & 1 deletion sass/main.css.map

Large diffs are not rendered by default.

0 comments on commit ae25c4d

Please sign in to comment.