Commit d9f401c4 authored by David's avatar David

fix(right-sidebar-css): update main javascript file to only apply right...

fix(right-sidebar-css): update main javascript file to only apply right sidebar class when an aside is present
parent 92c62ed1
...@@ -201,9 +201,15 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -201,9 +201,15 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
if (bootstrapBreakpoint === 'sm' || bootstrapBreakpoint === 'xs') { if (bootstrapBreakpoint === 'sm' || bootstrapBreakpoint === 'xs') {
const $rightSidebar = $('aside.right-sidebar, .layout-page'); const $rightSidebar = $('aside.right-sidebar');
const $layoutPage = $('.layout-page');
$rightSidebar.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed'); if ($rightSidebar.length > 0) {
$rightSidebar.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed');
$layoutPage.removeClass('right-sidebar-expanded').addClass('right-sidebar-collapsed');
} else {
$layoutPage.removeClass('right-sidebar-expanded right-sidebar-collapsed');
}
} }
// prevent default action for disabled buttons // prevent default action for disabled buttons
......
---
title: update main javascript file to only apply right sidebar class when an aside
is present
merge_request:
author: Oregand
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment