-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
134 lines (113 loc) · 3.66 KB
/
index.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
let menuEl = document.getElementById("menu-principal")
let lang = document.querySelector("#lang")
let btnSend = document.querySelector('#send')
const menu = document.querySelector('#menu-mobile')
let menuli = document.querySelectorAll('.menuli')
const body = document.querySelector('body')
menuli.forEach(element => {
if (window.innerWidth <= 600) {
element.addEventListener('click', () => {
menu.style.display = "none"
}
)
}else {
menu.style.display = "flex"
}
})
let options= {
root: null,
rootMargin: '0px',
threshold: .5,
}
let observer = new IntersectionObserver(callback, options)
// let target = document.querySelector('#habilidades')
// observer.observe(target)
let target = document.querySelectorAll('.barra')
// let target = document.querySelectorAll('.tec')
target.forEach(element => {
observer.observe(element)
})
function callback(entries){
entries.forEach(entry => {
if (entry.isIntersecting){
entry.target.classList.add('show')
if (entry.isIntersecting) observer.unobserve(entry.target)
}else{
entry.target.classList.remove('show')
}
})
}
let options2 = {
root: null,
rootMargin: '0px',
threshold: 0,
}
// let alvo = document.querySelector('#experiencia')
// let target3 = document.querySelectorAll('.comp-iqqj6loz')
let alvo = document.querySelectorAll('.comp-iqqj6loz')
let observer2 = new IntersectionObserver(callback2, options2)
alvo.forEach(element => {
observer2.observe(element)
})
// observer2.observe(alvo)
function callback2(entries){
entries.forEach(entry => {
if (entry.isIntersecting){
entry.target.classList.add('line-efect')
// target3.forEach(element => {
// element.classList.add('line-efect')
if (entry.isIntersecting) observer2.unobserve(entry.target)
// });
}else{
// entry.target.classList.remove('')
// target3.forEach(element => {
// element.classList.remove('line-efect')
// })
}
})
}
function menuClick(){
// menuEl.classList.toggle('active')
if (menu.style.display == "flex"){
menu.style.display = "none"
}else{
menu.style.display = "flex"
// body.classList.toggle('blurred')
// menu.classList.toggle('blurred')
}
}
lang.addEventListener('click', ()=>{
if (lang.classList == 'EN'){
window.open('index.html','_self')
}else{
window.open('indexEN.html','_self')
}
})
function btnGalery(){
baloes.style.display = "block"
galeryBoton.style.display = 'none'
setTimeout(() => {
baloes.style.display = "none"
rio.style.display = 'block'
setTimeout(() => {
rio.style.display = 'none'
vale.style.display = 'block'
setTimeout(() => {
vale.style.display = 'none'
cassete.style.display = 'block'
setTimeout(() => {
cassete.style.display = 'none'
penhasco.style.display = 'block'
setTimeout(() => {
penhasco.style.display = 'none'
galeryBoton.style.display = 'block'
}, 2000);
}, 2000);
}, 2000);
}, 2000);
}, 2000);
}
function enviar(){
let divDoP = document.querySelector('#limite-footer')
divDoP.firstElementChild.style.visibility = 'visible'
}