Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianoJSB committed Feb 23, 2024
1 parent 0f9335a commit 161b2cb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
26 changes: 26 additions & 0 deletions js/form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const form = document.querySelector('.form')
form.addEventListener('submit',eve=>{

eve.preventDefault()

const successfully = document.getElementById('successfully')
const name = document.getElementById('name').value
const email = document.getElementById('email').value
const message = document.getElementById('message').value
const body = `Name:${name}<br>
Email:${email}<br>
Message:${message}
`

Email.send({
Host : "smtp.elasticemail.com",
Username : "[email protected]",
Password : "80352459D6CD1AF3AC344B489223F4DEEE8F",
To : '[email protected]',
From : '[email protected]',
Subject : "Portfolio",
Body : `${body}`
}).then(() => successfully.style.display = "flex");

form.reset();
})
14 changes: 14 additions & 0 deletions js/menu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const nav = document.querySelector("#nav");
const abrir = document.querySelector("#abrir");
const cerrar = document.querySelector("#cerrar");
const imagen = document.querySelector("#logoNav");

abrir.addEventListener("click", () => {
nav.classList.add("visible");
imagen.classList.add("visible");
})

cerrar.addEventListener("click", () => {
nav.classList.remove("visible");
imagen.classList.remove("visible");
})

0 comments on commit 161b2cb

Please sign in to comment.