Files
tonymandClaude Fable 5.1 eca75c14b8 app: shared OTM login/account look, ported verbatim (v0.6.0)
Port the shared otm-login/otm-menu CSS+markup from
@otm/account-panel otm-login-core.ts 0.44.0 (verbatim, kept in sync
via header comments) into login.html and the sidebar account menu in
index.html/app.js. Accent is the studio's --plum, heading font via
the module's --otm-font-display variable. Behaviour is unchanged
(OTM-first / "Other ways to sign in" toggle, server-filled
__OTM_SSO_URL__, same reasons).

The account menu needs to know whether a session came in via OTM to
show the badge/"Manage OTM account" link, which the session didn't
track before — added a `via: "otm"` claim on the SSO callback's
session and exposed it from GET /api/me (additive; password and
operator-magic sessions are unaffected and read as not-linked).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014LCQmFvKshyAJsE8C3B5ET
2026-10-19 00:20:13 -05:00

139 lines
10 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>🌙 Studio Notebook</title>
<style>
:root {
--bg: #fdf7f2; --card: #ffffff; --ink: #4a3b47;
--plum: #8d6b94; --plum-deep: #6e4f78; --blush: #f3dbe4; --blush-deep: #c98da8;
--sage: #8fa68a; --sage-soft: #e4ecdf; --butter: #f7ecd8; --line: #eddfe3;
--moon: #f0e6f4;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Avenir Next", "Nunito", "Trebuchet MS", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; }
.layout { display: flex; min-height: 100vh; }
aside { width: 212px; flex-shrink: 0; background: var(--card); border-right: 1.5px solid var(--line); padding: 26px 16px; position: sticky; top: 0; height: 100vh; }
.wrap { flex: 1; max-width: 900px; margin: 0 auto; padding: 0 20px 80px; min-width: 0; }
header { padding: 26px 0 0; }
h1 { font-family: Georgia, "Iowan Old Style", serif; font-size: 22px; font-weight: 600; color: var(--plum-deep); }
.sub { color: #9c8698; font-size: 14.5px; margin-top: 2px; font-style: italic; font-family: Georgia, serif; }
nav { display: flex; flex-direction: column; gap: 6px; margin-top: 22px; }
nav button { border: none; background: none; color: #a08fa0; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; cursor: pointer; font-weight: 600; font-family: inherit; text-align: left; }
nav button:hover { background: var(--moon); color: var(--plum-deep); }
nav button.on { background: var(--plum); color: #fff; }
@media (max-width: 700px) {
.layout { flex-direction: column; }
aside { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1.5px solid var(--line); padding: 16px 20px; }
nav { flex-direction: row; flex-wrap: wrap; margin-top: 12px; }
nav button { padding: 8px 14px; border-radius: 999px; background: var(--bg); }
nav button.on { background: var(--plum); }
}
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px){ .g2, .g3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(141,107,148,0.06); }
.card h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blush-deep); font-weight: 700; margin-bottom: 12px; }
h4 { font-family: Georgia, serif; font-size: 17px; font-weight: 600; color: var(--plum-deep); }
.meta { color: #9c8698; font-size: 13.5px; }
.capture { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(141,107,148,0.06); }
.capture .row1 { display: flex; gap: 10px; }
input[type=text], textarea, select { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: 15px; background: var(--bg); color: var(--ink); font-family: inherit; }
.capture input[type=text] { flex: 1; }
button.go, .btn { border: none; border-radius: 12px; padding: 11px 20px; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: inherit; background: var(--plum); color: #fff; }
.btn.soft { background: var(--blush); color: var(--plum-deep); }
.btn.mini { padding: 6px 14px; font-size: 13px; }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.chips .hint { font-size: 12.5px; color: #b1a0ae; }
.chip { font-size: 12.5px; font-weight: 650; padding: 4px 12px; border-radius: 999px; background: var(--moon); color: var(--plum-deep); border: 1.5px solid transparent; cursor: pointer; }
.chip.on { border-color: var(--plum); background: var(--plum); color: #fff; }
.todo { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.todo:last-child { border: none; }
.todo input { width: 17px; height: 17px; accent-color: var(--sage); flex-shrink: 0; }
.todo .done { text-decoration: line-through; color: #b1a0ae; }
.todo .started { color: var(--plum-deep); font-weight: 650; }
.startbtn { background: none; border: none; cursor: pointer; font-size: 16px; line-height: 1; color: #ddcfd9; padding: 2px 5px; flex-shrink: 0; }
.startbtn:hover { color: var(--plum); }
.startbtn.on { color: #c9a24a; }
.pill { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 11px; border-radius: 999px; background: var(--blush); color: var(--plum-deep); }
.pill.sage { background: var(--sage-soft); color: #5c7157; }
.pill.butter { background: var(--butter); color: #8d6a52; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: #b1a0ae; font-weight: 700; padding: 4px; }
th:last-child, td:last-child { text-align: right; }
td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
tr:last-child td { border: none; }
.swatch { height: 64px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); margin-bottom: 10px; }
.result { background: var(--moon); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-top: 10px; }
.sparkle { background: var(--sage-soft); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: #55624c; margin-top: 12px; }
.photos { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.photos img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.ph-add { width: 72px; height: 72px; border-radius: 10px; border: 1.5px dashed var(--blush-deep); color: var(--blush-deep); font-size: 26px; background: none; cursor: pointer; }
.mt { margin-top: 14px; }
.clickable { cursor: pointer; }
.verdict { display: flex; gap: 5px; }
.verdict button { font-size: 16px; padding: 4px 9px; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--line); cursor: pointer; }
.verdict button.on { background: var(--sage-soft); border-color: var(--sage); }
.loadrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; flex-wrap: wrap; }
.loadrow:last-child { border: none; }
.empty { color: #b1a0ae; font-style: italic; font-size: 14px; padding: 8px 0; }
.back { background: none; border: none; color: var(--plum); font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; padding: 0 0 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--blush-deep); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.matrow { display: flex; gap: 8px; margin-bottom: 8px; }
.matrow input:first-child { flex: 1; }
.matrow input:last-of-type { width: 80px; }
footer { text-align: center; color: #b1a0ae; font-size: 13px; margin-top: 32px; font-style: italic; font-family: Georgia, serif; }
footer .chip { font-family: "Avenir Next", "Nunito", sans-serif; font-style: normal; margin-left: 8px; }
/* ported from @otm/account-panel otm-login-core.ts 0.44.0 (OTM_LOGIN_CSS,
the .otm-badge/.otm-menu rules) — keep in sync, verbatim except
.otm-menu__panel's `right:0` → `left:0` (the trigger sits in a 212px
left sidebar; opening to the right would clip off the page edge). The
studio's accent (--plum) is set inline on .otm-menu in app.js, not here. */
.otm-badge{display:inline-block;border-radius:5px;padding:1px 5px;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;background:color-mix(in srgb,var(--otm-accent,#b5562a) 16%,transparent);color:var(--otm-accent,#b5562a);vertical-align:middle}
.otm-menu{position:relative;display:inline-block;--otm-accent:#b5562a;--otm-accent-ink:#fff;--otm-card:#fff;--otm-fg:#1f1b18;--otm-muted:#6b6560;--otm-line:rgba(31,27,24,.12)}
@media (prefers-color-scheme:dark){.otm-menu{--otm-card:#211e1b;--otm-fg:#f3efe9;--otm-muted:#a39b92;--otm-line:rgba(243,239,233,.12)}}
.otm-menu>summary{list-style:none;display:inline-flex;align-items:center;gap:8px;padding:4px 8px;border-radius:10px;cursor:pointer;color:inherit;font:inherit}
.otm-menu>summary::-webkit-details-marker{display:none}
.otm-menu>summary:hover{background:rgba(127,127,127,.1)}
.otm-menu__avatar{width:26px;height:26px;border-radius:999px;background:var(--otm-accent);color:var(--otm-accent-ink);display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700}
.otm-menu__name{font-size:14px}
@media (max-width:640px){.otm-menu__name{display:none}}
.otm-menu__panel{position:absolute;left:0;top:calc(100% + 6px);min-width:15rem;background:var(--otm-card);color:var(--otm-fg);border:1px solid var(--otm-line);border-radius:14px;padding:6px;box-shadow:0 10px 30px rgba(0,0,0,.18);z-index:50}
.otm-menu__who{padding:8px 10px 10px;font-size:12px;color:var(--otm-muted);border-bottom:1px solid var(--otm-line);margin-bottom:6px}
.otm-menu__who strong{display:flex;align-items:center;gap:6px;color:var(--otm-fg);font-weight:500;margin-bottom:2px}
.otm-menu__item{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:9px;border:0;background:none;color:inherit;font:inherit;font-size:14px;text-align:left;text-decoration:none;cursor:pointer}
.otm-menu__item:hover{background:rgba(127,127,127,.1)}
.otm-menu__item svg{width:16px;height:16px;opacity:.75;flex:none}
</style>
</head>
<body>
<div class="layout">
<aside>
<h1>🌙 Studio<br>Notebook</h1>
<nav id="nav">
<button data-v="today" class="on">☀️ Today</button>
<button data-v="glazes">🧪 Clay &amp; Glazes</button>
<button data-v="firings">🔥 Firing Log</button>
<button data-v="pieces">🏺 Pieces</button>
<button data-v="files">🗂️ Files</button>
<button data-v="sourcing">🧭 Sourcing</button>
<button data-v="classes">📚 Classes</button>
<button data-v="ideas">💭 Mind Dump</button>
<button data-v="notes">📒 Notes</button>
</nav>
<nav style="margin-top:18px" id="account-nav"></nav>
</aside>
<div class="wrap">
<header style="padding-bottom:18px">
<div class="sub" id="greeting">welcome back</div>
</header>
<main id="view"></main>
<footer id="foot">🌙 Studio Notebook · bms.poweredbyotm.com</footer>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>