Skip to content

Commit

Permalink
Merge branch 'hello-social' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
xxiicode committed Mar 27, 2024
2 parents 4fa6757 + e4951a4 commit eb9d8f4
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 328 deletions.
20 changes: 10 additions & 10 deletions app/docs-nav-v3.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
console.log("Soy el docs-nav-v3.js");

/* mobil nav */
/* eventListener para el hello-nav para manejar el display con clases */

const navOpener = document.querySelector('.nav-hamburger')
const navCloser = document.querySelector('.nav-close')
const navLinks = document.querySelector('.nav-links')

navOpener.addEventListener('click', () => {
navLinks.classList.add('open-nav')
navCloser.classList.add('open-nav')
navOpener.classList.add('close-nav')
/* navCloser.classList.add('open-nav') */
/* navOpener.classList.add('close-nav') */
})
navCloser.addEventListener('click', () => {
navLinks.classList.remove('open-nav')
navCloser.classList.remove('open-nav')
navOpener.classList.remove('close-nav')
/* navCloser.classList.remove('open-nav')
navOpener.classList.remove('close-nav') */
})

/* position fixed on nav */
/* Agrega el .position-fixed al nav */

document.addEventListener("DOMContentLoaded", function () {
let nav = document.querySelector(".nav-links");
let hamburger = document.querySelector(".nav-hamburger");
let buttons = document.querySelector(".nav-buttons");

window.addEventListener("scroll", function () {
let scroll = window.scrollY;

if (window.innerWidth > 768) { // Verifica el ancho de la ventana
if (window.innerWidth > 768) {
if (scroll >= 60) {
nav.classList.add("position-fixed");
} else {
Expand All @@ -35,9 +35,9 @@ document.addEventListener("DOMContentLoaded", function () {
}

if (scroll >= 60) {
hamburger.style.top = '18px';
buttons.style.top = '18px';
} else {
hamburger.style.top = '168px';
buttons.style.top = '55px';
}
});
});
Expand Down
4 changes: 1 addition & 3 deletions app/docs-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ nav ul li a {
right: unset;
}

button.hamburger, button.close {
display: none;
}


main section.cover {
display: grid;
Expand Down
Loading

0 comments on commit eb9d8f4

Please sign in to comment.