CV-Engine/cv-engine/src/utils/printable.ts
geulah d35700bc10 feat(templates): add multiple CV templates with photo support and template selection
- Add 4 new CV templates (ATS-Friendly, Classic, Modern, Minimal) with thumbnails
- Implement template registry and gallery component for template selection
- Add photoUrl field to personal info with URL validation
- Update buildPrintableHtml to support template-specific styling
- Modify ExportControls to use template registry
- Add template preview thumbnails in SVG format
2025-10-06 08:29:33 +01:00

12 lines
496 B
TypeScript

import type { CV } from '../schema/cvSchema';
import { sanitizeHtml } from '../schema/cvSchema';
import { buildPrintableHtml as sharedBuild } from '../../../shared-printable/buildPrintableHtml.js';
// Thin wrapper to ensure client-side sanitization and shared rendering parity
export const buildPrintableHtml = (cv: CV, templateId?: string): string => {
const cleaned: CV = {
...cv,
summary: cv.summary ? sanitizeHtml(cv.summary) : ''
};
return sharedBuild(cleaned, templateId);
};