Skip to content

Commit

Permalink
Commit da versão 7 dos arquivos da "Página Cyberpunk Edgerunners"
Browse files Browse the repository at this point in the history
O que foi mudado?

  - Adicionado a funcionalidade de uma barra de navegação para dispositivos desktop
  • Loading branch information
juletopi authored Jul 23, 2024
1 parent 88fade8 commit 21082e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ document.addEventListener('DOMContentLoaded', () => {
window.addEventListener('scroll', () => {
const currentScroll = window.pageYOffset;

if (window.innerWidth > 768) { // Ajuste o valor conforme necessário
if (currentScroll > lastScrollTop && currentScroll > 10) {
if (Math.abs(currentScroll - lastScrollTop) > hideThreshold) {
if (currentScroll > lastScrollTop) {
// Rolagem para baixo
navbar.classList.add('hide');
navbar.classList.remove('show');
Expand Down

0 comments on commit 21082e1

Please sign in to comment.