Skip to content

Commit

Permalink
Fix scrolling on long hamburger navigation on mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonamaya82 committed Feb 20, 2024
1 parent dd0415f commit 760fc9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion css/style.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions javascripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ const freedomScripts = () => {
if(scrollPos > 60 && scrollDirection == 'down') {
mainHeader.style.top = - (userBarHeight + mainHeaderTopBar.offsetHeight) + 'px';
menuDrawer.style.top = mainHeaderMainBar.offsetHeight + 'px';
menuDrawer.style.height = 'calc(100% - ' + mainHeaderMainBar.offsetHeight + 'px)';
} else {
mainHeader.style.top = 0;
menuDrawer.style.top = mainHeader.offsetHeight + 'px';
menuDrawer.style.height = 'calc(100% - ' + mainHeader.offsetHeight + 'px)';
}
}

Expand Down
1 change: 1 addition & 0 deletions sass/components/navigation/_menu-drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
list-style: none;
margin-left: 0;
padding-left: 0;
padding-bottom: 20px;
}

li {
Expand Down

0 comments on commit 760fc9d

Please sign in to comment.