모든 게임이 남는 화면 전체를 쓰도록: 게임별 폭 상한 제거, 판·카드·말을 --play-w/--play-h에 맞춰 키움
- 카드 게임: 펠트가 남는 높이를 채우고 손패·가운데 더미·자리 크기가 화면에 따라 커짐 - 판 게임: 체스·바둑·오목 등은 높이를 다 쓰고, 장기·쿼리도·젬블로는 넓은 화면에서 조작판을 판 옆으로 - 섯다: 자리를 판 크기에 맞춘 타원 위에 고르게 두고, 많을 때 자리 크기를 줄여 8명에서도 겹치지 않게 - 바퀴벌레 포커 6명·야단법석 달리기 5명 선수 뽑기가 PC에서 넘치지 않게 - 휴대폰·태블릿(1100px 아래) 배치는 그대로 - layout-survey: 컴퓨터 넣기 버튼 기다림, 넘친 높이(px) 표시 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,8 @@ const CHESS_CSS = `
|
||||
@keyframes ch-fade { from { opacity: 0; } }
|
||||
:root[data-theme='dark'] .ch-icon-dark { filter: drop-shadow(0 0 .6px #e5e7eb) drop-shadow(0 0 .6px #e5e7eb); }
|
||||
@media (prefers-color-scheme: dark) { :root[data-theme='auto'] .ch-icon-dark { filter: drop-shadow(0 0 .6px #e5e7eb) drop-shadow(0 0 .6px #e5e7eb); } }
|
||||
/* PC: the board takes the whole play-area height minus the row(s) that can show under it (--ch-rows). */
|
||||
@media (min-width: 1100px) { .board-wrap.ch-fit { max-width: min(100%, calc(var(--play-h) - var(--ch-rows, 0px))); } }
|
||||
`;
|
||||
|
||||
function ChessBoard({ view: v, act, pending }: BoardProps<ChessView>) {
|
||||
@@ -229,7 +231,11 @@ function ChessBoard({ view: v, act, pending }: BoardProps<ChessView>) {
|
||||
const cursorSq = squareAt(cursor.x, cursor.y, bottom);
|
||||
|
||||
return (
|
||||
<div className="board-wrap stack" style={{ gap: 10 }}>
|
||||
<div
|
||||
className="board-wrap stack ch-fit"
|
||||
// Room for what can show under the board: the castling hint (2 lines in 960) for players, [판 돌리기] for watchers.
|
||||
style={{ gap: 10, '--ch-rows': v.myColor ? (v.chess960Index === null ? 'calc(1.35rem + 10px)' : 'calc(2.7rem + 10px)') : 'calc(var(--tap) + 10px)' } as React.CSSProperties}
|
||||
>
|
||||
<style>{BOARD_MOTION_CSS + CHESS_CSS}</style>
|
||||
<svg
|
||||
ref={svgRef}
|
||||
|
||||
Reference in New Issue
Block a user