diff --git a/priv/static/client.js b/priv/static/client.js index e3c2304..07b5740 100644 --- a/priv/static/client.js +++ b/priv/static/client.js @@ -17,7 +17,7 @@ document.addEventListener("DOMContentLoaded", function () { padding-left: 5px; padding-right: 5px; border-radius: 10px; - background-color: rgba(235, 235, 235, 0.8); + background-color: #4C2B8A; display: flex; gap: 5px; justify-content: center; @@ -27,13 +27,7 @@ document.addEventListener("DOMContentLoaded", function () { right: 20px; cursor: grab;"> - - - + `; @@ -74,16 +68,16 @@ document.addEventListener("DOMContentLoaded", function () { if (debugButton.offsetTop < 0) { debugButton.style.top = debugButton.style.bottom; - }; + } if (debugButton.offsetTop + debugButton.clientHeight > window.innerHeight) { - debugButton.style.top = ''; - }; + debugButton.style.top = ""; + } if (debugButton.offsetLeft < 0) { debugButton.style.left = debugButton.style.right; - }; + } if (debugButton.offsetLeft + debugButton.clientWidth > window.innerWidth) { - debugButton.style.left = ''; - }; + debugButton.style.left = ""; + } }; const onClick = (event) => { @@ -93,14 +87,24 @@ document.addEventListener("DOMContentLoaded", function () { } }; - window.addEventListener('resize', () => { - if (debugButton.offsetLeft + debugButton.clientWidth + Number.parseInt(debugButton.style.right) > window.innerWidth) { - debugButton.style.left = ''; + window.addEventListener("resize", () => { + if ( + debugButton.offsetLeft + + debugButton.clientWidth + + Number.parseInt(debugButton.style.right) > + window.innerWidth + ) { + debugButton.style.left = ""; } - if (debugButton.offsetTop + debugButton.clientHeight + Number.parseInt(debugButton.style.bottom) > window.innerHeight) { - debugButton.style.top = ''; + if ( + debugButton.offsetTop + + debugButton.clientHeight + + Number.parseInt(debugButton.style.bottom) > + window.innerHeight + ) { + debugButton.style.top = ""; } - }) + }); debugButton.addEventListener("mousedown", onMouseDown); debugButton.addEventListener("click", onClick);