Skip to content

Commit

Permalink
on resizing the window hide the menu if the new window size is small
Browse files Browse the repository at this point in the history
  • Loading branch information
bsatarnejad committed Oct 23, 2024
1 parent 327b5d2 commit 6a074fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ See COPYRIGHT and LICENSE files for more details.
$('.can-hide-navigation').addClass('hidden-navigation');
}

window.addEventListener('resize', function() {
if (window.innerWidth < 1012) {
$('.can-hide-navigation').addClass('hidden-navigation');
}
});

if (mainMenuCollapsed === 'true') {
savedMainMenuWidth = 0;
}
Expand Down

0 comments on commit 6a074fe

Please sign in to comment.