104 lines
5.1 KiB
HTML
104 lines
5.1 KiB
HTML
|
|
<!doctype html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||
|
|
<title>{{NAME}}</title>
|
||
|
|
<link rel="icon" href="assets/Sprites/icon.png">
|
||
|
|
<style>
|
||
|
|
:root {
|
||
|
|
--bg: #0b0f1a; --panel: #141b2d; --line: #2a3658; --text: #e3e9ff; --dim: #8b97bd;
|
||
|
|
--accent: #4fd8ff; --good: #6dff9e; --warn: #ff6b6b;
|
||
|
|
}
|
||
|
|
* { box-sizing: border-box; }
|
||
|
|
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
|
||
|
|
font: 16px/1.4 "Segoe UI", system-ui, sans-serif; user-select: none; -webkit-user-select: none;
|
||
|
|
touch-action: none; }
|
||
|
|
body { display: flex; align-items: center; justify-content: center;
|
||
|
|
background: radial-gradient(circle at 50% 30%, #18234a 0%, var(--bg) 70%); }
|
||
|
|
|
||
|
|
/* fixed design size, scaled to the window by Kit.fit */
|
||
|
|
#app { position: relative; width: 960px; display: flex; flex-direction: column; gap: 10px; }
|
||
|
|
#hud { display: flex; gap: 10px; align-items: center; }
|
||
|
|
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }
|
||
|
|
.chip b { color: var(--accent); font-variant-numeric: tabular-nums; }
|
||
|
|
.grow { flex: 1; }
|
||
|
|
#stage { position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; }
|
||
|
|
canvas { display: block; }
|
||
|
|
|
||
|
|
button { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line);
|
||
|
|
border-radius: 8px; padding: 6px 12px; cursor: pointer; }
|
||
|
|
button:hover { border-color: var(--accent); }
|
||
|
|
button.primary { background: var(--accent); color: #04121a; border-color: var(--accent); font-weight: 700; padding: 10px 26px; }
|
||
|
|
button:disabled { opacity: .45; cursor: default; }
|
||
|
|
|
||
|
|
/* overlays (menus) */
|
||
|
|
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
||
|
|
background: rgba(5, 8, 16, .72); backdrop-filter: blur(3px); }
|
||
|
|
#overlay.hide { display: none; }
|
||
|
|
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 34px;
|
||
|
|
min-width: 360px; text-align: center; box-shadow: 0 20px 60px #0008; }
|
||
|
|
.card h1 { margin: 0 0 6px; font-size: 40px; letter-spacing: .06em; color: var(--accent); }
|
||
|
|
.card p { color: var(--dim); margin: 6px 0 16px; }
|
||
|
|
.card input { font: inherit; width: 220px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
|
||
|
|
background: #0b1222; color: var(--text); text-align: center; margin-bottom: 14px; }
|
||
|
|
.board { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; font-variant-numeric: tabular-nums; }
|
||
|
|
.board li { display: flex; gap: 10px; padding: 2px 0; }
|
||
|
|
.board li .nm { flex: 1; } .board li.me { color: var(--good); }
|
||
|
|
.muted { color: var(--dim); font-size: 13px; }
|
||
|
|
.card .row { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
|
||
|
|
/* credits (standard for every game: © year Michael Media + Discord) */
|
||
|
|
.credits { margin: 18px 0 0; font-size: 12px; color: var(--dim); }
|
||
|
|
.credits a { color: var(--accent); text-decoration: none; }
|
||
|
|
.credits a:hover { text-decoration: underline; }
|
||
|
|
|
||
|
|
/* touch pad: only on touch screens */
|
||
|
|
#pad { position: absolute; left: 18px; bottom: 18px; display: none; grid-template-columns: repeat(3, 64px); gap: 6px; }
|
||
|
|
#pad button { height: 64px; font-size: 22px; opacity: .7; }
|
||
|
|
@media (pointer: coarse) { #pad { display: grid; } }
|
||
|
|
|
||
|
|
/* window buttons: only inside the exe (html.exe set by kit-host.js) */
|
||
|
|
#winctl { position: fixed; top: 8px; right: 8px; display: none; gap: 6px; z-index: 10; }
|
||
|
|
html.exe #winctl { display: flex; }
|
||
|
|
#winctl button { width: 34px; height: 30px; padding: 0; opacity: .75; }
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="winctl">
|
||
|
|
<button onclick="Kit.host.minimize()" data-i18n-title="win_min">–</button>
|
||
|
|
<button onclick="Kit.host.fullscreen()" data-i18n-title="win_full">▢</button>
|
||
|
|
<button onclick="Kit.host.quit()" data-i18n-title="win_close">✕</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="app">
|
||
|
|
<div id="hud">
|
||
|
|
<div class="chip"><span data-i18n="hud_score">Score</span> <b id="hScore">0</b></div>
|
||
|
|
<div class="chip"><span data-i18n="hud_time">Time</span> <b id="hTime">60</b></div>
|
||
|
|
<div class="chip"><span data-i18n="hud_best">Best</span> <b id="hBest">0</b></div>
|
||
|
|
<div class="grow"></div>
|
||
|
|
<button id="bMute" title="M">Sound</button>
|
||
|
|
<button id="bPause" title="P / Esc" data-i18n="pause">Pause</button>
|
||
|
|
</div>
|
||
|
|
<div id="stage">
|
||
|
|
<canvas id="cv"></canvas>
|
||
|
|
<div id="pad">
|
||
|
|
<span></span><button data-action="up">▲</button><span></span>
|
||
|
|
<button data-action="left">◀</button><button data-action="down">▼</button><button data-action="right">▶</button>
|
||
|
|
</div>
|
||
|
|
<div id="overlay" class="hide"></div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script src="kit/kit-core.js"></script>
|
||
|
|
<script src="kit/kit-audio.js"></script>
|
||
|
|
<script src="kit/kit-loop.js"></script>
|
||
|
|
<script src="kit/kit-input.js"></script>
|
||
|
|
<script src="kit/kit-host.js"></script>
|
||
|
|
<script src="kit/kit-scores.js"></script>
|
||
|
|
<script src="kit/kit-fx.js"></script>
|
||
|
|
<script src="kit/kit-i18n.js"></script>
|
||
|
|
<script src="lang.js"></script>
|
||
|
|
<script src="game.js"></script>
|
||
|
|
</body>
|
||
|
|
</html>
|