-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
54 lines (50 loc) · 1.53 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
const nav = document.querySelector("nav");
window.addEventListener("scroll", function () {
nav.classList.toggle("sticky", window.scrollY > 50);
});
var typingEffect = new Typed(".multiText", {
strings: ["programador", "designer", "autodidata", "leitor", "atleta"],
loop: true,
typeSpeed: 100,
backSpeed: 100,
backDelay: 1500,
});
let menu = document.querySelector("#menu-icon"),
navitems = document.querySelector(".navItems"),
navicons = document.querySelector(".icons");
menu.onclick = () => {
menu.classList.toggle("bx-x");
navitems.classList.toggle("open");
navicons.classList.toggle("open");
};
window.onscroll = () => {
menu.classList.remove("bx-x");
navitems.classList.remove("open");
navicons.classList.remove("open");
};
document.getElementById("verCurriculo").addEventListener("click", () => {
window.open("curriculo.pdf");
});
var btn = document.getElementById("btn");
btn.addEventListener("click", function (e) {
e.preventDefault();
var email = document.getElementById("email").value,
message = document.getElementById("message").value,
phone = document.getElementById("phone").value,
body =
"Email: " +
email +
"<br/> Mensagem:" +
message +
"<br/> Número: " +
phone;
Email.send({
SecureToken: "756c46a8-e62c-4f09-9fb3-40f17e3daaab",
Subject: "Mensagem sobre Contato",
Body: body,
}).then();
alert("Mensagem Enviada com Sucesso");
document.getElementById("form").reset();
});