Skip to content

Commit

Permalink
Re-set space between main content and footer on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Dananji Withana committed Feb 2, 2024
1 parent 18c9ece commit 8f459e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/assets/javascripts/avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ $(document).ready(function () {
// Set CSS to push the page content above footer
$('.content-wrapper').css('padding-bottom', $('#footer').css('height'));

// Re-set the space between content-wrapper and footer on window resize.
// With this the main content height is adjusted when orientation changes when
// using mobile devices, avoiding main content bleeding into the footer.
window.addEventListener("resize", () => {
$('.content-wrapper').css('padding-bottom', $('#footer').css('height'));
}, true);


/* Toggle CSS classes for global search form */
const $searchWrapper = $('.global-search-wrapper');
const $searchSubmit = $('.global-search-submit');
Expand Down

0 comments on commit 8f459e5

Please sign in to comment.