hide 'main' when playing games
This commit is contained in:
parent
0c4c6fe58c
commit
2f4f756a91
|
|
@ -1,3 +1,7 @@
|
|||
main.game {
|
||||
display: none;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ function createCanvas(): HTMLCanvasElement {
|
|||
canvas.tabIndex = 0
|
||||
|
||||
const main = document.querySelector("main")
|
||||
main?.classList.add("game")
|
||||
main?.parentNode?.insertBefore(canvas, main)
|
||||
|
||||
return canvas
|
||||
|
|
@ -143,6 +144,9 @@ function endGame() {
|
|||
|
||||
if (oldMode === "tall") browserCommands.mode?.()
|
||||
|
||||
const main = document.querySelector("main")
|
||||
main?.classList.remove("game")
|
||||
|
||||
canvas.classList.remove("active")
|
||||
canvas.style.height = HEIGHT / 2 + "px"
|
||||
canvas.style.width = WIDTH / 2 + "px"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user