feat(ui): HTML skeleton + 3-column grid CSS
This commit is contained in:
@@ -0,0 +1,75 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>ai-chess</title>
|
||||||
|
<link rel="stylesheet" href="/static/vendor/chessground.base.css" />
|
||||||
|
<link rel="stylesheet" href="/static/vendor/chessground.brown.css" />
|
||||||
|
<link rel="stylesheet" href="/static/vendor/chessground.cburnett.css" />
|
||||||
|
<link rel="stylesheet" href="/static/vendor/xterm.css" />
|
||||||
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main id="layout">
|
||||||
|
<section id="agent-codex" class="agent-panel">
|
||||||
|
<header class="agent-header">
|
||||||
|
<span class="agent-name">codex</span>
|
||||||
|
<span class="agent-side" data-bind="codex-side">?</span>
|
||||||
|
</header>
|
||||||
|
<div class="terminal" id="term-codex"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="board-col">
|
||||||
|
<div id="board-wrap">
|
||||||
|
<div id="eval-bar"><div id="eval-fill"></div><div id="eval-text">0.0</div></div>
|
||||||
|
<div id="board"></div>
|
||||||
|
<aside id="history">
|
||||||
|
<ol id="history-list"></ol>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
<div id="board-footer">
|
||||||
|
<div id="status-line">…</div>
|
||||||
|
<button id="new-game">New Game</button>
|
||||||
|
<button id="settings-btn">⚙</button>
|
||||||
|
</div>
|
||||||
|
<div id="sf-lines"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="agent-claude" class="agent-panel">
|
||||||
|
<header class="agent-header">
|
||||||
|
<span class="agent-name">claude</span>
|
||||||
|
<span class="agent-side" data-bind="claude-side">?</span>
|
||||||
|
</header>
|
||||||
|
<div class="terminal" id="term-claude"></div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer id="log-strip"><pre id="log-text"></pre></footer>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<dialog id="settings-dialog">
|
||||||
|
<form method="dialog" id="settings-form">
|
||||||
|
<h3>Settings</h3>
|
||||||
|
<label><input type="checkbox" name="allow_draw_resign" /> allow draw / resign</label>
|
||||||
|
<label><input type="checkbox" name="allow_illegal_moves" /> allow illegal moves (cheats)</label>
|
||||||
|
<label>theme_mode:
|
||||||
|
<select name="theme_mode">
|
||||||
|
<option value="by_side">by side (white→light, black→dark)</option>
|
||||||
|
<option value="both_dark">both dark</option>
|
||||||
|
<option value="both_light">both light</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label>stockfish depth: <input type="number" name="stockfish_depth" min="6" max="30" /></label>
|
||||||
|
<menu>
|
||||||
|
<button value="cancel">cancel</button>
|
||||||
|
<button value="save" id="settings-save">save</button>
|
||||||
|
</menu>
|
||||||
|
</form>
|
||||||
|
</dialog>
|
||||||
|
|
||||||
|
<script src="/static/vendor/chess.min.js"></script>
|
||||||
|
<script src="/static/vendor/chessground.min.js"></script>
|
||||||
|
<script src="/static/vendor/xterm.js"></script>
|
||||||
|
<script src="/static/vendor/xterm-addon-fit.js"></script>
|
||||||
|
<script src="/static/app.js" type="module"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
* { box-sizing: border-box; }
|
||||||
|
html, body { height: 100%; margin: 0; }
|
||||||
|
body {
|
||||||
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||||
|
background: #16161a;
|
||||||
|
color: #e7e5e4;
|
||||||
|
}
|
||||||
|
#layout {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 30% 40% 30%;
|
||||||
|
grid-template-rows: minmax(0, 88vh) minmax(0, 12vh);
|
||||||
|
grid-template-areas:
|
||||||
|
"left center right"
|
||||||
|
"log log log";
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
#agent-codex { grid-area: left; }
|
||||||
|
#board-col { grid-area: center; }
|
||||||
|
#agent-claude{ grid-area: right; }
|
||||||
|
#log-strip { grid-area: log; border-top: 1px solid #333; overflow: auto; }
|
||||||
|
#log-text { font-size: 11px; padding: 4px 8px; margin: 0; color: #999; white-space: pre-wrap; }
|
||||||
|
|
||||||
|
.agent-panel {
|
||||||
|
display: flex; flex-direction: column;
|
||||||
|
border-right: 1px solid #333;
|
||||||
|
min-width: 0; min-height: 0;
|
||||||
|
}
|
||||||
|
#agent-claude { border-right: none; border-left: 1px solid #333; }
|
||||||
|
|
||||||
|
.agent-panel.theme-light { background: #f5f5f4; color: #1a1a1a; }
|
||||||
|
.agent-panel.theme-dark { background: #1a1a1a; color: #e7e5e4; }
|
||||||
|
.agent-header {
|
||||||
|
padding: 4px 8px; font-weight: 600; border-bottom: 1px solid #333;
|
||||||
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
|
}
|
||||||
|
.agent-side { font-size: 11px; opacity: 0.6; }
|
||||||
|
|
||||||
|
.terminal { flex: 1; min-height: 0; padding: 4px; overflow: hidden; }
|
||||||
|
.terminal .xterm { height: 100%; }
|
||||||
|
|
||||||
|
#board-col {
|
||||||
|
display: flex; flex-direction: column; padding: 12px;
|
||||||
|
min-width: 0; min-height: 0;
|
||||||
|
}
|
||||||
|
#board-wrap {
|
||||||
|
display: grid; grid-template-columns: 24px 1fr 200px;
|
||||||
|
gap: 8px; flex: 1; min-height: 0;
|
||||||
|
}
|
||||||
|
#eval-bar {
|
||||||
|
position: relative; width: 24px; background: #444; border-radius: 4px; overflow: hidden;
|
||||||
|
}
|
||||||
|
#eval-fill {
|
||||||
|
position: absolute; left: 0; right: 0; bottom: 50%;
|
||||||
|
background: #f5f5f4; transition: bottom 0.3s ease;
|
||||||
|
}
|
||||||
|
#eval-text {
|
||||||
|
position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
|
||||||
|
text-align: center; font-size: 10px; color: #000; mix-blend-mode: difference;
|
||||||
|
}
|
||||||
|
#board { aspect-ratio: 1 / 1; background: #444; }
|
||||||
|
#history { overflow-y: auto; font-size: 14px; }
|
||||||
|
#history-list { padding-left: 28px; }
|
||||||
|
#history-list li { cursor: pointer; }
|
||||||
|
#history-list li.active { background: #555; }
|
||||||
|
#board-footer { display: flex; gap: 8px; align-items: center; padding: 8px 0; }
|
||||||
|
#status-line { flex: 1; opacity: 0.8; }
|
||||||
|
#sf-lines { font-size: 12px; opacity: 0.8; min-height: 1.5em; }
|
||||||
|
|
||||||
|
button { background: #2a2a2a; color: #e7e5e4; border: 1px solid #444; padding: 4px 12px; cursor: pointer; }
|
||||||
|
button:hover { background: #333; }
|
||||||
|
|
||||||
|
dialog { background: #1a1a1a; color: #e7e5e4; border: 1px solid #444; padding: 16px; }
|
||||||
|
dialog form { display: flex; flex-direction: column; gap: 8px; min-width: 320px; }
|
||||||
|
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin: 0; }
|
||||||
Reference in New Issue
Block a user