fix(cv): restore distinct frameless previews
CI and Deploy / test (push) Failing after 7m53s
CI and Deploy / deploy (push) Has been skipped

This commit is contained in:
cesnimda
2026-09-01 16:37:51 +02:00
parent 4c384b76ad
commit e912b72110
5 changed files with 46 additions and 45 deletions
+17 -3
View File
@@ -182,16 +182,30 @@ export function getCvPreviewFitZoom(containerWidthPx: number, pageWidthPx: numbe
return Math.min(1, Math.max(minZoom, usableWidth / pageWidthPx));
}
// Selecting a template is a structural choice. Clear only the presentation overrides that can
// flatten every template into the previous template's layout; keep content, colour, typography,
// spacing and document settings intact.
// Selecting a template restores that template's complete visual identity. CV content and document
// metadata remain untouched; users can customise the newly selected template afterwards.
export function applyCvTheme(settings: CvVariantSettings, themeId: string): CvVariantSettings {
return {
...settings,
themeId,
accentColor: null,
headingFont: null,
bodyFont: null,
density: null,
textColor: null,
mutedColor: null,
headingColor: null,
backgroundColor: null,
baseFontSizePt: null,
headingSizePt: null,
lineHeight: null,
pageMarginMm: null,
sectionGapMm: null,
entryGapMm: null,
layout: null,
headerStyle: null,
headingStyle: null,
skillsStyle: null,
sidebarWidthMm: null,
sidebarSections: null,
};