@@ -14,14 +14,15 @@ GraphCompose's templates v2 (layered) gives you:
1414- ** Themes describing visuals** — ` BrandTheme ` (palette + typography +
1515 spacing + decoration). Swap a theme to change colours, fonts,
1616 bullet glyphs without touching renderers.
17- - ** Widgets as visual LEGO bricks** — ` Headline ` , ` Subheadline ` ,
18- ` ContactLine ` , ` SectionHeader ` . Each one is a named visual decision
19- you can drop into a preset.
17+ - ** Widgets as visual LEGO bricks** — the neutral header bricks
18+ (` Headline ` , ` Subheadline ` , ` ContactLine ` ) live in the shared
19+ ` templates.core.identity ` ; CV-specific ones (` SectionHeader ` and
20+ friends) in ` cv.v2.widgets ` . Each is a named visual decision you
21+ drop into a preset.
2022- ** Presets as compositions** — a preset orchestrates widgets in a
21- page flow. ` BoxedSections ` , ` MinimalUnderlined ` ,
22- ` ModernProfessional ` , ` CenteredHeadline ` , ` BlueBanner ` ,
23- ` EditorialBlue ` , ` ClassicSerif ` , ` NordicClean ` , and ` CompactMono `
24- ship today; writing your own is ~ 150 lines.
23+ page flow. Sixteen ship today (` BoxedSections ` , ` ModernProfessional ` ,
24+ ` NordicClean ` , ` EditorialBlue ` , ` Executive ` , ` EngineeringResume ` ,
25+ ` TimelineMinimal ` , …); writing your own is ~ 150 lines.
2526
2627You hand a ` CvDocument ` to a preset, you get a PDF. The preset
2728internally composes widgets that read theme tokens that ultimately
@@ -84,50 +85,50 @@ Same data, different visual. That's the layering.
8485
8586---
8687
87- ## The 5 layers
88+ ## The layers
8889
8990```
90- ┌─────────────────────────────────────────────────────────────┐
91- │ presets/ BoxedSections, MinimalUnderlined, │
92- │ ModernProfessional, CenteredHeadline, │
93- │ BlueBanner, EditorialBlue, ClassicSerif, │
94- │ NordicClean, CompactMono │
95- │ — composition of widgets in a page flow │
96- └─────────────────────────────────────────────────────────────┘
91+ ┌────────────────────────────────────────────────────────────────────────────┐
92+ │ presets/ 16 CV compositions │
93+ │ BoxedSections, ModernProfessional, NordicClean, ... │
94+ │ -- widgets composed in a page flow │
95+ └────────────────────────────────────────────────────────────────────────────┘
9796 │ compose from widgets
9897 ▼
99- ┌─────────────────────────────────────────────────────────────┐
100- │ widgets/ Headline, Subheadline, ContactLine, │
101- │ SectionHeader │
102- │ — named visual LEGO bricks │
103- └─────────────────────────────────────────────────────────────┘
104- │ delegate to ↓ │ read tokens from ↓
105- ▼ ▼
106- ┌─────────────────────┐ ┌──────────────────────────────────┐
107- │ components/ │ │ theme/ │
108- │ SectionDispatcher │ │ Palette (colours) │
109- │ EntryRenderer │ │ Typography (fonts + sizes) │
110- │ RowRenderer │ │ Spacing (margins + gaps) │
111- │ ParagraphRenderer │ │ Decoration (bullet, sep) │
112- │ + primitives │ │ BrandTheme (bundle + factories) │
113- └─────────────────────┘ └──────────────────────────────────┘
114- │ renders into DSL
98+ ┌────────────────────────────────────────────────────────────────────────────┐
99+ │ widgets/ CV-specific visual bricks │
100+ │ SectionHeader, FlowSectionHeader, SkillBar, SectionModule, ... │
101+ │ (neutral header bricks -- Headline, Subheadline, ContactLine, │
102+ │ Masthead, SvgGlyph -- live in core.identity) │
103+ └────────────────────────────────────────────────────────────────────────────┘
104+ │ delegate to
115105 ▼
116- ┌─────────────────────────────────────────────────────────────┐
117- │ data/ CvDocument, CvIdentity, CvSection (sealed), │
118- │ ParagraphSection / SkillsSection / RowsSection │
119- │ / EntriesSection, │
120- │ CvRow, CvEntry, Slot │
121- │ — pure records, zero rendering deps │
122- └─────────────────────────────────────────────────────────────┘
106+ ┌────────────────────────────────────────────────────────────────────────────┐
107+ │ components/ CV section renderers │
108+ │ SectionDispatcher, EntryRenderer, RowRenderer, ParagraphRenderer │
109+ └────────────────────────────────────────────────────────────────────────────┘
110+ │ render into
111+ ▼
112+ ┌────────────────────────────────────────────────────────────────────────────┐
113+ │ data/ CvDocument, CvIdentity, CvSection (sealed), │
114+ │ ParagraphSection / SkillsSection / RowsSection / EntriesSection, │
115+ │ CvRow, CvEntry, Slot -- pure records, zero rendering deps │
116+ └────────────────────────────────────────────────────────────────────────────┘
117+
118+ ...all built on the shared, family-neutral core (templates.core.*):
119+ ┌────────────────────────────────────────────────────────────────────────────┐
120+ │ core.theme BrandTheme = Palette / Typography / Spacing / Decoration │
121+ │ core.identity Headline, Subheadline, ContactLine, Masthead, SvgGlyph │
122+ │ core.text MarkdownText, RichParagraphRenderer, TextStyles │
123+ └────────────────────────────────────────────────────────────────────────────┘
123124```
124125
125126** What each layer is for** (in plain English):
126127
127128| Layer | "Answers the question…" |
128129| ---| ---|
129130| ` data/ ` | "What goes on the page?" — content, no styling. |
130- | ` theme/ ` | "How does it look?" — colours, fonts, glyphs. |
131+ | ` core. theme` | "How does it look?" — colours, fonts, glyphs (shared ` BrandTheme ` ) . |
131132| ` components/ ` | "How is one element drawn?" — paragraph, row, entry primitives. |
132133| ` widgets/ ` | "Which visual building block do I want here?" — named LEGO bricks. |
133134| ` presets/ ` | "In what order, with which widgets, on which page flow?" — composition. |
0 commit comments