-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinicio.html
99 lines (78 loc) · 2.41 KB
/
inicio.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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sobre Mim</title>
<style>body {
background-color: rgb(50, 123, 207);
}
</style>
<style>header {
font-family: 'Franklin Gothic Medium';
color: white;
font-size: 22px;
text-align: center;
}
</style>
<style>nav {
font-family: 'Verdana';
font-size: 20px;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1> Página Incrível Sobre o João <hr/>
</h1>
</header>
<nav>
<a href="indice/biografia.html" > Sobre mim | </a>
<a href="indice/curiosidade1.html" > Curiosidade #1 | </a>
<a href="indice/curiosidade2.html" > Curiosidade #2 | </a>
<a href="indice/curiosidade3.html" > Curiosidade #3 </a>
</nav>
<section id="conteudo"> </section>
<style>
.footer {
position: fixed;
left: 10px;
bottom: 10px;
width: 100%;
}
.footer button {
background-color: rgb(48, 48, 48);
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}
</style>
<div class="footer">
<button onclick = "mudaCor()" type="button">Modo escuro</button>
</div>
<script>
function mudaCor() {
const claro = "rgb(50, 123, 207)";
const escuro = "rgb(33, 48, 65)";
document.body.style.background == claro? document.body.style.background = escuro : document.body.style.background = claro;
}
</script>
<script>
document.querySelectorAll('a').forEach(link => {
link.onclick = function(e) {
e.preventDefault()
const conteudo = document.getElementById('conteudo')
fetch(link.href)
.then(resp => resp.text())
.then(html => conteudo.innerHTML = html)
}
})
</script>
</body>
</html>