-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (98 loc) · 4.25 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="pt-MZ">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TechView - Portal de Tecnologia</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="assets/css/main.css"/>
</head>
<body>
<section id="header">
<nav class="navbar" role="navigation" aria-label="main navigation" style="background-color: #ccc;">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="#">
<h2>TechView</h2>
<!-- <img src="https://bulma.io/images/bulma-logo.png" width="112" height="28"> -->
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item">
Home
</a>
<a class="navbar-item">
Tecnologia
</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
Notícias
</a>
<div class="navbar-dropdown">
<a class="navbar-item">
Jogos
</a>
<a class="navbar-item">
Smartphones
</a>
<a class="navbar-item">
Contact
</a>
<hr class="navbar-divider">
<a class="navbar-item">
Diversão
</a>
</div>
</div>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-light">
Entrar
</a>
<a class="button is-primary">
<strong>Registar</strong>
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<section id="main-content">
<div class="container" style="text-align: center;">
<h1>TechView</h1>
<h4>Portal de Tecnologia</h4>
</div>
</section>
</section>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});
</script>
</body>
</html>