refine: smart nav thresholds and improved transitions
This commit is contained in:
@ -154,7 +154,7 @@ const onScroll = () => {
|
||||
scrolled.value = currentScrollY > 40
|
||||
|
||||
// Lógica de ocultar/mostrar según dirección
|
||||
if (currentScrollY > lastScrollY && currentScrollY > 150) {
|
||||
if (currentScrollY > lastScrollY && currentScrollY > 80) {
|
||||
// Scroll hacia abajo y ya pasamos el hero: ocultar
|
||||
navVisible.value = false
|
||||
} else {
|
||||
@ -204,11 +204,14 @@ const scrollToInstall = () =>
|
||||
.nav {
|
||||
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
|
||||
height: 160px; display: flex; align-items: center; padding: 0 24px;
|
||||
transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: transform .4s cubic-bezier(0.4, 0, 0.2, 1),
|
||||
background .4s cubic-bezier(0.4, 0, 0.2, 1),
|
||||
height .4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
will-change: transform, background, height;
|
||||
}
|
||||
.nav--hidden {
|
||||
transform: translateY(-100%);
|
||||
pointer-events: none;
|
||||
}
|
||||
.nav--solid {
|
||||
background: rgba(255,255,255,.95);
|
||||
@ -438,7 +441,7 @@ const scrollToInstall = () =>
|
||||
/* Tablet + */
|
||||
@media (min-width: 768px) {
|
||||
.nav { padding: 0 40px; }
|
||||
.hero { padding: 100px 48px 88px; }
|
||||
.hero { padding: 180px 48px 88px; }
|
||||
.nav__link { display: block; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user