Skip to content

Commit 7987549

Browse files
Adicionando Menu no site
1 parent db04849 commit 7987549

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

_includes/header-pt.html

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
<header class="row">
2-
<img id="logo" height = 100px alt="datazoom" src="{{ site.baseurl }}/assets/img/banner_dzam.png" class = "center-img">
3-
<script>
2+
<!-- Logo -->
3+
<img id="logo" height="100px" alt="datazoom"
4+
src="{{ site.baseurl }}/assets/img/banner_dzam.png"
5+
class="center-img">
6+
</header>
7+
8+
<!-- 🔽 MENU AQUI, logo embaixo da faixa branca -->
9+
<nav>
10+
<ul class="menu">
11+
<li><a class="menu-item" href="index.html">Início</a></li>
12+
<li><a class="menu-item" href="sobre.html">Sobre</a></li>
13+
<li><a class="menu-item" href="contato.html">Contato</a></li>
14+
<li><a class="menu-item" href="projetos.html">Projetos</a></li>
15+
</ul>
16+
</nav>
17+
18+
<!-- Script para marcar link ativo -->
19+
<script>
420
document.addEventListener('DOMContentLoaded', function() {
5-
// Get current page filename
621
const currentPage = window.location.pathname.split('/').pop() || 'index.html';
7-
8-
// Remove active class from all menu items
922
const menuItems = document.querySelectorAll('.menu-item');
1023
menuItems.forEach(item => item.classList.remove('active'));
11-
12-
// Add active class to current page link
1324
const currentLink = document.querySelector(`a[href="${currentPage}"]`);
1425
if (currentLink) {
1526
currentLink.classList.add('active');
1627
}
1728
});
18-
</script>
29+
</script>
1930
</header>
2031
<div class="row">
2132
</div>

0 commit comments

Comments
 (0)