mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add Collapse Memory for sidebar on LargeBreakpoint
This commit is contained in:
parent
002d89934e
commit
905be275ed
@ -197,6 +197,12 @@ if ($("canvas").length) {
|
||||
!body.hasClass("sidebar-icon-only")
|
||||
);
|
||||
}
|
||||
if (vw >= 992 && vw < 1200) {
|
||||
localStorage.setItem(
|
||||
"crafty-sidebar-expanded",
|
||||
!body.hasClass("sidebar-icon-only")
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -53,12 +53,10 @@
|
||||
|
||||
More code in `app/frontend/static/assets/js/shared/misc.js` and `app/frontend/templates/base.html`
|
||||
*/
|
||||
if (isExtraLargeBreakpoint()) {
|
||||
if (isLargeBreakpoint()) {
|
||||
let value = localStorage.getItem('crafty-sidebar-expanded') !== 'false';
|
||||
$('body').toggleClass('sidebar-icon-only', !value);
|
||||
localStorage.setItem('crafty-sidebar-expanded', value);
|
||||
} else if (isLargeBreakpoint()) {
|
||||
$('body').toggleClass('sidebar-icon-only', true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user