Skip to content

Commit

Permalink
make game responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Steinke committed Feb 10, 2024
1 parent 7345f82 commit b3530ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ html, body {

/* Game field */
.game-field {
display: flex;
align-items: center;
justify-content: center;
vertical-align: middle;
height: 400px;
height: 100px;
max-width: 400px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}

@media (max-width: 600px) {
.game-field {
grid-template-columns: repeat(1, 4fr);
}
}

/* button */
Expand Down
2 changes: 1 addition & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func (g *ui) Render() app.UI {
ctx.NewAction(eventNewGame)
})
return app.Div().Class("fill", "background").Body(
gameField,
gameStateText,
newGameButton,
gameField,
)
}

Expand Down

0 comments on commit b3530ac

Please sign in to comment.