-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from LesiaUKR/reviews
Reviews
- Loading branch information
Showing
11 changed files
with
286 additions
and
100 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
const swiper = new Swiper( | ||
'.swiper', | ||
// If we need pagination | ||
{ | ||
pagination: { | ||
el: '.swiper-pagination', | ||
clickable: true, | ||
}, | ||
// Включение/отключение | ||
// перетаскивания на ПК | ||
simulateTouch: true, | ||
// Курсор перетаскивания | ||
grabCursor: true, | ||
|
||
// Управление клавиатурой | ||
keyboard: { | ||
// Включить\выключить | ||
enabled: true, | ||
// Включить\выключить | ||
// только когда слайдер | ||
// в пределах вьюпорта | ||
onlyInViewport: true, | ||
// Включить\выключить | ||
// управление клавишами | ||
// pageUp, pageDown | ||
pageUpDown: true, | ||
}, | ||
|
||
// Управление колесом мыши | ||
mousewheel: { | ||
// Чувствительность колеса мыши | ||
sensitivity: 1, | ||
}, | ||
// Количество слайдов для показа | ||
slidesPerView: 1.07, | ||
// Отключение функционала | ||
// если слайдов меньше чем нужно | ||
watchOverflow: true, | ||
|
||
// Отступ между слайдами | ||
spaceBetween: 16, | ||
|
||
// Количество пролистываемых слайдов | ||
slidesPerGroup: 1, | ||
|
||
// Активный слайд по центру | ||
// centeredSlides: true, | ||
freemode: true, | ||
|
||
breakpoints: { | ||
// Define breakpoints | ||
1440: { | ||
// Desktop size | ||
slidesPerView: 4.18, | ||
spaceBetween: 36, | ||
|
||
navigation: { | ||
nextEl: '.swiper-button-next', | ||
prevEl: '.swiper-button-prev', | ||
}, | ||
}, | ||
}, | ||
} | ||
); | ||
|
||
function updateSwiperSettings() { | ||
const windowWidth = window.innerWidth; | ||
|
||
if (windowWidth >= 1440) { | ||
swiper.pagination.destroy(); // Remove pagination | ||
swiper.pagination.el.style.display = 'none'; // Hide pagination elements | ||
} else { | ||
swiper.pagination.init(); // Reinitialize pagination | ||
swiper.pagination.el.style.display = ''; // Show pagination elements | ||
} | ||
} | ||
|
||
// Call the function on page load | ||
updateSwiperSettings(); | ||
|
||
// Add an event listener to update settings on resize | ||
window.addEventListener('resize', updateSwiperSettings); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import './js/redirect.js'; | ||
import { burgerMenu } from './js/burger.js'; | ||
// import './js/reviews.js'; | ||
import './js/swiper.js'; | ||
|
||
burgerMenu(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,67 @@ | ||
<section class="section" id="reviews"> | ||
<div class="container"> | ||
<div class="review-container container"> | ||
<h2 class="section-title" text="Reviews">Reviews</h2> | ||
<div class="swiper swiper-wrap"> | ||
<div class="swiper-wrapper"> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
Absolutely addictive! Love the colorful levels and the fun | ||
storyline. It’s more than just matching! | ||
</p> | ||
<p class="review-user">CandyCrusher101</p> | ||
</div> | ||
</div> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
A sweet twist on match-3 games. Decorating the factory is my | ||
favorite part. | ||
</p> | ||
<p class="review-user">ChocoFanatic56</p> | ||
</div> | ||
</div> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
Great for all ages! My kids and I enjoy playing and seeing what’s | ||
next in the factory. | ||
</p> | ||
<p class="review-user">FamilyGamer88</p> | ||
</div> | ||
</div> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
The graphics are fantastic, and the puzzles are challenging but | ||
fair. Keeps me coming back! | ||
</p> | ||
<p class="review-user">PuzzleMaster99</p> | ||
</div> | ||
</div> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
I really feel like I’m part of the Willy Wonka story. So many | ||
creative levels! | ||
</p> | ||
<p class="review-user">BookLover415</p> | ||
</div> | ||
</div> | ||
<div class="swiper-slide"> | ||
<div class="review-item"> | ||
<p class="review-text"> | ||
Engaging and beautifully designed. The events are super fun too! | ||
</p> | ||
<p class="review-user">SweetToothSam</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="swiper-pagination"></div> | ||
|
||
<!-- Добавляем если нам нужны стрелки управления --> | ||
<div class="swiper-button-prev"></div> | ||
<div class="swiper-button-next"></div> | ||
</div> | ||
</div> | ||
<ul class="review-list"></ul> | ||
<div class="slider-indicators"></div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.