Skip to content

Commit

Permalink
improve behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Saamiyah committed Sep 25, 2024
1 parent dfe8d27 commit c159d93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/frontendmu-nuxt/components/site/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,15 @@ function toggleHeader() {
headerHeight
);
if (nextTransition !== currentTransition) {
if (
currentScrollPosition >= headerHeight &&
nextTransition !== currentTransition
) {
currentTransition = nextTransition;
$header.style.transform = `translateY(-${currentTransition}px)`;
}
if (currentScrollPosition > 60) {
if (currentScrollPosition > headerHeight) {
$header.classList.add(
"intersect",
"shadow-sm",
Expand Down

0 comments on commit c159d93

Please sign in to comment.