RECORDGOD/site/index.html
type-two 53b1a64a48 feat(nav): light/dark switch every page + store→rack→crate navigator
- nav.js owns a light/dark toggle (persisted, default light) across all owner pages
- /nav API: spaces, store-layout, rack/{id}, crate/{id} over migrated virtual_* geometry
- /search rebuilt as Store→Rack→Crate drill-down (true rack rotation, per-level slot grid,
  crate facing arrows + BACK/FRONT/L/R, search→locate)
- facing convention (directionYaw, slot-grid, rotatedArrows, world composition) in RECORDGOD_NAVIGATOR_PLAN.md
- no-cache HTML routes so deploys show instantly

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 19:33:24 +10:00

46 lines
2.0 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RecordGod</title>
<style>
:root{--pink:#d10f7a;--ink:#f4f5f7;--line:#e2e2ea;--mut:#5f5f6c}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--ink);color:#1b1b22;font:15px/1.5 system-ui,sans-serif}
.wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.box{width:340px;text-align:center}
h1{font-size:46px;font-weight:600;margin:0 0 4px}
h1 b{color:var(--pink);font-weight:600}
.sub{color:var(--mut);letter-spacing:.14em;text-transform:uppercase;font-size:12px;margin-bottom:26px}
input{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:#ffffff;color:#1b1b22;font:15px system-ui;text-align:center}
button{width:100%;margin-top:10px;padding:12px;border:0;border-radius:10px;background:var(--pink);color:#1a0a14;font:600 15px system-ui;cursor:pointer}
.err{color:#e66;font-size:13px;margin-top:10px;min-height:18px}
.foot{color:#44444c;font-size:12px;margin-top:28px}
</style>
</head>
<body>
<div class="wrap"><div class="box">
<h1>Record<b>God</b></h1>
<div class="sub">store back-office · sign in</div>
<input id="tok" type="password" placeholder="access token" autofocus>
<button onclick="go()">Sign in</button>
<div id="err" class="err"></div>
<div class="foot">owner access only</div>
</div></div>
<script>
const tok = document.getElementById('tok');
async function go(){
const t = tok.value.trim(); if(!t) return;
document.getElementById('err').textContent = 'checking…';
const r = await fetch('/admin/stats', { headers: { 'Authorization': 'Bearer ' + t } });
if(r.ok){ localStorage.setItem('rg_token', t); location.href = '/admin'; }
else document.getElementById('err').textContent = 'invalid token';
}
tok.addEventListener('keydown', e => { if(e.key === 'Enter') go(); });
// already signed in? skip straight to the cockpit
if(localStorage.getItem('rg_token')) location.href = '/admin';
</script>
</body>
</html>