diff --git a/css/core.css b/css/core.css index 0075d73..21fbaa6 100644 --- a/css/core.css +++ b/css/core.css @@ -2,7 +2,7 @@ body { font-family: "Ubuntu Mono"; - padding: 10px; + padding: 0px; margin: 0; background: rgb(21, 21, 22); color: white; @@ -59,7 +59,7 @@ div#header-title { } #header { - padding: 0 8px; + padding: 8px 16px; margin-bottom: 32px; } #header { @@ -76,6 +76,7 @@ div#header-title { transform: translateX(-50%); width: var(--canvasWidth); display: flex; + overflow-x: auto; justify-content: space-evenly; } diff --git a/index.html b/index.html index c45de78..d125277 100644 --- a/index.html +++ b/index.html @@ -60,38 +60,37 @@ + + N/A +
- - N/A - - - - - - -
-
-
+ + + + +
+
+ diff --git a/js/core.js b/js/core.js index e3be1dc..66304e8 100644 --- a/js/core.js +++ b/js/core.js @@ -83,12 +83,6 @@ Canvas.prototype.resize = function () { this.elem.width = this.width; this.elem.height = this.height; - if(document.querySelector("#game") !== null) - document.querySelector("#game").setAttribute("style", ` - width: ${this.width * this.upscale}px; - height: ${this.height * this.upscale}px; - `); - this.render(); } @@ -221,7 +215,7 @@ Canvas.prototype.click = function () { this.firstY = this.pageY; } -var canvas = new Canvas(240, 135, 4); +var canvas = new Canvas(Math.floor(window.innerWidth / 4.5), Math.floor(window.innerHeight / 6.5), 4); var handler = new TickHandler(canvas); setInterval(() => { diff --git a/js/tile.js b/js/tile.js index 0805cbe..136d54d 100644 --- a/js/tile.js +++ b/js/tile.js @@ -81,7 +81,7 @@ TileManager.prototype.loadSet = function (namespace, tiles) { this.row2.appendChild(elem2); elem.onclick = function (e) { - document.querySelectorAll("#game .selected-group").forEach(function (e) { e.classList.remove("selected-group") }) + document.querySelectorAll(".selected-group").forEach(function (e) { e.classList.remove("selected-group") }) e.target.classList.add("selected-group"); elem2.classList.add("selected-group"); }