Joffrey Thomas
change
a3f099e
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chess Room {{ room_id }}</title>
<link rel="stylesheet" href="{{ base_path }}/static/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/chessboard.js/1.0.0/chessboard-1.0.0.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.layout { display: grid; grid-template-columns: 520px 1fr; gap: 16px; align-items: start; }
#boardUI { width: 520px; max-width: 90vw; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.status { margin-top: 8px; }
.pill { background: #0f172a; border: 1px solid #334155; padding: 8px 10px; border-radius: 8px; }
</style>
<link rel="icon" href="data:,">
<script>
window.__ROOM_CONFIG__ = {
roomId: {{ room_id | tojson }},
basePath: {{ base_path | tojson }}
};
</script>
</head>
<body>
<div class="container">
<a href="{{ base_path }}/">← Back</a>
<h1>Room: {{ room_id }}</h1>
<div class="controls">
<select id="color">
<option value="white">White</option>
<option value="black">Black</option>
</select>
<button id="startBtn">Start / Reset</button>
<button id="aiBtn">AI Move</button>
<button id="copyPgnBtn">Copy PGN</button>
</div>
<div class="layout">
<div class="pill">
<div id="boardUI"></div>
</div>
<div>
<div class="pill">
<div><strong>Turn:</strong> <span id="turn"></span></div>
<div><strong>Result:</strong> <span id="result"></span></div>
</div>
<div class="pill" style="margin-top:8px;">
<div><strong>Legal Moves:</strong></div>
<div id="legal" style="margin-top:4px;"></div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chess.js/0.13.4/chess.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chessboard.js/1.0.0/chessboard-1.0.0.min.js"></script>
<script src="{{ base_path }}/static/room.js"></script>
</body>
</html>