Skip to content

Commit

Permalink
feat(web): change scroll effect
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Oct 2, 2024
1 parent bc6657b commit 25a2dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/frontend/web/app/layouts/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const SearchHeight = NavHeight;

function updateHeroLayout() {
const y = document.documentElement.scrollTop;
const paddingTop = y <= MaxPaddingTop ? MaxPaddingTop - y : 0;
const paddingBottom = Math.max(
y > MaxPaddingTop ? MaxPaddingBottom - (y - MaxPaddingTop) : MaxPaddingBottom,
const paddingTop = Math.max(
y > MaxPaddingBottom ? MaxPaddingTop - (y - MaxPaddingBottom) : MaxPaddingTop,
0
);
const paddingBottom = y <= MaxPaddingBottom ? MaxPaddingBottom - y : 0;
const height = paddingTop + SearchHeight + paddingBottom;

const hero = document.querySelector('.hero') as HTMLElement;
Expand Down

0 comments on commit 25a2dae

Please sign in to comment.