diff --git a/assets/templates/workbook/workbook-base.html b/assets/templates/workbook/workbook-base.html index 9913e6c..035d8e6 100644 --- a/assets/templates/workbook/workbook-base.html +++ b/assets/templates/workbook/workbook-base.html @@ -167,6 +167,14 @@ } .wb-callout strong { color: var(--wb-accent); font-weight: 600; } +/* ---- Component: lede (lead paragraph that opens a step) ---- */ +.wb-lede { font-size: 1.18rem; line-height: 1.6; color: var(--wb-sub); margin: 0 0 var(--wb-sp-4); max-width: var(--wb-measure); } + +/* ---- Component: quote (pull-quote + attribution) ---- */ +.wb-quote { margin: var(--wb-sp-5) 0; padding-left: var(--wb-sp-5); border-left: 3px solid var(--wb-accent); } +.wb-quote blockquote { margin: 0; font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--wb-text); } +.wb-quote cite { display: block; margin-top: var(--wb-sp-2); font-style: normal; font-size: .9rem; color: var(--wb-sub); } + /* ---- Component: accordion ---- */ .wb-accordion { border: var(--wb-border); border-radius: var(--wb-r-md); background: var(--wb-surface); box-shadow: var(--wb-shadow-sm); margin: var(--wb-sp-5) 0; overflow: hidden; } .wb-accordion__trigger { @@ -256,6 +264,15 @@ .wb-code pre .diff-add { display: block; background: color-mix(in srgb, var(--wb-good) 22%, transparent); } .wb-code pre .diff-del { display: block; background: color-mix(in srgb, var(--wb-bad) 18%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--wb-bad) 60%, transparent); } +/* ---- Code syntax highlighting (dependency-free, fixed palette on the dark code surface). + Convention: wrap tokens by role — kw=keyword, str=string, num=number, fn=function/type, + cmt=comment. Fixed hues (not brand tokens) for legibility on the code background. ---- */ +.wb-code pre .kw { color: #c79bf0; } /* keyword */ +.wb-code pre .str { color: #9ed7a8; } /* string */ +.wb-code pre .num { color: #e0a87a; } /* number */ +.wb-code pre .fn { color: #7fc7e8; } /* function / type */ +.wb-code pre .cmt { color: #8a8a93; font-style: italic; } /* comment */ + /* ---- Component: bar chart (precomputed SVG coords; highlight the salient datum) ---- */ .wb-chart svg .bar { fill: var(--wb-line); } .wb-chart svg .bar.is-peak { fill: var(--wb-accent); } /* recolor the one datum that matters */ @@ -270,6 +287,14 @@ .wb-knob input[type="range"] { flex: 1; accent-color: var(--wb-accent); } .wb-knob__val { font-family: var(--wb-font-mono); font-size: 13px; color: var(--wb-accent); min-width: 52px; text-align: right; } .wb-knob__preview { height: 14px; border-radius: 999px; background: var(--wb-accent); width: var(--knob, 50%); margin-top: var(--wb-sp-4); transition: width .12s ease; } +/* Split variant: a full-width A-vs-B bar (e.g. P(1) vs P(0)). The value portion is + accent, the remainder accent-2; both driven by the same --knob var (no JS change). */ +.wb-knob__preview.is-split { width: 100%; transition: none; + background: linear-gradient(90deg, var(--wb-accent) 0 var(--knob, 50%), var(--wb-accent-2) var(--knob, 50%) 100%); } +.wb-knob__legend { display: flex; gap: var(--wb-sp-4); margin-top: var(--wb-sp-2); font-size: .8rem; color: var(--wb-sub); } +.wb-knob__legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; } +.wb-knob__legend .lg-a::before { background: var(--wb-accent); } +.wb-knob__legend .lg-b::before { background: var(--wb-accent-2); } @media (prefers-reduced-motion: reduce) { .wb-knob__preview { transition: none; } } .wb-knob__caption { font-size: .9rem; color: var(--wb-sub); margin-top: var(--wb-sp-3); } @@ -328,11 +353,21 @@
{{lede — the one sentence that frames this step}}
+{{step.body}} A key term like the ring can be linked to the glossary below.
{{memorable line}}+ {{attribution — optional}} +
{{code}}
+ {{keyword}} {{code}} {{# comment}}
{{what dragging this teaches}}
{{what dragging this teaches — name both outcomes}}
+| {{dimension}} | {{option A}} | {{option B}} |
|---|