Skip to content

Commit

Permalink
Merge pull request #18 from LesiaUKR/reviews
Browse files Browse the repository at this point in the history
Reviews
  • Loading branch information
LesiaUKR authored Aug 25, 2024
2 parents aaedfb8 + e5f85e2 commit 0ea98a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
8 changes: 1 addition & 7 deletions src/img/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 7 additions & 9 deletions src/js/swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const swiper = new Swiper(
sensitivity: 1,
},
// Количество слайдов для показа
slidesPerView: 1.07,
slidesPerView: 1,
// Отключение функционала
// если слайдов меньше чем нужно
watchOverflow: true,
Expand All @@ -48,11 +48,9 @@ const swiper = new Swiper(
freemode: true,

breakpoints: {
// Define breakpoints
1440: {
// Desktop size
slidesPerView: 4.18,
spaceBetween: 36,
slidesPerView: 4,
spaceBetween: 56,

navigation: {
nextEl: '.swiper-button-next',
Expand All @@ -67,11 +65,11 @@ function updateSwiperSettings() {
const windowWidth = window.innerWidth;

if (windowWidth >= 1440) {
swiper.pagination.destroy(); // Remove pagination
swiper.pagination.el.style.display = 'none'; // Hide pagination elements
swiper.pagination.destroy();
swiper.pagination.el.style.display = 'none';
} else {
swiper.pagination.init(); // Reinitialize pagination
swiper.pagination.el.style.display = ''; // Show pagination elements
swiper.pagination.init();
swiper.pagination.el.style.display = '';
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/scss/reviews.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
height: 230px;
padding: 10px 0 3px 16px;

// border: 1px solid red;
@include media(desktop) {
padding: 64px 0 3px 16px;
height: 300px;
padding: 64px 2px 2px 2px;
height: 100%;
}
}

Expand All @@ -28,7 +27,7 @@
align-items: center;
gap: 36px;

width: 280px;
width: 282px;
height: 180px;
border-radius: 16px;
outline: 1px solid $_yellow_color;
Expand Down

0 comments on commit 0ea98a3

Please sign in to comment.