-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (76 loc) · 3.35 KB
/
index.html
File metadata and controls
81 lines (76 loc) · 3.35 KB
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minha Trajetória Acadêmica e Profissional</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="#">Minha Jornada</a>
</div>
</nav>
<!-- Seção de Introdução -->
<section class="py-5 text-center">
<div class="container">
<h1 class="display-4">Minha Trajetória Acadêmica e Profissional</h1>
<p class="lead">Desenvolvedor back-end, especialista em ERP Protheus e estudante de Análise e Desenvolvimento de Sistemas.</p>
<img src="img.jpeg" class="img-fluid w-50 mt-4" alt="Responsive image">
</div>
</section>
<!-- Formulário de Contato -->
<section class="py-5">
<div class="container">
<h2 class="text-center mb-4">Entre em Contato</h2>
<form id="contactForm">
<div class="mb-3">
<label for="name" class="form-label">Nome</label>
<input type="text" class="form-control" id="name" placeholder="Seu nome" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">E-mail</label>
<input type="email" class="form-control" id="email" placeholder="seuemail@exemplo.com" required>
</div>
<div class="mb-3">
<label for="message" class="form-label">Mensagem</label>
<textarea class="form-control" id="message" rows="4" placeholder="Sua mensagem" required></textarea>
</div>
<button type="button" class="btn btn-primary" id="submitBtn">Enviar</button>
</form>
</div>
</section>
<!-- Script para enviar o formulário usando fetch -->
<script>
document.getElementById('submitBtn').addEventListener('click', function() {
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const message = document.getElementById('message').value;
// Função fetch para enviar os dados via POST
fetch('https://seu-endpoint.com/api/contato', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: name,
email: email,
message: message
})
})
.then(response => response.json())
.then(data => {
alert('Mensagem enviada com sucesso!');
})
.catch(error => {
console.error('Erro:', error);
alert('Houve um problema ao enviar a mensagem.');
});
});
</script>
<!-- Bootstrap JS e dependências (opcional) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>