From 60387e9436a010763e14441ca41bf4a6681ebe0e Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sat, 25 Mar 2023 22:57:03 +0100 Subject: [PATCH] Navbar should stay on top when scrolled all the way and also should have no shadow #587 --- src/frontend/app/ui/frame/frame.component.css | 1 + src/frontend/app/ui/frame/frame.component.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/app/ui/frame/frame.component.css b/src/frontend/app/ui/frame/frame.component.css index 31835e31..78515612 100644 --- a/src/frontend/app/ui/frame/frame.component.css +++ b/src/frontend/app/ui/frame/frame.component.css @@ -16,6 +16,7 @@ position: relative; transform: translateY(0); transition: transform 0s; + box-shadow: none; } .hide-navbar { diff --git a/src/frontend/app/ui/frame/frame.component.ts b/src/frontend/app/ui/frame/frame.component.ts index b51366dd..9380a763 100644 --- a/src/frontend/app/ui/frame/frame.component.ts +++ b/src/frontend/app/ui/frame/frame.component.ts @@ -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