f5b46585c3
Implement | prefix for titles and // separator for descriptions across the full stack: parser, schema, API, CLI, and web frontend. - Parser: line-aware extraction for |title, |title // desc, // leading desc, body // inline desc. URL-safe (skips :// lines). Modifiers (#tag, @time, ^card) extracted from all segments. - Schema: ALTER TABLE migration adds title, description columns - DB: Entity/EntityUpdate structs, all CRUD queries updated - API: title/description on create/update/response, body validation relaxed (title-only entries valid) - CLI: shows title as scan label when present - Web: parseInput mirrors Go parser, list shows title, detail pane renders title + description with double-click inline editing - Tests: 10 new cases (grammar, entity, API) — 71 total, all pass
724 lines
17 KiB
CSS
724 lines
17 KiB
CSS
/* ── TOKENS ─────────────────────────────────────────── */
|
|
:root {
|
|
color-scheme: dark;
|
|
--bg: #0c0b09;
|
|
--surf: #111009;
|
|
--raised: #1a1715;
|
|
--border: #252118;
|
|
--soft: #1e1b16;
|
|
--text: #e8dfc8;
|
|
--muted: #8c8070;
|
|
--dim: #504840;
|
|
--accent: #c8942a;
|
|
--a-bg: rgba(200,148,42,.09);
|
|
--todo: #d4a84b;
|
|
--note: #6ab8b0;
|
|
--event: #6898c8;
|
|
--remind: #c8784a;
|
|
--ok: #7aab72;
|
|
--danger: #b85858;
|
|
--lineage: #9878bc;
|
|
--pin: #c8942a;
|
|
--sans: 'Space Grotesk', system-ui, sans-serif;
|
|
--mono: 'Monaspace Neon', ui-monospace, monospace;
|
|
--r1: 2px;
|
|
--r2: 4px;
|
|
--r3: 8px;
|
|
--t-fast: 80ms ease;
|
|
--t-base: 200ms ease;
|
|
}
|
|
|
|
[data-theme="paper"] {
|
|
color-scheme: light;
|
|
--bg: #f4efe4;
|
|
--surf: #faf7f0;
|
|
--raised: #ece7db;
|
|
--border: #d4cdc0;
|
|
--soft: #e6e0d4;
|
|
--text: #1c1810;
|
|
--muted: #6a5e50;
|
|
--dim: #a09080;
|
|
--accent: #8a6018;
|
|
--a-bg: rgba(138,96,24,.08);
|
|
--todo: #7a5c00;
|
|
--note: #1a7070;
|
|
--event: #245890;
|
|
--remind: #984020;
|
|
--ok: #2a6828;
|
|
--danger: #882030;
|
|
--lineage: #5830a0;
|
|
--pin: #8a6018;
|
|
}
|
|
|
|
/* ── RESET ──────────────────────────────────────────── */
|
|
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
|
::-webkit-scrollbar { width: 3px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
|
|
|
body {
|
|
font-family: var(--sans);
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
}
|
|
|
|
/* ── HEADER ─────────────────────────────────────────── */
|
|
header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
padding: 0 20px;
|
|
height: 36px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--surf);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.logo {
|
|
font-family: var(--mono);
|
|
font-size: 15px;
|
|
font-weight: 300;
|
|
color: var(--accent);
|
|
letter-spacing: .3em;
|
|
}
|
|
|
|
nav {
|
|
display: flex;
|
|
gap: 2px;
|
|
}
|
|
|
|
.nav-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--dim);
|
|
padding: 4px 8px;
|
|
border-radius: var(--r1);
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
font-family: var(--sans);
|
|
font-weight: 500;
|
|
transition: color var(--t-fast), background var(--t-fast);
|
|
}
|
|
|
|
.nav-btn:hover { color: var(--muted); }
|
|
.nav-btn.active { color: var(--accent); background: var(--a-bg); }
|
|
|
|
#capture-bar {
|
|
flex: 1;
|
|
max-width: 600px;
|
|
}
|
|
|
|
#capture-input {
|
|
width: 100%;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 4px 10px;
|
|
border-radius: var(--r2);
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
outline: none;
|
|
transition: border-color var(--t-fast);
|
|
}
|
|
|
|
#capture-input:hover { border-color: var(--muted); }
|
|
#capture-input:focus { border-color: var(--accent); }
|
|
#capture-input::placeholder { color: var(--dim); }
|
|
|
|
.theme-toggle {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--r1);
|
|
color: var(--dim);
|
|
font-family: var(--mono);
|
|
font-size: 13px;
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition: color var(--t-fast), border-color var(--t-fast);
|
|
}
|
|
|
|
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
|
|
|
|
/* ── MAIN LAYOUT ────────────────────────────────────── */
|
|
main {
|
|
display: grid;
|
|
grid-template-columns: 180px 1fr 320px;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── TAG RAIL ───────────────────────────────────────── */
|
|
#tag-rail {
|
|
border-right: 1px solid var(--border);
|
|
padding: 12px 0;
|
|
overflow-y: auto;
|
|
background: var(--surf);
|
|
}
|
|
|
|
.tag-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 4px 16px;
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
transition: color var(--t-fast), background var(--t-fast);
|
|
}
|
|
|
|
.tag-item:hover { background: var(--raised); color: var(--text); }
|
|
.tag-item.active { color: var(--accent); background: var(--a-bg); }
|
|
|
|
.tag-name { font-family: var(--mono); font-size: 11px; }
|
|
.tag-name::before { content: '#'; color: var(--dim); }
|
|
.tag-count {
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
color: var(--dim);
|
|
min-width: 20px;
|
|
text-align: right;
|
|
}
|
|
|
|
/* ── ENTITY PANEL ───────────────────────────────────── */
|
|
#entity-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#month-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 20px;
|
|
border-bottom: 1px solid var(--soft);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
#month-nav:empty { display: none; }
|
|
|
|
.month-nav-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--dim);
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
border-radius: var(--r1);
|
|
transition: color var(--t-fast), background var(--t-fast);
|
|
}
|
|
|
|
.month-nav-btn:hover { color: var(--text); background: var(--raised); }
|
|
|
|
.month-nav-label {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
color: var(--text);
|
|
min-width: 80px;
|
|
text-align: center;
|
|
}
|
|
|
|
.month-nav-clear {
|
|
background: none;
|
|
border: none;
|
|
color: var(--dim);
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
cursor: pointer;
|
|
margin-left: auto;
|
|
transition: color var(--t-fast);
|
|
}
|
|
|
|
.month-nav-clear:hover { color: var(--text); }
|
|
|
|
/* ── ENTITY LIST ────────────────────────────────────── */
|
|
#entity-list {
|
|
overflow-y: auto;
|
|
padding: 4px 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.date-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .6rem;
|
|
padding: 8px 20px 4px;
|
|
font-size: 10px;
|
|
font-family: var(--mono);
|
|
color: var(--dim);
|
|
text-transform: uppercase;
|
|
letter-spacing: .2em;
|
|
}
|
|
|
|
.date-header::after {
|
|
content: '';
|
|
flex: 1;
|
|
height: 1px;
|
|
background: var(--soft);
|
|
}
|
|
|
|
.entity-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 20px;
|
|
cursor: pointer;
|
|
transition: background var(--t-fast);
|
|
border-left: 2px solid transparent;
|
|
}
|
|
|
|
.entity-item:hover { background: var(--raised); }
|
|
.entity-item.selected {
|
|
background: var(--surf);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.entity-glyph {
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
width: 14px;
|
|
text-align: center;
|
|
flex-shrink: 0;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.glyph-note { color: var(--dim); }
|
|
.glyph-todo { color: var(--todo); }
|
|
.glyph-event { color: var(--event); }
|
|
.glyph-snippet { color: var(--accent); }
|
|
.glyph-template { color: var(--lineage); }
|
|
.glyph-checklist { color: var(--remind); }
|
|
.glyph-decision { color: var(--note); }
|
|
.glyph-link { color: var(--danger); }
|
|
|
|
.entity-title {
|
|
font-family: var(--sans);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.entity-preview {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.entity-body {
|
|
flex: 1;
|
|
font-family: var(--mono);
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.entity-time {
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
color: var(--dim);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.entity-tags {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.entity-tag {
|
|
font-family: var(--mono);
|
|
font-size: 9px;
|
|
color: var(--muted);
|
|
border: 1px solid var(--border);
|
|
padding: 1px 6px;
|
|
border-radius: var(--r1);
|
|
}
|
|
|
|
.entity-meta {
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
color: var(--dim);
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.use-badge {
|
|
color: var(--todo);
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* ── DETAIL PANE ────────────────────────────────────── */
|
|
#detail-pane {
|
|
border-left: 1px solid var(--border);
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
background: var(--surf);
|
|
}
|
|
|
|
.detail-empty {
|
|
color: var(--dim);
|
|
font-size: 12px;
|
|
text-align: center;
|
|
margin-top: 40px;
|
|
font-family: var(--mono);
|
|
}
|
|
|
|
.detail-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.detail-glyph { font-size: 16px; }
|
|
|
|
.detail-id {
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
color: var(--dim);
|
|
}
|
|
|
|
.detail-desc {
|
|
font-family: var(--sans);
|
|
font-size: 11px;
|
|
color: var(--muted);
|
|
margin-bottom: 4px;
|
|
cursor: text;
|
|
padding: 2px 6px;
|
|
margin-left: -6px;
|
|
border-radius: var(--r2);
|
|
transition: background var(--t-fast);
|
|
}
|
|
|
|
.detail-desc:hover { background: var(--raised); }
|
|
|
|
.detail-title {
|
|
font-family: var(--sans);
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
margin-bottom: 12px;
|
|
cursor: text;
|
|
padding: 2px 6px;
|
|
margin-left: -6px;
|
|
border-radius: var(--r2);
|
|
transition: background var(--t-fast);
|
|
}
|
|
|
|
.detail-title:hover { background: var(--raised); }
|
|
|
|
.detail-field-edit {
|
|
display: block;
|
|
width: 100%;
|
|
font-family: var(--sans);
|
|
font-size: 14px;
|
|
margin-bottom: 12px;
|
|
padding: 4px 8px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--accent);
|
|
border-radius: var(--r2);
|
|
outline: none;
|
|
}
|
|
|
|
.detail-body {
|
|
font-family: var(--mono);
|
|
font-size: 13px;
|
|
line-height: 1.7;
|
|
margin-bottom: 16px;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
cursor: text;
|
|
border-radius: var(--r2);
|
|
padding: 4px 6px;
|
|
margin-left: -6px;
|
|
transition: background var(--t-fast);
|
|
}
|
|
|
|
.detail-body:hover { background: var(--raised); }
|
|
|
|
.detail-body-edit {
|
|
display: block;
|
|
width: 100%;
|
|
min-height: 80px;
|
|
font-family: var(--mono);
|
|
font-size: 13px;
|
|
line-height: 1.7;
|
|
margin-bottom: 16px;
|
|
padding: 6px 8px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--accent);
|
|
border-radius: var(--r2);
|
|
outline: none;
|
|
resize: vertical;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.detail-tags {
|
|
display: flex;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.detail-tag {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
color: var(--accent);
|
|
border: 1px solid currentColor;
|
|
border-color: color-mix(in srgb, var(--accent) 38%, transparent);
|
|
background: var(--a-bg);
|
|
padding: 2px 8px;
|
|
border-radius: var(--r1);
|
|
}
|
|
|
|
.detail-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.action-btn {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
color: var(--muted);
|
|
padding: 4px 12px;
|
|
border-radius: var(--r1);
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
font-family: var(--mono);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
transition: color var(--t-fast), border-color var(--t-fast);
|
|
}
|
|
|
|
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
.action-btn.primary { border-color: var(--accent); color: var(--accent); background: var(--a-bg); }
|
|
.action-btn.danger { color: var(--danger); border-color: var(--danger); }
|
|
.action-btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
|
|
|
|
/* ── TEMPLATE SLOTS ─────────────────────────────────── */
|
|
.slot-form { margin: 16px 0; }
|
|
|
|
.slot-field {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.slot-label {
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
color: var(--lineage);
|
|
min-width: 80px;
|
|
}
|
|
|
|
.slot-input {
|
|
flex: 1;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 4px 8px;
|
|
border-radius: var(--r2);
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
outline: none;
|
|
transition: border-color var(--t-fast);
|
|
}
|
|
|
|
.slot-input:focus { border-color: var(--lineage); }
|
|
|
|
/* ── CHECKLIST ──────────────────────────────────────── */
|
|
.checklist-step {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.checklist-step input[type="checkbox"] { accent-color: var(--ok); }
|
|
.checklist-step.done span { text-decoration: line-through; color: var(--muted); }
|
|
|
|
/* ── DECISION CARD ──────────────────────────────────── */
|
|
.decision-field { margin-bottom: 12px; }
|
|
|
|
.decision-label {
|
|
font-family: var(--mono);
|
|
font-size: 10px;
|
|
color: var(--note);
|
|
text-transform: uppercase;
|
|
letter-spacing: .1em;
|
|
}
|
|
|
|
.decision-value {
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
}
|
|
|
|
/* ── MODAL ──────────────────────────────────────────── */
|
|
.modal { display: none; }
|
|
.modal.visible { display: flex; }
|
|
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
z-index: 100;
|
|
}
|
|
|
|
.modal-content {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: var(--surf);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--r3);
|
|
padding: 24px;
|
|
z-index: 101;
|
|
min-width: 320px;
|
|
}
|
|
|
|
.modal-content h3 {
|
|
font-family: var(--mono);
|
|
font-size: 13px;
|
|
color: var(--text);
|
|
margin-bottom: 16px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.type-picker {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.type-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 8px 14px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-radius: var(--r2);
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
font-family: var(--mono);
|
|
transition: border-color var(--t-fast), background var(--t-fast);
|
|
}
|
|
|
|
.type-btn:hover { border-color: var(--accent); background: var(--raised); }
|
|
.type-btn.suggested { border-color: var(--accent); background: var(--a-bg); }
|
|
|
|
.type-glyph { font-size: 14px; width: 20px; text-align: center; }
|
|
|
|
.modal-close {
|
|
display: block;
|
|
width: 100%;
|
|
margin-top: 12px;
|
|
padding: 6px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--dim);
|
|
font-size: 10px;
|
|
cursor: pointer;
|
|
font-family: var(--mono);
|
|
transition: color var(--t-fast);
|
|
}
|
|
|
|
.modal-close:hover { color: var(--muted); }
|
|
|
|
/* ── LOAD MORE ──────────────────────────────────────── */
|
|
.load-more-wrap {
|
|
padding: 12px 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.load-more-btn {
|
|
background: none;
|
|
border: 1px solid var(--border);
|
|
color: var(--dim);
|
|
padding: 4px 20px;
|
|
border-radius: var(--r1);
|
|
cursor: pointer;
|
|
font-family: var(--mono);
|
|
font-size: 11px;
|
|
transition: color var(--t-fast), border-color var(--t-fast);
|
|
}
|
|
|
|
.load-more-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
|
|
/* ── ABSORB MODAL ───────────────────────────────────── */
|
|
.absorb-list {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.absorb-source-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
border-radius: var(--r2);
|
|
transition: background var(--t-fast);
|
|
}
|
|
|
|
.absorb-source-item:hover { background: var(--raised); }
|
|
|
|
.absorb-source-item .entity-body {
|
|
font-size: 12px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* ── RESPONSIVE ─────────────────────────────────────── */
|
|
@media (max-width: 900px) {
|
|
main { grid-template-columns: 1fr; }
|
|
#tag-rail { display: none; }
|
|
#detail-pane {
|
|
position: fixed;
|
|
inset: 0;
|
|
top: auto;
|
|
height: 50vh;
|
|
background: var(--surf);
|
|
border-top: 1px solid var(--border);
|
|
border-left: none;
|
|
transform: translateY(100%);
|
|
transition: transform var(--t-base);
|
|
z-index: 50;
|
|
}
|
|
#detail-pane.visible { transform: translateY(0); }
|
|
}
|