feat(cv): extend templates and extraction

This commit is contained in:
cesnimda
2026-08-27 15:27:48 +02:00
parent cc76f86482
commit ccd0af908c
15 changed files with 586 additions and 54 deletions
+23 -1
View File
@@ -28,6 +28,7 @@ public sealed class CvTheme
// Typography
public string HeadingFont { get; init; } = "Georgia, 'Times New Roman', serif";
public string BodyFont { get; init; } = "Arial, Helvetica, sans-serif";
public string UtilityFont { get; init; } = "'Roboto Mono', Consolas, monospace";
public double NameSizePt { get; init; } = 24;
public double HeadingSizePt { get; init; } = 12;
public double BodySizePt { get; init; } = 10;
@@ -51,6 +52,15 @@ public sealed class CvTheme
// the single-column themes; surfaced in GET /api/cv/themes so the picker can badge it.
public bool AtsFriendly { get; init; }
public bool Premium { get; init; }
public bool NumberSections { get; init; }
// Builder options this template intentionally exposes. The renderer remains generic; the
// registry tells the editor which controls make sense for a selected template.
public List<string> SupportedSettings { get; init; } = new()
{
"accent", "typography", "spacing", "skills", "page", "heading", "header",
"layout", "sidebar", "photo", "icons",
};
// Which section keys render in the sidebar for two-column layouts (ignored for single/header-band).
public List<string> SidebarSections { get; init; } = new() { "contact", "skills", "languages" };
@@ -58,7 +68,7 @@ public sealed class CvTheme
public static class CvThemeCatalog
{
// 8 professional themes, all data. To add one: append here.
// Professional themes, all data. To add one: append here.
public static readonly IReadOnlyList<CvTheme> Themes = new List<CvTheme>
{
new()
@@ -134,6 +144,18 @@ public static class CvThemeCatalog
PhotoShape = "circle", DefaultIcons = true,
SidebarSections = new() { "contact", "skills", "languages", "interests" },
},
new()
{
Id = "code", Name = "Code", Category = "Technical",
Description = "Developer-focused editorial layout with numbered sections and precise mono details.",
Layout = "single", HeaderStyle = "plain", HeadingStyle = "caps-rule",
Accent = "#0b7a63", Ink = "#171a20", Muted = "#555e6b", Line = "#d8dde3", Paper = "#ffffff",
HeadingFont = "'Segoe UI', Roboto, Arial, sans-serif", BodyFont = "'Segoe UI', Roboto, Arial, sans-serif",
UtilityFont = "Consolas, 'Courier New', monospace", NameSizePt = 25.5, HeadingSizePt = 9.5,
BodySizePt = 9.4, LineHeight = 1.43, PageMarginMm = 15.24, SectionGapMm = 5.6, EntryGapMm = 4.3,
PhotoShape = "none", DefaultIcons = false, AtsFriendly = true, NumberSections = true,
SupportedSettings = new() { "accent", "typography", "spacing", "skills", "page" },
},
};
public static CvTheme Resolve(string? id)