- cortex/static/HELP.md: shared Help & Reference base served to all users - help.html: loads shared base + appends persona-specific HELP.md if present - inara/HELP.md: cleared (content moved to shared base) - Google OAuth: registered scott.idem@oneskyit.com; flow now working end-to-end - .gitignore: exclude home/**/sessions/ (runtime logs) - New personas tracked: home/holly/persona/donut/, home/scott/persona/developer/ - Removed orphans: holly/, personas/, cortex-holly.service - CLAUDE.md: updated current state and recently completed list to 2026-03-27 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
190 lines
5.7 KiB
HTML
190 lines
5.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Cortex — Help & Reference</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
<style>
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
min-height: 100vh;
|
|
background: #0f1117;
|
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
font-weight: 450;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
color: #e2e8f0;
|
|
padding: 2rem 1.5rem;
|
|
}
|
|
|
|
.page {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.back-link {
|
|
display: inline-block;
|
|
font-size: 0.8rem;
|
|
color: #94a3b8;
|
|
text-decoration: none;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
.back-link:hover { color: #a78bfa; }
|
|
|
|
header {
|
|
margin-bottom: 2rem;
|
|
padding-bottom: 1rem;
|
|
border-bottom: 1px solid #2d3148;
|
|
}
|
|
header h1 { font-size: 1.5rem; font-weight: 700; color: #a78bfa; }
|
|
header p { font-size: 0.85rem; color: #94a3b8; margin-top: 0.25rem; }
|
|
|
|
#help-body { line-height: 1.7; }
|
|
|
|
/* Collapsible sections */
|
|
details {
|
|
margin-bottom: 0.75rem;
|
|
background: #1a1d27;
|
|
border: 1px solid #2d3148;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
summary {
|
|
padding: 0.85rem 1rem;
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
color: #cbd5e1;
|
|
cursor: pointer;
|
|
list-style: none;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
summary::before {
|
|
content: '▶';
|
|
font-size: 0.65rem;
|
|
color: #94a3b8;
|
|
transition: transform 0.15s;
|
|
}
|
|
details[open] summary::before { transform: rotate(90deg); }
|
|
summary::-webkit-details-marker { display: none; }
|
|
|
|
details > *:not(summary) {
|
|
padding: 0 1rem 1rem;
|
|
}
|
|
|
|
#help-body p { margin: 0.5rem 0; font-size: 0.9rem; color: #cbd5e1; }
|
|
#help-body ul { margin: 0.5rem 0 0.5rem 1.25rem; }
|
|
#help-body li { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 0.25rem; }
|
|
#help-body strong { color: #e2e8f0; }
|
|
#help-body code {
|
|
background: #0f1117;
|
|
border: 1px solid #2d3148;
|
|
border-radius: 4px;
|
|
padding: 0.1em 0.4em;
|
|
font-size: 0.85em;
|
|
color: #a78bfa;
|
|
}
|
|
#help-body a { color: #a78bfa; }
|
|
|
|
#help-body h3 {
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
color: #94a3b8;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin: 0.75rem 0 0.25rem;
|
|
}
|
|
|
|
#loading { color: #94a3b8; font-size: 0.9rem; padding: 1rem 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page">
|
|
<a id="back-link" href="/" class="back-link">← Back to Cortex</a>
|
|
|
|
<header>
|
|
<h1>Help & Reference</h1>
|
|
<p id="persona-label"></p>
|
|
</header>
|
|
|
|
<div id="help-body"><p id="loading">Loading…</p></div>
|
|
</div>
|
|
|
|
<script>
|
|
const cfg = window.HELP_CONFIG || {};
|
|
const user = cfg.user || 'scott';
|
|
const persona = cfg.persona || 'inara';
|
|
const params = `user=${encodeURIComponent(user)}&persona=${encodeURIComponent(persona)}`;
|
|
|
|
// Wire up back link and persona label
|
|
document.getElementById('back-link').href = cfg.backHref || '/';
|
|
if (persona) {
|
|
document.getElementById('persona-label').textContent =
|
|
`${persona.charAt(0).toUpperCase() + persona.slice(1)} · ${user}`;
|
|
}
|
|
|
|
const OPEN_SECTIONS = new Set(['Header Controls', 'Chat', 'Sessions', 'Notes']);
|
|
|
|
function makeCollapsible(container) {
|
|
const h2s = Array.from(container.querySelectorAll('h2'));
|
|
for (const h2 of h2s) {
|
|
const title = h2.textContent.trim();
|
|
const details = document.createElement('details');
|
|
if (OPEN_SECTIONS.has(title)) details.open = true;
|
|
|
|
const summary = document.createElement('summary');
|
|
summary.textContent = title;
|
|
details.appendChild(summary);
|
|
|
|
const siblings = [];
|
|
let node = h2.nextSibling;
|
|
while (node && node.nodeName !== 'H2') {
|
|
siblings.push(node);
|
|
node = node.nextSibling;
|
|
}
|
|
for (const sib of siblings) details.appendChild(sib);
|
|
h2.parentNode.replaceChild(details, h2);
|
|
}
|
|
}
|
|
|
|
async function loadHelp() {
|
|
try {
|
|
// Always load the shared base from static
|
|
const baseRes = await fetch('/static/HELP.md');
|
|
if (!baseRes.ok) throw new Error(`HTTP ${baseRes.status}`);
|
|
let markdown = await baseRes.text();
|
|
|
|
// Try to load persona-specific additions and append them
|
|
try {
|
|
const personaRes = await fetch(`/files/HELP.md?${params}`);
|
|
if (personaRes.ok) {
|
|
const personaData = await personaRes.json();
|
|
const extra = (personaData.content || '').trim();
|
|
if (extra) {
|
|
markdown += '\n\n---\n\n## ' + persona.charAt(0).toUpperCase() + persona.slice(1) + ' Notes\n\n' + extra;
|
|
}
|
|
}
|
|
} catch (_) { /* persona-specific file is optional */ }
|
|
|
|
const body = document.getElementById('help-body');
|
|
body.innerHTML = marked.parse(markdown);
|
|
body.querySelectorAll('a').forEach(a => {
|
|
a.target = '_blank'; a.rel = 'noopener noreferrer';
|
|
});
|
|
makeCollapsible(body);
|
|
} catch (err) {
|
|
document.getElementById('help-body').textContent = `Failed to load help: ${err.message}`;
|
|
}
|
|
}
|
|
|
|
loadHelp();
|
|
</script>
|
|
</body>
|
|
</html>
|