fix: restore flex layout on #game-content wrapper
All checks were successful
CI / Deploy / test (pull_request) Successful in 17s
CI / Deploy / lint (pull_request) Successful in 27s
CI / Deploy / deploy (pull_request) Has been skipped

The SSE patching refactor (0808c4d) wrapped game elements in a bare
<div id="game-content"> without propagating the flex classes from
<main>. This broke center-alignment and vertical spacing for both
Connect 4 and Snake game pages.
This commit is contained in:
Ryan Hamamura
2026-03-11 10:35:29 -10:00
parent 2ad0abaf44
commit 7a1c91c858
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ templ GamePage(g *connect4.Game, myColor int, messages []chat.Message, chatCfg c
} }
templ GameContent(g *connect4.Game, myColor int, messages []chat.Message, chatCfg chatcomponents.Config) { templ GameContent(g *connect4.Game, myColor int, messages []chat.Message, chatCfg chatcomponents.Config) {
<div id="game-content"> <div id="game-content" class="flex flex-col items-center gap-4">
@sharedcomponents.LiveClock() @sharedcomponents.LiveClock()
@sharedcomponents.BackToLobby() @sharedcomponents.BackToLobby()
@sharedcomponents.StealthTitle("text-3xl font-bold") @sharedcomponents.StealthTitle("text-3xl font-bold")

View File

@@ -43,7 +43,7 @@ templ GamePage(sg *snake.SnakeGame, mySlot int, messages []chat.Message, chatCfg
} }
templ GameContent(sg *snake.SnakeGame, mySlot int, messages []chat.Message, chatCfg chatcomponents.Config, gameID string) { templ GameContent(sg *snake.SnakeGame, mySlot int, messages []chat.Message, chatCfg chatcomponents.Config, gameID string) {
<div id="game-content"> <div id="game-content" class="flex flex-col items-center gap-4">
@components.LiveClock() @components.LiveClock()
@components.BackToLobby() @components.BackToLobby()
<h1 class="text-3xl font-bold">~~~~</h1> <h1 class="text-3xl font-bold">~~~~</h1>