Skip to content

Commit 747b6c4

Browse files
authored
feat: Mint Editorial preset + showcase v2 swap + redesign (#77)
* feat(cv-v2): add Mint Editorial preset + paired cover letter Two-page two-column editorial CV ported from the Mint Editorial design: centered spaced-caps masthead with a full-width mint accent rule, a left sidebar (contact icon rows, interests, education, expertise, level-driven skill bars, social) beside a main column (profile, experience, awards and references two-column grids). MintEditorialLetter reuses the same theme and masthead 1:1. Layered additions: - data: CvSkill(name, optional level) + SkillGroup leveled entries, backward-compatible (name-only renderers and existing baselines unchanged). - theme: CvTheme.mintEditorial() (Poppins; mint accent in palette.banner()). - widgets: reusable SkillBar (proficiency bar) and IconTextRow. - presets: MintEditorial (cv/v2) + MintEditorialLetter (coverletter/v2). - examples: Rose Harris showcase dataset, local to the Mint example so the shared sampleCvDocumentV2 stays untouched. Local checkpoint of the visually-approved render. Parity 15/15 (no baseline drift), Mint + widget + skills smoke tests green, full verify passes. Follow-ups: parity baseline registration, docs/CHANGELOG, customizable accent/header colour options. * chore(showcase): guard + auto-bump docs/index.html version docs/index.html hardcodes the version in five spots (JSON-LD softwareVersion, JitPack downloadUrl, hero badge, Maven + Gradle install snippets) that do not inherit from the pom — they had silently drifted to v1.6.1 while the library shipped v1.6.4 because nothing bumped or guarded them. - VersionConsistencyGuardTest.showcaseSiteVersionMatchesTheProjectVersion: fails the verify gate if any of the five spots lags behind the root pom, matching the existing guard on the README install snippets. - cut-release.ps1 Update-IndexHtmlVersion: bumps all five spots in lockstep with README + poms during the release commit, and stages docs/index.html alongside the rest of the release artefacts. - SHOWCASE.md: rewritten to match reality — previews and the gallery manifest are auto-generated by ShowcaseSync under docs/showcase/ (pdf + screenshots), not hand-edited under docs/assets/ as the old doc claimed. * feat(site): redesign showcase — light theme, display font, indigo accent - Tokenize the colour system into semantic CSS variables and add an html[data-theme="light"] override block. Inline no-FOUC theme init in <head> reads localStorage before first paint; dark stays default. - Sun/moon toggle in the header, persists to localStorage. Code panels intentionally stay dark in both themes (code reads best dark). - Space Grotesk display face on the major headings via Google Fonts (hero h1, section h2, category headings, card titles); body stays Inter. - Unify the dual cyan + amber accents into a single premium indigo (#6366f1) across buttons, tags, code tokens, focus rings. - Gallery card previews now crop to the top band of each document (object-fit cover, top-aligned, height ≈ 248px) for uniform, scannable cards — the full A4 page is still one click away in the lightbox. - Bump the hardcoded site version 1.6.1 → 1.6.4 to match the current pom (guarded by the test added in the previous commit). - Fix a broken footer migration-guide link (docs/ → docs/roadmaps/). * feat(showcase): swap gallery to v2 layered CV + cover letters (16 + 15) The site gallery was rendering the deprecated Gen-2 CvTemplateGalleryFileExample / CoverLetterTemplateGalleryFileExample outputs. CV authoring has moved to the v2 layered stack (cv/v2 + coverletter/v2) where the rendered documents look better; this swap brings the showcase site over. - Add five missing v2 CV examples (CvBlueBannerExample, CvCenteredHeadlineExample, CvClassicSerifExample, CvCompactMonoExample, CvNordicCleanExample) mirroring the existing CvBoxedV2Example shape. All 16 cv/v2 presets now have a runnable example. - CvMinimalUnderlinedExample now writes cv-minimal-underlined-v2.pdf (was cv-minimal-underlined.pdf) so the basename matches the v2 slug convention every other preset already uses. - GenerateAllExamples drops the Gen-2 gallery callers and runs all 16 individual v2 CV examples plus all 15 paired v2 cover-letter examples (Cv<Name>LetterV2Example). - ShowcaseMetadata: cv() / letter() helpers now take an explicit exampleClass and point at /v2/ paths. The 14 cv entries grow to 16 (-v2 slugs plus Minimal Underlined and Mint Editorial); the 14 letter entries grow to 15 (-v2 slugs plus the Mint Editorial paired letter). - Regenerated docs/showcase/{pdf,screenshots} and docs/examples.json via GenerateAllExamples then ShowcaseSync, and removed the orphaned Gen-2 PDFs and PNGs they superseded.
1 parent feeb665 commit 747b6c4

182 files changed

Lines changed: 2999 additions & 385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/SHOWCASE.md

Lines changed: 72 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,85 @@
11
# GraphCompose GitHub Pages Showcase
22

3-
This folder contains the lightweight static showcase site for GraphCompose. It is intentionally plain HTML, CSS, JavaScript, and JSON so GitHub Pages can publish it directly from the main repository without a build step.
3+
This folder is the static showcase site for GraphCompose. It is plain HTML,
4+
CSS, JavaScript, and a generated JSON manifest, so GitHub Pages publishes it
5+
directly from the main repository with no build step.
46

57
## Files
68

7-
- `index.html` is the single-page showcase.
8-
- `styles.css` contains the visual system and responsive layout.
9-
- `examples.json` is the gallery data source.
10-
- `assets/logo/` contains the showcase logo asset.
11-
- `assets/screenshots/` contains PNG previews for generated PDFs.
12-
- `assets/pdf/` contains the generated PDF examples linked from the gallery.
13-
14-
## Add A New Showcase Item
15-
16-
1. Generate the PDF from the examples module.
17-
2. Copy the PDF into `docs/assets/pdf/`.
18-
3. Add a PNG screenshot into `docs/assets/screenshots/`.
19-
4. Add a new object to `docs/examples.json`.
20-
5. Commit and push.
21-
22-
Each `examples.json` object uses this shape:
23-
24-
```json
25-
{
26-
"title": "Cinematic Invoice",
27-
"description": "A short description of the generated document.",
28-
"tags": ["Template", "Tables", "Theme"],
29-
"image": "assets/screenshots/invoice-v2.png",
30-
"pdf": "assets/pdf/invoice-v2.pdf",
31-
"code": "https://github.com/DemchaAV/GraphCompose/blob/main/examples/src/main/java/com/demcha/examples/InvoiceCinematicFileExample.java"
32-
}
33-
```
9+
- `index.html` — the single-page showcase. Holds the hero, install snippets,
10+
feature/architecture sections, and the searchable gallery shell.
11+
- `styles.css` — the visual system and responsive layout.
12+
- `examples.js` — client script that fetches the manifest and renders the
13+
gallery (search, category filters, highlights strip, lightbox).
14+
- `examples.json`**generated** gallery manifest. Do **not** hand-edit it;
15+
it is rewritten by `ShowcaseSync` (see below).
16+
- `assets/logo/` — the showcase logo asset.
17+
- `showcase/pdf/<category>/<group>/…` — generated PDF examples linked from the
18+
gallery.
19+
- `showcase/screenshots/<category>/<group>/…` — PNG previews auto-rendered from
20+
those PDFs.
3421

35-
## Local Preview
22+
> Older revisions of this doc referenced `docs/assets/screenshots` and
23+
> `docs/assets/pdf` plus a manual "copy the PDF, add a PNG, edit examples.json"
24+
> flow. That is no longer accurate — previews and the manifest are generated
25+
> under `docs/showcase/**` by `ShowcaseSync`.
3626
37-
Open `docs/index.html` directly in a browser for a quick visual check. If your browser blocks `fetch("examples.json")` for local `file://` pages, run any tiny static server from the repository root and open the `/docs/` path. No build step is required.
27+
## Add a new showcase item
3828

39-
## GitHub Pages
29+
The gallery is driven by code, not by hand-editing JSON. Source of truth:
30+
`examples/src/main/java/com/demcha/examples/support/ShowcaseMetadata.java`.
31+
32+
1. Add the example `.java` under the right category sub-package in
33+
`examples/src/main/java/com/demcha/examples/`.
34+
2. Make it write its PDF via `ExampleOutputPaths.prepare(category, fileName)`
35+
so the output lands under the matching `examples/target/generated-pdfs/`
36+
subfolder.
37+
3. Wire it into `GenerateAllExamples.main`.
38+
4. Register a metadata entry in `ShowcaseMetadata.java` (title, one-line
39+
description, search tags, source link) keyed by the generated PDF basename.
40+
5. Regenerate, then sync:
41+
42+
```bash
43+
./mvnw -f examples/pom.xml exec:java -Dexec.mainClass=com.demcha.examples.GenerateAllExamples
44+
./mvnw -f examples/pom.xml exec:java -Dexec.mainClass=com.demcha.examples.support.ShowcaseSync
45+
```
46+
47+
`ShowcaseSync` copies each PDF into `docs/showcase/pdf/…`, rasterises a PNG
48+
into `docs/showcase/screenshots/…`, and rewrites `docs/examples.json`.
49+
6. Commit the regenerated `docs/showcase/**` assets and `docs/examples.json`.
50+
51+
## Version and source links
4052

41-
To publish this site with GitHub Pages:
53+
- The displayed version lives **only** in `index.html` (JSON-LD
54+
`softwareVersion`, the JitPack download URL, the hero badge, and the Maven +
55+
Gradle install snippets). It does not inherit from the pom.
56+
- `scripts/cut-release.ps1` flips all of those — plus the README and poms — to
57+
the release tag in the release commit, and `VersionConsistencyGuardTest`
58+
fails the `verify` gate if any of them drift out of sync with the library
59+
`pom.xml`. Do not hand-bump the site version ahead of a release.
60+
- "View source" links resolve through `ShowcaseMetadata.GH_BASE`, which
61+
`cut-release.ps1` flips between `/blob/develop` (while developing) and
62+
`/blob/v<tag>` (at release) so the deployed site points at the exact source
63+
that produced each artefact.
4264

43-
1. Open repository Settings.
44-
2. Go to Pages.
45-
3. Set Source to "Deploy from a branch".
46-
4. Select the main branch and `/docs` folder.
47-
5. Save.
65+
## Local preview
66+
67+
The gallery uses `fetch("examples.json")`, which browsers block for local
68+
`file://` pages. Run any tiny static server from the repository root and open
69+
the `/docs/` path:
70+
71+
```bash
72+
python -m http.server 8000
73+
# then open http://localhost:8000/docs/
74+
```
75+
76+
Opening `docs/index.html` directly still renders everything except the
77+
JS-driven gallery (the `<noscript>` static index lists every PDF as a
78+
fallback). No build step is required.
79+
80+
## GitHub Pages
4881

49-
The site should become available at:
82+
Published from the `main` branch `/docs` folder (Settings → Pages → Deploy from
83+
a branch → `main` / `/docs`). Live at:
5084

5185
https://demchaav.github.io/GraphCompose/

0 commit comments

Comments
 (0)