Fix styling on small screens
This commit is contained in:
parent
b8e880cd29
commit
d70bb80c39
2 changed files with 10 additions and 10 deletions
|
|
@ -17,8 +17,8 @@ export function renderGameBoardHtml(
|
|||
}
|
||||
|
||||
// Calculate top and left for absolute positioning, offset by half the intersection div size
|
||||
const top = row * 30;
|
||||
const left = col * 30;
|
||||
const top = row * 7.142857142857142;
|
||||
const left = col * 7.142857142857142;
|
||||
|
||||
// HTMX attributes for making a move
|
||||
const wsAttrs = isPlayerToPlay && !stone ? `ws-send="click"` : '';
|
||||
|
|
@ -29,7 +29,7 @@ export function renderGameBoardHtml(
|
|||
class="intersection"
|
||||
data-row="${row}"
|
||||
data-col="${col}"
|
||||
style="top: ${top}px; left: ${left}px;"
|
||||
style="top: ${top}%; left: ${left}%;"
|
||||
${wsAttrs}
|
||||
>
|
||||
${stoneHtml}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue