Architecture page: numbered sections, bulleted TOC, clearer heading separation

Adds --number-sections to the pandoc invocation and rewrites the header
CSS so sections are visually separated from their titles:

- TOC gets real disc/circle bullets with nesting
- Each h1 starts with a top border and extra vertical rhythm
- h2 gets its own lighter divider
- Numbered sections (1, 2, 8.1, 8.2, ...) sit in a muted slot ahead of
  the title so the eye parses them as metadata, not as part of the
  heading text
- TOC has a "Contents" label above the list
- All colors still derived from the app palette (#f5f3ee background,
  #2e5b8a accent)
This commit is contained in:
Cody Borders 2026-04-15 15:10:02 -07:00
parent 3947180841
commit a7e4e9df9c
3 changed files with 282 additions and 126 deletions

View File

@ -3,50 +3,92 @@
--bg: #f5f3ee; --bg: #f5f3ee;
--panel: #ffffff; --panel: #ffffff;
--ink: #1a1a1a; --ink: #1a1a1a;
--ink-muted: #6b6b6b; --ink-muted: #5a5a5a;
--ink-faint: #8a8a8a;
--accent: #2e5b8a; --accent: #2e5b8a;
--accent-hover: #1f4470;
--border: #e2ddd2; --border: #e2ddd2;
--border-strong: #c9c2b0;
--code-bg: #f0ede4; --code-bg: #f0ede4;
} }
* { box-sizing: border-box; }
html, body { html, body {
background: var(--bg); background: var(--bg);
color: var(--ink); color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif; "Helvetica Neue", Arial, sans-serif;
font-size: 16px; font-size: 16px;
line-height: 1.6; line-height: 1.65;
margin: 0; margin: 0;
} }
body { body {
max-width: 820px; max-width: 820px;
margin: 0 auto; margin: 0 auto;
padding: 48px 32px 96px; padding: 56px 36px 120px;
} }
h1, h2, h3, h4 {
color: var(--ink); /* Title block */
letter-spacing: -0.01em; header#title-block-header {
line-height: 1.25; margin: 0 0 12px;
margin-top: 2.2em; padding-bottom: 28px;
margin-bottom: 0.6em; border-bottom: 1px solid var(--border-strong);
} }
h1.title { h1.title {
font-size: 44px; font-size: 48px;
font-weight: 700; font-weight: 700;
margin-top: 0; letter-spacing: -0.025em;
margin-bottom: 0.2em; margin: 0 0 4px;
letter-spacing: -0.02em; line-height: 1.1;
} }
h1 { font-size: 28px; font-weight: 700; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; } p.author, p.date { color: var(--ink-faint); margin: 0; font-size: 14px; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; color: var(--ink-muted); } /* Headings -- clear hierarchy with real breathing room between sections */
h1, h2, h3, h4 {
color: var(--ink);
letter-spacing: -0.012em;
line-height: 1.25;
}
h1 {
font-size: 30px;
font-weight: 700;
margin: 3.2em 0 0.8em;
padding: 1.2em 0 0.5em;
border-top: 2px solid var(--border-strong);
}
h1:first-of-type { border-top: none; padding-top: 0; margin-top: 2em; }
h2 {
font-size: 22px;
font-weight: 600;
margin: 2.4em 0 0.6em;
padding-top: 0.4em;
border-top: 1px solid var(--border);
}
h3 {
font-size: 17px;
font-weight: 600;
color: var(--ink-muted);
margin: 1.8em 0 0.5em;
}
/* Section numbers sit in their own visual slot so the title reads cleanly */
.header-section-number {
display: inline-block;
color: var(--ink-faint);
font-weight: 500;
margin-right: 0.55em;
font-variant-numeric: tabular-nums;
}
/* Body text */
p { margin: 0 0 1.1em; } p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration: none; } a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; } a:hover { color: var(--accent-hover); text-decoration: underline; }
/* Inline + block code */
code { code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.88em; font-size: 0.88em;
background: var(--code-bg); background: var(--code-bg);
padding: 0.1em 0.35em; padding: 0.12em 0.4em;
border-radius: 4px; border-radius: 4px;
border: 1px solid var(--border); border: 1px solid var(--border);
} }
@ -54,10 +96,11 @@
background: var(--panel); background: var(--panel);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 8px;
padding: 16px 20px; padding: 18px 22px;
overflow-x: auto; overflow-x: auto;
font-size: 13.5px; font-size: 13px;
line-height: 1.55; line-height: 1.55;
margin: 1.4em 0;
} }
pre code { pre code {
background: transparent; background: transparent;
@ -66,39 +109,82 @@
font-size: inherit; font-size: inherit;
} }
.sourceCode { background: transparent; } .sourceCode { background: transparent; }
#TOC {
/* Table of contents -- real bullets, clear nesting */
nav#TOC {
background: var(--panel); background: var(--panel);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 10px;
padding: 20px 28px; padding: 26px 36px 26px 28px;
margin: 28px 0 40px; margin: 32px 0 48px;
} }
#TOC ul { list-style: none; padding-left: 1.1em; margin: 0.3em 0; } nav#TOC::before {
#TOC > ul { padding-left: 0; } content: "Contents";
#TOC li { margin: 0.25em 0; } display: block;
#TOC a { color: var(--ink); } font-size: 12px;
.mermaid, .diagram, figure { text-transform: uppercase;
letter-spacing: 0.12em;
font-weight: 700;
color: var(--ink-faint);
margin-bottom: 14px;
}
nav#TOC ul {
list-style: disc;
padding-left: 1.35em;
margin: 0.35em 0;
}
nav#TOC > ul { padding-left: 1.1em; }
nav#TOC ul ul {
list-style: circle;
margin: 0.2em 0 0.35em;
}
nav#TOC li {
margin: 0.35em 0;
padding-left: 0.25em;
color: var(--ink-muted);
}
nav#TOC li::marker { color: var(--border-strong); }
nav#TOC a { color: var(--ink); }
nav#TOC a:hover { color: var(--accent); }
nav#TOC .toc-section-number {
color: var(--ink-faint);
font-variant-numeric: tabular-nums;
font-weight: 500;
margin-right: 0.45em;
}
/* Mermaid / figures */
figure, .mermaid, .diagram {
background: var(--panel); background: var(--panel);
border: 1px solid var(--border); border: 1px solid var(--border);
border-radius: 8px; border-radius: 10px;
padding: 20px; padding: 22px;
margin: 24px 0; margin: 28px 0;
text-align: center; text-align: center;
} }
figure img, figure svg, p img { max-width: 100%; height: auto; } figure img, figure svg, p img { max-width: 100%; height: auto; }
/* Callouts */
blockquote { blockquote {
border-left: 3px solid var(--accent); border-left: 3px solid var(--accent);
margin: 1.2em 0; margin: 1.3em 0;
padding: 0.2em 1em; padding: 0.25em 1.1em;
color: var(--ink-muted); color: var(--ink-muted);
background: var(--panel); background: var(--panel);
border-radius: 0 6px 6px 0; border-radius: 0 6px 6px 0;
} }
header#title-block-header {
margin-bottom: 0.4em; /* Body bullet lists (outside TOC) */
body > ul, body > ol,
h1 ~ ul, h1 ~ ol, h2 ~ ul, h2 ~ ol, h3 ~ ul, h3 ~ ol {
padding-left: 1.4em;
} }
@media (max-width: 720px) { @media (max-width: 720px) {
body { padding: 28px 18px 72px; } body { padding: 32px 20px 80px; }
h1.title { font-size: 34px; } h1.title { font-size: 36px; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
nav#TOC { padding: 22px 26px; }
} }
</style> </style>

View File

@ -16,6 +16,7 @@ pandoc Bookly.lit.md \
--filter mermaid-filter \ --filter mermaid-filter \
--toc \ --toc \
--toc-depth=3 \ --toc-depth=3 \
--number-sections \
--highlight-style=tango \ --highlight-style=tango \
-H scripts/architecture-header.html \ -H scripts/architecture-header.html \
--metadata pagetitle="Bookly" --metadata pagetitle="Bookly"

File diff suppressed because one or more lines are too long