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
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.demcha.examples.templates.cv.v2;

import com.demcha.compose.GraphCompose;
import com.demcha.compose.document.api.DocumentPageSize;
import com.demcha.compose.document.api.DocumentSession;
import com.demcha.compose.document.templates.api.DocumentTemplate;
import com.demcha.compose.document.templates.cv.v2.data.CvDocument;
import com.demcha.compose.document.templates.cv.v2.presets.TimelineMinimal;
import com.demcha.examples.support.ExampleDataFactory;
import com.demcha.examples.support.ExampleOutputPaths;

import java.nio.file.Path;

/**
* Renders the v2 Timeline Minimal CV preset against the shared
* grouped skills sample data — spaced uppercase Barlow Condensed
* name, right-aligned contact stack with PNG icons, and the central
* vertical timeline axis (4 segments / 3 circles) separating the
* sidebar (Education / Skills / Expertise / Languages) from the main
* column (Professional Profile / Work Experience).
*
* <p>Output:
* {@code examples/target/generated-pdfs/templates/cv/cv-timeline-minimal-v2.pdf}.</p>
*/
public final class CvTimelineMinimalExample {

private CvTimelineMinimalExample() {
}

public static Path generate() throws Exception {
Path outputFile = ExampleOutputPaths.prepare(
"templates/cv", "cv-timeline-minimal-v2.pdf");
CvDocument doc = ExampleDataFactory.sampleCvDocumentV2();
DocumentTemplate<CvDocument> template = TimelineMinimal.create();

float m = (float) TimelineMinimal.RECOMMENDED_MARGIN;
try (DocumentSession document = GraphCompose.document(outputFile)
.pageSize(DocumentPageSize.A4)
.margin(m, m, m, m)
.create()) {
template.compose(document, doc);
document.buildPdf();
}
return outputFile;
}

public static void main(String[] args) throws Exception {
System.out.println("Generated: " + generate());
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ public static CvPalette editorialBlue() {
DocumentColor.rgb(193, 201, 211));
}

/**
* Timeline Minimal palette: an all-grey scale ported from the v1
* {@code TimelineMinimalCvTemplateComposer} — medium-grey ink,
* softer grey for metadata + body bullets, pale rule for the
* timeline axis and module underlines, and the dot token reused
* for the three circles of the central timeline axis.
*/
public static CvPalette timelineMinimal() {
return new CvPalette(
DocumentColor.rgb(74, 74, 74), // ink — V1 INK
DocumentColor.rgb(122, 122, 122), // muted — V1 SOFT
DocumentColor.rgb(195, 195, 195), // rule — V1 RULE
DocumentColor.rgb(170, 170, 170)); // banner — V1 DOT (reused as "timeline accent")
}

/**
* Panel palette ported from the v1 {@code PanelCvTemplateComposer}
* (ProductLeader tokens): body slate ink, slightly lighter slate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,30 @@ public static CvSpacing editorialBlue() {
3.0); // entrySeparation
}

/**
* Spacing for the Timeline Minimal preset: tight 3-column layout
* with a fixed-width axis between the sidebar and main column.
* Body content is text-only (no cards / banners), so banner
* tokens are unused but kept at neutral defaults.
*/
public static CvSpacing timelineMinimal() {
return new CvSpacing(
12, // pageFlowSpacing (gap between header row + rule + body row)
5, // sectionBodySpacing
DocumentInsets.zero(), // sectionBodyPadding
DocumentInsets.zero(), // headlinePadding
DocumentInsets.zero(), // contactPadding
0.0, // bannerCornerRadius (unused)
0.0, // bannerInnerPadding (unused)
DocumentInsets.zero(), // bannerMargin (unused)
0.8, // accentRuleWidth (header underline)
1.0, // paragraphMarginTop
8.0, // entryHeaderRowSpacing
1.0, // entryTitleWeight
0.45, // entryDateWeight
2.0); // entrySeparation
}

/**
* Spacing for the Panel preset: card-led layout that has to fit
* Header / Profile / two-column row / Additional on one A4 page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,22 @@ public static CvTheme editorialBlue() {
CvDecoration.classic());
}

/**
* The "Timeline Minimal" look — Barlow Condensed display + Lato
* body, all-grey palette, spaced uppercase name, right-aligned
* contact stack with PNG icons, and a thin vertical timeline axis
* with three circles separating the sidebar from the main column.
* Visual signature ported from the v1
* {@code TimelineMinimalCvTemplateComposer}.
*/
public static CvTheme timelineMinimal() {
return new CvTheme(
CvPalette.timelineMinimal(),
CvTypography.timelineMinimal(),
CvSpacing.timelineMinimal(),
CvDecoration.classic());
}

/**
* The "Panel" look — Poppins headlines + Lato body, pale teal
* header card and module panels with thin teal stroke, deep navy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,26 @@ public static CvTypography editorialBlue() {
1.45); // line spacing
}

/**
* Barlow Condensed headline + Lato body scale ported from the v1
* {@code TimelineMinimalCvTemplateComposer}: 28pt spaced-caps
* masthead, 12.5pt sidebar module titles, 13.5pt main module
* titles, 7.5-7.9pt body. Compact sizes squeeze the 3-column
* sidebar / axis / main layout onto one page.
*/
public static CvTypography timelineMinimal() {
return new CvTypography(
FontName.BARLOW_CONDENSED, FontName.LATO,
28.0, // headline (spaced uppercase masthead)
7.8, // contact (right-aligned contact stack)
13.5, // banner / main module title
12.5, // entry title (reused as sidebar module title size)
7.9, // entry date (body size in main)
7.5, // entry subtitle (sidebar body size)
7.8, // body
1.2); // line spacing
}

/**
* Poppins headline + Lato body scale ported from the v1
* {@code PanelCvTemplateComposer} (ProductLeader tokens): a 22pt
Expand Down
Loading