improved workflow

This commit is contained in:
iaphetes 2024-12-20 12:17:18 +01:00
parent 340833ea7b
commit a1de20f0ec
5 changed files with 126 additions and 48 deletions

View file

@ -30,3 +30,16 @@ textarea.addEventListener('input', ()=> {
// });
});
document.getElementById("hide-sidebar").onclick = function() {toggle_visibility("sidebar");};
function toggle_visibility(id) {
if (document.getElementById(id).style.visibility == "hidden"){
document.getElementById(id).style.visibility = "visible";
var style = window.getComputedStyle(document.body);
document.getElementById(id).style.width = style.getPropertyValue("--sidebar-width");
}else{
document.getElementById(id).style.visibility = "hidden";
document.getElementById(id).style.width = 0;
}
}