Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/templates/v2-layered/authoring-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

You like the layered architecture, but the shipped presets
(`BoxedSections`, `MinimalUnderlined`, `ModernProfessional`,
`CenteredHeadline`) don't match the design you want. This doc walks
you through writing a new preset from scratch — **without subclassing,
without duplicating rendering code**.
`CenteredHeadline`, `BlueBanner`) don't match the design you want.
This doc walks you through writing a new preset from scratch —
**without subclassing, without duplicating rendering code**.

If you haven't read [quickstart.md](quickstart.md) and
[using-templates.md](using-templates.md), do those first.
Expand Down Expand Up @@ -91,6 +91,7 @@ small set of named variants.
| Variant | Visual |
|---|---|
| `SectionHeader.banner(host, title, theme)` | Pale-grey panel + centred spaced-caps inside |
| `SectionHeader.fullWidthBanner(host, title, theme[, style])` | Full-width fill banner + centred spaced-caps inside; surrounding rules stay in preset page flow |
| `SectionHeader.underlined(host, title, theme)` | Small left spaced-caps + thin rule below |
| `SectionHeader.flat(host, title, color, theme)` | Large bold title in a given colour, no panel |
| `SectionHeader.flatSpacedCaps(host, title, color, theme, titleStyle)` | Small left spaced-caps title in a soft colour, no panel |
Expand Down
7 changes: 4 additions & 3 deletions docs/templates/v2-layered/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ GraphCompose's templates v2 (layered) gives you:
you can drop into a preset.
- **Presets as compositions** — a preset orchestrates widgets in a
page flow. `BoxedSections`, `MinimalUnderlined`,
`ModernProfessional`, `CenteredHeadline` ship today; writing your
own is ~150 lines.
`ModernProfessional`, `CenteredHeadline`, `BlueBanner` ship today;
writing your own is ~150 lines.

You hand a `CvDocument` to a preset, you get a PDF. The preset
internally composes widgets that read theme tokens that ultimately
Expand Down Expand Up @@ -88,7 +88,8 @@ Same data, different visual. That's the layering.
```
┌─────────────────────────────────────────────────────────────┐
│ presets/ BoxedSections, MinimalUnderlined, │
│ ModernProfessional, CenteredHeadline │
│ ModernProfessional, CenteredHeadline, │
│ BlueBanner │
│ — composition of widgets in a page flow │
└─────────────────────────────────────────────────────────────┘
│ compose from widgets
Expand Down
9 changes: 5 additions & 4 deletions docs/templates/v2-layered/using-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ CvDocument doc = CvDocument.builder()
```

**Single-column presets** (`BoxedSections`, `MinimalUnderlined`,
`ModernProfessional`, `CenteredHeadline`) render only `Slot.MAIN`.
Sidebar content is silently dropped — switch to a multi-column preset
to render it.
`ModernProfessional`, `CenteredHeadline`, `BlueBanner`) render only
`Slot.MAIN`. Sidebar content is silently dropped — switch to a
multi-column preset to render it.

If you don't use slots at all, your sections go to `MAIN` and every
preset renders them. The slot model is opt-in.
Expand All @@ -171,14 +171,15 @@ preset renders them. The slot model is opt-in.
<a id="picking-a-preset"></a>
## Picking a preset

Four shipped today:
Five shipped today:

| Preset | Visual signature |
|---|---|
| `BoxedSections.create()` | Centred letter-spaced name, pale-grey panel section banners, two-page friendly |
| `MinimalUnderlined.create()` | Centred name with thin rule, small spaced-caps section titles with accent rule, single page |
| `ModernProfessional.create()` | Right-aligned big slate-blue name, flat bright-blue bold section titles, dense single page |
| `CenteredHeadline.create()` | Centred spaced-caps name, small subheadline, full-width rules around contact and modules |
| `BlueBanner.create()` | Centred PT-Serif name, compact Lato body, blue full-width section banners between thin rules |

Each factory has a no-arg form (uses a sensible default theme) and
a `create(CvTheme)` form (custom theme).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ as DSL plumbing. Below is the current catalog.

| Variant | Visual | Used in |
|---|---|---|
| `Headline.spacedCentered(host, name, theme)` | centred letter-spaced uppercase (`J A N E D O E`) | BoxedSections, MinimalUnderlined, CenteredHeadline |
| `Headline.spacedCentered(host, name, theme)` | centred letter-spaced uppercase (`J A N E D O E`) | BoxedSections, MinimalUnderlined, CenteredHeadline, BlueBanner |
| `Headline.rightAligned(host, name, theme)` | right-aligned plain bold (`Jane Doe`) | ModernProfessional |
| `Headline.render(host, name, theme, align, spacedCaps)` | low-level: pick any alignment + transform | — |

Expand All @@ -338,7 +338,7 @@ as DSL plumbing. Below is the current catalog.

| Variant | Visual | Used in |
|---|---|---|
| `ContactLine.centered(host, identity, theme)` | centred, phone → email → address → links | BoxedSections, MinimalUnderlined, CenteredHeadline |
| `ContactLine.centered(host, identity, theme)` | centred, phone → email → address → links | BoxedSections, MinimalUnderlined, CenteredHeadline, BlueBanner |
| `ContactLine.rightAligned(host, identity, theme)` | right-aligned, address → phone → email → links | ModernProfessional |
| `ContactLine.twoRowRightAligned(host, identity, theme, bodyStyle, linkStyle, separatorStyle)` | right-aligned address/phone row plus email/link row | ModernProfessional |
| `ContactLine.render(host, identity, theme, align, order)` | low-level: pick alignment + field order | — |
Expand All @@ -352,6 +352,7 @@ change ` | ` to ` · ` or anything else.
| Variant | Visual | Used in |
|---|---|---|
| `SectionHeader.banner(host, title, theme)` | pale-grey panel with centred spaced-caps inside | BoxedSections |
| `SectionHeader.fullWidthBanner(host, title, theme[, style])` | full-width fill banner with centred spaced-caps inside; rules around it stay in the preset page flow | BlueBanner |
| `SectionHeader.underlined(host, title, theme)` | small spaced-caps left-aligned, thin rule below | MinimalUnderlined |
| `SectionHeader.flat(host, title, color, theme)` | large bold title in a given colour, no panel | ModernProfessional |
| `SectionHeader.flatSpacedCaps(host, title, color, theme, titleStyle)` | small spaced-caps title in a soft colour, no panel | CenteredHeadline |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* │ MinimalUnderlined ← another composition, same pieces │
* │ ModernProfessional ← corporate composition variant │
* │ CenteredHeadline ← classic centred headline variant │
* │ BlueBanner ← full-width banner composition │
* └─────────────────────────────────────────────────────────────┘
* │ compose from
* ▼
Expand All @@ -31,8 +32,8 @@
* │ Subheadline .centeredSpacedCaps │
* │ ContactLine .centered | .rightAligned │
* │ .twoRowRightAligned │
* │ SectionHeader .banner | .underlined | .flat
* │ .flatSpacedCaps
* │ SectionHeader .banner | .fullWidthBanner | .underlined
* │ .flat | .flatSpacedCaps
* └─────────────────────────────────────────────────────────────┘
* │ delegate to │ read tokens from
* ▼ ▼
Expand Down
Loading