mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-31 12:56:11 +01: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")
|
!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`
|
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';
|
let value = localStorage.getItem('crafty-sidebar-expanded') !== 'false';
|
||||||
$('body').toggleClass('sidebar-icon-only', !value);
|
$('body').toggleClass('sidebar-icon-only', !value);
|
||||||
localStorage.setItem('crafty-sidebar-expanded', value);
|
localStorage.setItem('crafty-sidebar-expanded', value);
|
||||||
} else if (isLargeBreakpoint()) {
|
|
||||||
$('body').toggleClass('sidebar-icon-only', true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user