-
Notifications
You must be signed in to change notification settings - Fork 4
/
script.js
69 lines (56 loc) · 1.32 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
window.addEventListener('resize', () => {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty("--vh", `${vh}px`);
});
const swiper_background = new Swiper("#background", {
direction: "vertical",
// centerSlide
slidesPerView: 1,
centeredSlides: false,
spaceBetween: 0,
//loop
loop: false,
//nextSlide
mousewheel: true,
//slideSpeed
speed: 1000,
slidesOffsetBefore: 0,
slidesOffsetAfeter: 0,
observer: true,
observeParents: true,
on: {
reachEnd: function () {
const image = document.getElementById("arrow");
image.style.transition = "visibility 0.1s";
image.style.visibility = "hidden";
},
slideChange: function () {
const swiper = this;
const image = document.getElementById("arrow");
if (swiper.isEnd) {
image.style.transition = "visibility 0.1s";
image.style.visibility = "hidden";
} else {
image.style.transition = "visibility 0.1s";
image.style.visibility = "visible";
}
},
},
});
const swiper = new Swiper("#page2_swiper", {
// centerSlide
slidesPerView: "1.1",
centeredSlides: false,
spaceBetween: 10,
//loop
loop: false,
//nextSlide
mousewheel: true,
//slideSpeed
speed: 1500,
breakpoints: {
375: {
slidesPerView: "1.25"
}
}
});