diff --git a/src/app/components/chess-board/chess-board.component.css b/src/app/components/chess-board/chess-board.component.css index 70c0bbc..30bf393 100644 --- a/src/app/components/chess-board/chess-board.component.css +++ b/src/app/components/chess-board/chess-board.component.css @@ -1,6 +1,6 @@ .board-shell { - width: min(100%, 82dvh, 760px); - max-width: calc(100dvw - 2rem); + --bottom-frame-height: clamp(18px, 4.5cqh, 40px); + width: min(98cqw, calc(98cqh - var(--bottom-frame-height))); margin: 0 auto; } @@ -51,8 +51,10 @@ } .board-bottom { + height: var(--bottom-frame-height); width: 100%; display: block; + object-fit: fill; border: 2px solid #5A2C28; border-top: 0; border-radius: 0 0 10px 10px; diff --git a/src/app/components/chess-piece/chess-piece.component.css b/src/app/components/chess-piece/chess-piece.component.css index d1a9977..92749ff 100644 --- a/src/app/components/chess-piece/chess-piece.component.css +++ b/src/app/components/chess-piece/chess-piece.component.css @@ -1,6 +1,6 @@ .piece { - width: 90%; - height: 90%; + width: clamp(40px, 9cqh, 130px); + height: clamp(40px, 9cqh, 130px); display: block; object-fit: contain; pointer-events: none; diff --git a/src/app/pages/game/game.component.css b/src/app/pages/game/game.component.css index 6eca3dc..8e32907 100644 --- a/src/app/pages/game/game.component.css +++ b/src/app/pages/game/game.component.css @@ -40,35 +40,9 @@ h2 { .top-section { display: grid; - gap: 0.75rem; - margin-bottom: 0.75rem; - flex: 0 0 auto; -} - -.state-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); - gap: 0.75rem; + gap: 0.5rem; margin-bottom: 0.5rem; -} - -.panel { - background: #B9C2DA; - border-radius: 10px; - border: 2px solid #5A2C28; - padding: 0.75rem; -} - -.panel p { - margin: 0.3rem 0; -} - -code { - display: block; - background: #E1EAA9; - border-radius: 8px; - padding: 0.5rem; - overflow-wrap: anywhere; + flex: 0 0 auto; } .move-form { @@ -78,11 +52,17 @@ code { gap: 0.75rem; } +.board-hint { + margin: 0; + color: #5A2C28; +} + .board-section { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; + container-type: size; padding: clamp(0.35rem, 1vw, 0.75rem); border-radius: 10px; border: 2px solid #5A2C28; diff --git a/src/app/pages/game/game.component.html b/src/app/pages/game/game.component.html index f6d90d6..05559dc 100644 --- a/src/app/pages/game/game.component.html +++ b/src/app/pages/game/game.component.html @@ -10,29 +10,12 @@
Loading game state...
} @else if (state) {Turn: {{ state.turn }}
-Status: {{ state.status }}
-FEN:
-{{ state.fen }}
- PGN: {{ state.pgn || 'No moves yet' }}
-Played UCI: {{ state.moves.length ? state.moves.join(', ') : 'None' }}
-Legal UCI: {{ legalMoveUciList.length ? legalMoveUciList.join(', ') : 'None' }}
-Board: click your piece to highlight legal targets.
-Click your piece to highlight legal targets.