-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (41 loc) · 1.51 KB
/
index.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
40
41
42
43
44
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Consumo API Digimon</title>
<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<main class="container">
<h1 style="display: flex; justify-content: center; color: purple; font-size: 60px; text-shadow: 1px 2px 2px rgba(0, 0, 0, 0.767);"
class="my-4">Digimon - Digitais</h1>
<ul class="digimons"></ul>
</main>
<hr>
<footer>
<div class="container text-center">
<p>© 2024 Geração Tech - GT02 SUL</p>
</div>
</footer>
<script>
let divDigimons = document.querySelector(".digimons")
fetch('https://digimon-api.vercel.app/api/digimon').then((resposta) => {
resposta.json().then((criaturas) => {
criaturas.forEach((digimon) => {
divDigimons.innerHTML += `
<li>
<div class="descricao">
<img src="${digimon.img}">
<h3>${digimon.name}</h3>
</div>
</li>
`
})
})
})
</script>
</body>
</html>