-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
56 lines (51 loc) · 1.16 KB
/
main.js
File metadata and controls
56 lines (51 loc) · 1.16 KB
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
let header= document.querySelector('header');
let menu= document.querySelector('#menu-icon');
let navbar= document.querySelector('.navbar');
window.addEventListener('scroll', ()=> {
header.classList.toggle('shadow', window.scrollY > 0);
});
menu.onclick = () => {
menu.classList.toggle('bx-x');
navbar.classList.toggle('active');
}
window.onscroll = () => {
menu.classList.remove('bx-x');
navbar.classList.remove('active');
}
// Home Swiper
var swiperHome = new Swiper(".home", {
spaceBetween: 30,
centeredSlides: true,
autoplay: {
delay: 5000,
disableOnInteraction: false,
},
pagination: {
el: ".home-pagination",
clickable: true,
}
});
// Algorithms Swiper
var swiperAlgorithms = new Swiper(".Algorithms", {
slidesPerView: 4,
spaceBetween: 30,
centeredSlides: true,
pagination: {
el: ".algorithms-pagination",
clickable: true,
},
breakpoints: {
0: {
slidesPerView: 1,
},
600: {
slidesPerView: 2,
},
900: {
slidesPerView: 3,
},
1200: {
slidesPerView: 4,
}
}
});