PC 화면 정리: 읽기·입력 화면은 가운데 좁은 칸, 대기실 자리를 넓은 칸으로, 설정 두 칸, 홈 한 화면

"PC버전을 좀더" 요청. 1440×900·1280×720·1920×1080에서 찍어 보니 휴대폰용 한 줄 배치를 1,200px로
늘린 화면이 흩어져 보였고, PC 대기실의 자리 카드는 400px 칸에 두 개씩 들어가 이름이 한 글자씩 꺾였다.

- 게임 소개·코드로 참여·규칙: PC는 가운데 768px 칸(뒤로 줄도 같은 폭). 게임 소개 뒤로 줄의 이름 중복 제거.
  코드 입력칸은 최대 520px.
- 설정(/me): PC는 1080px 두 칸(왼쪽 프로필·로그아웃, 오른쪽 화면 설정·기록). 휴대폰은 그대로, 로그아웃 맨 아래.
- 홈: 큰 버튼 3개를 낮은 가로 카드로, "게임 고르기" 제목과 종류 탭을 한 줄로. 1440×900에서 26개가 한 화면.
  게임 고르기 창은 PC에서 두 줄.
- 대기실(PC): 왼쪽 넓은 칸에 초대(한 줄) → 자리(2명 방 2칸, 5명 넘으면 3칸) → [컴퓨터 넣기][관전으로 바꾸기]
  → 시작(가운데 420px) → 채팅, 오른쪽에 게임 설정. 태블릿·휴대폰 배치는 그대로.
- 방 막대 버튼: 마우스 환경에서 40px(막대 안에 여유), 터치는 48px.
- docs/07 §3.2~3.5 갱신.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-10 00:04:07 +09:00
parent b81b4f60be
commit 0d43d9f9aa
12 changed files with 307 additions and 134 deletions

View File

@@ -25,7 +25,7 @@ export function CodeInput({ onComplete, busy, autoFocus = true }: { onComplete:
};
return (
<div className="stack">
<div className="stack" style={{ maxWidth: 520 }}>
<label htmlFor="code-input" className="sr-only">
방 코드 6자리
</label>

View File

@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useState, type ReactNode } from 'react';
import { Link } from 'react-router';
import type { CatalogEntry } from '@bg/shared/lite';
import { GAME_GROUPS, GAME_ICON } from '../lib/catalog-ui';
@@ -7,24 +7,28 @@ import { GAME_GROUPS, GAME_ICON } from '../lib/catalog-ui';
* Game picker (docs/07 §3.3): small tiles with icon, name and one meta line. The one-line blurb and
* difficulty live on the game page, so 26 games fit on a phone in a few screens. A tab row narrows the list.
*/
export function GameGrid({ games }: { games: CatalogEntry[] }) {
export function GameGrid({ games, heading }: { games: CatalogEntry[]; heading?: ReactNode }) {
const [group, setGroup] = useState<string>('all');
const groups = GAME_GROUPS.filter((g) => games.some((x) => g.ids.includes(x.id)));
const shown = group === 'all' ? games : games.filter((g) => GAME_GROUPS.find((x) => x.key === group)?.ids.includes(g.id));
return (
<div className="stack" style={{ gap: 14 }}>
{groups.length > 1 && (
<div className="segmented game-tabs" role="group" aria-label="게임 종류">
<button type="button" aria-pressed={group === 'all'} onClick={() => setGroup('all')}>
전체
</button>
{groups.map((g) => (
<button key={g.key} type="button" aria-pressed={group === g.key} onClick={() => setGroup(g.key)}>
{g.label}
{/* The heading and the tabs share one line on PC (wraps under it on phones). */}
<div className="game-grid-head">
{heading}
{groups.length > 1 && (
<div className="segmented game-tabs" role="group" aria-label="게임 종류">
<button type="button" aria-pressed={group === 'all'} onClick={() => setGroup('all')}>
전체
</button>
))}
</div>
)}
{groups.map((g) => (
<button key={g.key} type="button" aria-pressed={group === g.key} onClick={() => setGroup(g.key)}>
{g.label}
</button>
))}
</div>
)}
</div>
<div className="game-grid">
{shown.map((g) => (
<Link key={g.id} to={`/g/${g.id}`} className="card game-card">

View File

@@ -150,9 +150,10 @@ export function CodeLabel({ code }: { code: string }) {
return <span style={{ fontVariantNumeric: 'tabular-nums', letterSpacing: '0.08em' }}>{formatRoomCode(code)}</span>;
}
export function TopBar({ title, onBack, right }: { title: ReactNode; onBack?: () => void; right?: ReactNode }) {
/** `width` lines the bar up with a `.page.narrow` / `.page.mid` column on PC. */
export function TopBar({ title, onBack, right, width }: { title: ReactNode; onBack?: () => void; right?: ReactNode; width?: 'narrow' | 'mid' }) {
return (
<nav className="topbar" aria-label="페이지 메뉴">
<nav className={width ? `topbar ${width}` : 'topbar'} aria-label="페이지 메뉴">
{onBack && (
<button className="icon-btn" onClick={onBack} aria-label="뒤로">
←<span className="lbl">뒤로</span>