- web/: token-login, sessionslista, ANSI-skärmvy (SSE+poll), promptfält, frågekort, tangentrad, delningsflik (bild/HTML-sandbox/markdown), inställningar - go:embed via webfs.go — servern förblir en enda binär, strikt CSP - browser-verifierad mot riktig agy (fråga -> kort -> svar -> kört) - Dockerfile (alpine + tmux/bash) + helmd-image.yaml -> localhost:5000/helmd - integrationstest utökat till 29 gröna Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
166 lines
6.7 KiB
CSS
166 lines
6.7 KiB
CSS
:root {
|
|
--bg: #0b0e14;
|
|
--bg2: #12161f;
|
|
--bg3: #1a2029;
|
|
--border: #262d3a;
|
|
--fg: #d6dbe5;
|
|
--muted: #8a93a5;
|
|
--accent: #4f9cf9;
|
|
--accent2: #7bc4ff;
|
|
--green: #3fca7c;
|
|
--red: #e5605c;
|
|
--amber: #e0a63f;
|
|
--radius: 10px;
|
|
font-size: 15px;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
html, body { height: 100%; margin: 0; }
|
|
body {
|
|
background: var(--bg); color: var(--fg);
|
|
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
}
|
|
.hidden { display: none !important; }
|
|
button {
|
|
background: var(--bg3); color: var(--fg); border: 1px solid var(--border);
|
|
border-radius: 7px; padding: 6px 12px; cursor: pointer; font: inherit;
|
|
}
|
|
button:hover { border-color: var(--accent); }
|
|
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
|
button.primary:hover { background: var(--accent2); }
|
|
button.danger { color: var(--red); }
|
|
button.danger:hover { border-color: var(--red); }
|
|
input, textarea {
|
|
background: var(--bg2); color: var(--fg); border: 1px solid var(--border);
|
|
border-radius: 7px; padding: 8px 10px; font: inherit; width: 100%;
|
|
}
|
|
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
|
|
code { background: var(--bg3); padding: 1px 5px; border-radius: 4px; }
|
|
.error { color: var(--red); min-height: 1.2em; }
|
|
.muted { color: var(--muted); }
|
|
|
|
/* ---- login ---- */
|
|
.login {
|
|
height: 100%; display: flex; align-items: center; justify-content: center;
|
|
}
|
|
.login-card {
|
|
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
|
|
padding: 32px; width: min(420px, 92vw); display: flex; flex-direction: column; gap: 12px;
|
|
}
|
|
.login-card h1 { margin: 0 0 4px; font-size: 1.5rem; }
|
|
.login-card p { margin: 0; color: var(--muted); }
|
|
|
|
/* ---- app frame ---- */
|
|
.app { height: 100%; display: flex; flex-direction: column; }
|
|
header {
|
|
display: flex; align-items: center; gap: 16px;
|
|
padding: 10px 16px; background: var(--bg2); border-bottom: 1px solid var(--border);
|
|
}
|
|
.brand { font-weight: 600; }
|
|
nav { display: flex; gap: 4px; flex: 1; }
|
|
.tab { border: none; background: none; color: var(--muted); padding: 8px 12px; position: relative; }
|
|
.tab.active { color: var(--fg); }
|
|
.tab.active::after {
|
|
content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
|
|
height: 2px; background: var(--accent); border-radius: 2px;
|
|
}
|
|
.badge {
|
|
background: var(--accent); color: #fff; border-radius: 9px;
|
|
font-size: 0.7rem; padding: 1px 6px; margin-left: 6px;
|
|
}
|
|
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
|
|
.dot.ok { background: var(--green); }
|
|
|
|
.tab-page { flex: 1; min-height: 0; display: flex; }
|
|
|
|
/* ---- sessions ---- */
|
|
.sess-list {
|
|
width: 240px; border-right: 1px solid var(--border); background: var(--bg2);
|
|
display: flex; flex-direction: column; padding: 10px; gap: 8px; overflow-y: auto;
|
|
}
|
|
.sess-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
|
|
.sess-item {
|
|
padding: 10px 12px; border-radius: 7px; cursor: pointer; border: 1px solid transparent;
|
|
display: flex; align-items: center; gap: 8px;
|
|
}
|
|
.sess-item:hover { background: var(--bg3); }
|
|
.sess-item.active { background: var(--bg3); border-color: var(--border); }
|
|
.sess-item .dot { width: 8px; height: 8px; flex: none; }
|
|
.sess-item .q { color: var(--amber); margin-left: auto; }
|
|
#newSessForm { display: flex; flex-direction: column; gap: 8px; }
|
|
.row { display: flex; gap: 8px; align-items: center; }
|
|
|
|
.sess-view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
.empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); }
|
|
#sessPane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
.sess-toolbar {
|
|
display: flex; gap: 6px; align-items: center; padding: 8px 12px;
|
|
border-bottom: 1px solid var(--border); flex-wrap: wrap;
|
|
}
|
|
.sess-toolbar .spacer { flex: 1; }
|
|
.sess-toolbar button { padding: 4px 9px; font-size: 0.85rem; }
|
|
#sessTitle { font-weight: 600; }
|
|
|
|
.screen {
|
|
flex: 1; margin: 0; padding: 12px; overflow: auto; background: #05070b;
|
|
font: 12.5px/1.35 ui-monospace, "JetBrains Mono", Consolas, monospace;
|
|
white-space: pre; color: #cfd6e4;
|
|
}
|
|
#promptForm { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
|
|
#promptForm textarea { resize: vertical; }
|
|
|
|
/* ---- question card ---- */
|
|
.question {
|
|
margin: 10px 12px 0; padding: 14px; border: 1px solid var(--amber);
|
|
border-radius: var(--radius); background: color-mix(in srgb, var(--amber) 8%, var(--bg2));
|
|
}
|
|
.question h3 { margin: 0 0 10px; font-size: 0.95rem; }
|
|
.question .opts { display: flex; flex-direction: column; gap: 6px; }
|
|
.question .opts button {
|
|
text-align: left; white-space: normal;
|
|
}
|
|
.question .opts button.selected { border-color: var(--amber); }
|
|
.question .opts button:hover { border-color: var(--accent); }
|
|
|
|
/* ---- shares ---- */
|
|
.shares-wrap { flex: 1; display: flex; min-height: 0; }
|
|
.share-list {
|
|
width: 280px; border-right: 1px solid var(--border); background: var(--bg2);
|
|
overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px;
|
|
}
|
|
.share-item {
|
|
padding: 10px 12px; border-radius: 7px; cursor: pointer; border: 1px solid transparent;
|
|
}
|
|
.share-item:hover, .share-item.active { background: var(--bg3); border-color: var(--border); }
|
|
.share-item .name { font-weight: 600; word-break: break-all; }
|
|
.share-item .meta { color: var(--muted); font-size: 0.8rem; }
|
|
.share-item .del { float: right; }
|
|
.share-view { flex: 1; min-width: 0; overflow: auto; padding: 16px; }
|
|
.share-view iframe {
|
|
width: 100%; height: 100%; border: 1px solid var(--border); border-radius: 7px; background: #fff;
|
|
}
|
|
.share-view img { max-width: 100%; border-radius: 7px; }
|
|
.share-view pre {
|
|
background: var(--bg2); padding: 14px; border-radius: 7px; overflow-x: auto;
|
|
}
|
|
.md { max-width: 820px; line-height: 1.55; }
|
|
.md h1, .md h2, .md h3 { border-bottom: 1px solid var(--border); padding-bottom: 4px; }
|
|
.md pre { background: var(--bg2); padding: 12px; border-radius: 7px; overflow-x: auto; }
|
|
.md code { background: var(--bg3); }
|
|
.md a { color: var(--accent2); }
|
|
|
|
/* ---- settings ---- */
|
|
.cfg { max-width: 560px; padding: 24px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
|
|
.cfg h2 { margin: 12px 0 2px; font-size: 1.05rem; }
|
|
.cfg label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.9rem; }
|
|
.cfg label.check { flex-direction: row; align-items: center; gap: 8px; }
|
|
.cfg input[type="checkbox"] { width: auto; }
|
|
|
|
/* ---- mobil ---- */
|
|
@media (max-width: 720px) {
|
|
.tab-page { flex-direction: column; }
|
|
.sess-list { width: 100%; max-height: 30vh; border-right: none; border-bottom: 1px solid var(--border); }
|
|
.shares-wrap { flex-direction: column; }
|
|
.share-list { width: 100%; max-height: 30vh; }
|
|
.screen { font-size: 11px; }
|
|
}
|