feat(viewer): show document summary together with the original (TODO.md L5)
This commit is contained in:
@@ -1675,6 +1675,45 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
.doc-md code { font-family: var(--mono); font-size: 0.88em; background: var(--brand-soft); padding: 0.08em 0.35em; border-radius: 5px; }
|
||||
.doc-md pre code { background: none; padding: 0; }
|
||||
|
||||
/* Summary panel (phase 36): the labeled "Summary" section the shared
|
||||
renderDocument core (document.js) draws ABOVE the original content
|
||||
whenever doc.summary is non-empty (phase 30 — non-markdown docs
|
||||
only). A "summary, not content" look: the surface card carries a 3px
|
||||
brand left border (no shadow — the content cards own those) and a
|
||||
small-caps brand-ink label. Phase-08 tokens only; static content —
|
||||
no animation (nothing for prefers-reduced-motion to still), and the
|
||||
aria-label + heading carry the accessibility. */
|
||||
.doc-summary {
|
||||
width: 100%;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-left: 3px solid var(--brand);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.9rem 1.1rem;
|
||||
margin-bottom: 1rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
/* md/markdown: the panel matches the .doc-md ≤46rem centered reading
|
||||
column — it is the column's label. Raw formats stay full width (the
|
||||
.doc-raw default above), matching the full-width pre; in engines
|
||||
without :has() the panel degrades to that full-width default. */
|
||||
.doc-summary:has(+ .doc-md) {
|
||||
max-width: 46rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
.doc-summary-title {
|
||||
margin: 0 0 0.4rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--brand-ink); /* #a5b4fc on --surface ≈8.7:1 */
|
||||
}
|
||||
.doc-summary-text {
|
||||
margin: 0;
|
||||
color: var(--ink); /* on --surface ≈14.5:1 */
|
||||
}
|
||||
|
||||
/* Raw (non-markdown) formats: full-width mono pre, horizontal scroll. */
|
||||
.doc-raw {
|
||||
width: 100%;
|
||||
@@ -2011,6 +2050,7 @@ details.thinking .thinking-text ul { margin: 0 0 0.5rem; }
|
||||
#doc-title { font-size: 1.1rem; }
|
||||
.doc-path { max-width: 16rem; }
|
||||
.doc-md { padding: 1.1rem 1rem; }
|
||||
.doc-summary { padding: 0.75rem 0.9rem; }
|
||||
.doc-raw { padding: 1rem; font-size: 0.8rem; }
|
||||
/* Phase 26: the modal bar squeezes like the other bars — the Full page
|
||||
pill goes icon-only (aria-label keeps the name), the title clips;
|
||||
|
||||
Reference in New Issue
Block a user