mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(resume): Phase 1 PDF generation with Playwright
- Add playwright and tsx as devDependencies - Create scripts/generate-resume.ts (build script) - Create public/resume-template.html (A4 layout, embedded fonts) - Download Inter fonts (4 weights: Regular, Medium, SemiBold, Bold) - Update src/data/resume.ts (hardcoded resumeAvailable) - Update spec-v2.md overview table - Add spec-v2-resume-playwright.md (Phase 1+2 spec) - Add spec-v2-resume-puppeteer.md (alternative spec) - Add pnpm-workspace.yaml (allow esbuild builds)
This commit is contained in:
1 parent
459781d251
commit
d6ef0bd93f
12 files changed
+2353
-9
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,284 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Resume - Dong Nguyen</title>
|
||||
<style>
|
||||
/* Font faces — injected at build time */
|
||||
{{FONT_FACES}}
|
||||
|
||||
/* Page layout */
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 20mm 18mm 20mm 18mm;
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
font-size: 10pt;
|
||||
line-height: 1.5;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 2px solid #1a1a1a;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.header-photo {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-info h1 {
|
||||
font-size: 18pt;
|
||||
font-weight: 700;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.header-info .title {
|
||||
font-size: 11pt;
|
||||
font-weight: 500;
|
||||
color: #4a4a4a;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.header-info .contact {
|
||||
font-size: 9pt;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Section — all sections except first get page break */
|
||||
.section + .section {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 12pt;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5pt;
|
||||
color: #1a1a1a;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Experience */
|
||||
.exp-entry {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.exp-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.exp-title {
|
||||
font-weight: 600;
|
||||
font-size: 11pt;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.exp-duration {
|
||||
font-size: 9pt;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.exp-company {
|
||||
font-size: 10pt;
|
||||
color: #4a4a4a;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.exp-location {
|
||||
font-size: 9pt;
|
||||
color: #888;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.exp-responsibilities {
|
||||
list-style: disc;
|
||||
padding-left: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.exp-responsibilities li {
|
||||
font-size: 9.5pt;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* Achievement */
|
||||
.achievement {
|
||||
margin-left: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.achievement-title {
|
||||
font-weight: 600;
|
||||
font-size: 10pt;
|
||||
color: #1a1a1a;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.achievement-context {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
margin-bottom: 4px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.achievement-technical {
|
||||
list-style: disc;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.achievement-technical li {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.achievement-tech {
|
||||
font-size: 8.5pt;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.achievement-tech span {
|
||||
display: inline-block;
|
||||
background: #f0f0f0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.achievement-impact {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.achievement-metrics {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
/* Skills */
|
||||
.skills-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px 24px;
|
||||
}
|
||||
|
||||
.skill-group-title {
|
||||
font-weight: 600;
|
||||
font-size: 10pt;
|
||||
color: #1a1a1a;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.skill-list {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Projects */
|
||||
.project {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.project-title {
|
||||
font-weight: 600;
|
||||
font-size: 11pt;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.project-role {
|
||||
font-size: 9pt;
|
||||
color: #666;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.project-summary {
|
||||
font-size: 9.5pt;
|
||||
color: #4a4a4a;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.project-tech {
|
||||
font-size: 8.5pt;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.project-tech span {
|
||||
display: inline-block;
|
||||
background: #f0f0f0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.project-metrics {
|
||||
font-size: 9pt;
|
||||
color: #4a4a4a;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Page break helpers */
|
||||
.avoid-break { page-break-inside: avoid; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<img class="header-photo" src="data:image/webp;base64,{{PHOTO_BASE64}}" alt="Dong Nguyen" />
|
||||
<div class="header-info">
|
||||
<h1>{{NAME}}</h1>
|
||||
<div class="title">{{TITLE}}</div>
|
||||
<div class="contact">
|
||||
{{EMAIL}}<br>
|
||||
{{GITHUB}}<br>
|
||||
{{LINKEDIN}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Experience -->
|
||||
<div class="section">
|
||||
<div class="section-title">Experience</div>
|
||||
{{EXPERIENCE}}
|
||||
</div>
|
||||
|
||||
<!-- Skills -->
|
||||
<div class="section">
|
||||
<div class="section-title">Skills</div>
|
||||
<div class="skills-grid">
|
||||
{{SKILLS}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Projects -->
|
||||
<div class="section">
|
||||
<div class="section-title">Projects</div>
|
||||
{{PROJECTS}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user