-
Notifications
You must be signed in to change notification settings - Fork 1
/
contact.pt-br.html
39 lines (36 loc) · 1.1 KB
/
contact.pt-br.html
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
---
title: Contato
lang: pt-br
permalink: /contact/
---
<form id="site-contact" onsubmit="sendEmail()">
<div id="form-name">
<label for="name">Nome</label>
<input type="text" name="name" id="name" placeholder="Seu Nome" required>
</div>
<div id="form-email">
<label for="email">Email</label>
<input type="email" name="email" id="email" placeholder="Seu Email"
required>
</div>
<div id="form-message">
<label for="message">Mensagem</label>
<textarea name="message" id="message"
placeholder="Gostei muito do seu portfolio, podemos marcar uma reunião?"
required></textarea>
</div>
<button type="submit">Enviar</button>
</form>
<script>
const sendEmail = () => {
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
const mailTo = "mailto:{{ site.data.contact.email }}";
const params = {
subject: "Contato Portfolio - " + name + "(" + email + ")",
body: message
}
window.location.href = `${mailTo}?subject=${params.subject}&body=${params.body}`;
}
</script>