1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00

Navbar should stay on top when scrolled all the way and also should have no shadow #587

This commit is contained in:
Patrik J. Braun 2023-03-25 22:57:03 +01:00
parent ef75247f79
commit 60387e9436
2 changed files with 2 additions and 2 deletions

View File

@ -16,6 +16,7 @@
position: relative;
transform: translateY(0);
transition: transform 0s;
box-shadow: none;
}
.hide-navbar {

View File

@ -104,11 +104,10 @@ export class FrameComponent {
const down = this.lastScroll.any < scrollPosition;
const upDelay = up && this.lastScroll.down > scrollPosition + window.innerHeight * Config.Gallery.NavBar.NavbarShowDelay;
const downDelay = down && this.lastScroll.up < scrollPosition - window.innerHeight * Config.Gallery.NavBar.NavbarHideDelay;
//we are the top where the navbar by default lives
if (this.navContainer.nativeElement.offsetHeight > scrollPosition) {
// do not force move navbar up when we are scrolling up from bottom
if (this.shouldHideNavbar != false) {
if (this.shouldHideNavbar != false || scrollPosition <= 0) {
this.navbarKeepTop = true;
}
if (down) { // scroll down