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 21, 2024
1 parent 0baf650 commit d423245
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 @@ -180,6 +180,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 d423245

Please sign in to comment.