-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
63 lines (59 loc) · 2.05 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
// --------------------- NAVBAR
let lastScroll = 0;
navbar = document.querySelector(".navbar");
window.addEventListener("scroll", () => {
if (window.scrollY < lastScroll) {
navbar.style.top = "0";
} else {
navbar.style.top = "-50px";
}
lastScroll = window.scrollY;
});
// --------------------- Aos Library
AOS.init();
// --------------------- TYPED library
var typed = new Typed(".typed", {
strings: [
"-- Développeur full stack --",
`Je suis en formation développeur web/mobile chez OnlineFormaPro. C'est un cursus fullstack, dans lequel j'ai choisi après divers projets de m'orienter sur les frameworks front-end, principalement. \n Initié à React (puis NextJs), je pratique actuellement VueJs et Nuxt, en stage chez bsOft.fr. \n`,
],
typeSpeed: 15,
backSpeed: 40,
smartBackspace: true,
// loop: true,
});
// BURGER MENU NEW - modal
let burger = document.querySelector(".burger");
let nav = document.querySelector(".burger-container");
burger.addEventListener("click", () => {
nav.style.display = "flex";
});
nav.addEventListener("click", () => {
nav.style.display = "none";
});
// MOUSEMOVE EVENT
let innerCursor = document.querySelector(".inner-cursor");
let outerCursor = document.querySelector(".outer-cursor");
document.addEventListener("mousemove", (e) => {
innerCursor.style.top = e.pageY + "px";
innerCursor.style.left = e.pageX + "px";
outerCursor.style.top = e.pageY + "px";
outerCursor.style.left = e.pageX + "px";
});
// DISPLAY WEBSITE LINK
const checkboxes = document.querySelectorAll('input[type="checkbox"]');
const websites = document.querySelectorAll(".company-website");
console.log(checkboxes);
checkboxes.forEach((checkbox) => {
console.log(checkbox.nextElementSibling);
checkbox.addEventListener("click", () => {
if (checkbox.checked == true) {
checkbox.nextElementSibling.style.opacity = 1;
console.log("actif");
} else {
checkbox.nextElementSibling.style.opacity = 0;
console.log("inactif");
x;
}
});
});