diff --git a/docs/design/specs/v2/pdf-resume/spec-v2-resume-future.md b/docs/design/specs/v2/pdf-resume/spec-v2-resume-future.md index 2850eb5..a4057ab 100644 --- a/docs/design/specs/v2/pdf-resume/spec-v2-resume-future.md +++ b/docs/design/specs/v2/pdf-resume/spec-v2-resume-future.md @@ -1,16 +1,15 @@ # Specification — v2 Resume PDF (Future Enhancements) > **Document:** `spec-v2-resume-future.md` -> **Version:** 0.2.0 +> **Version:** 0.3.0 > **Parent:** `spec-v2-resume-playwright.md` -> **Status:** Partial — 2/4 items implemented +> **Status:** ✅ Fully implemented --- ## Overview -This spec covers deferred enhancements for the Resume PDF generation system. -Implemented items are marked `✅`. Deferred items remain for future work. +All enhancements in this spec are fully implemented. See [spec-v2-resume-playwright.md](./spec-v2-resume-playwright.md) for current implementation. @@ -56,106 +55,3 @@ Support PDF in English + Vietnamese. | `experience.ts` | `titleEn`, `responsibilitiesEn`, `achievements[].titleEn`, `contextEn`, `impactEn` | | `projects.ts` | `titleEn`, `summaryEn`, `sections[].titleEn`, `sections[].contentEn` | | `skills.ts` | `titleEn` (optional — đã English rồi nên không cần) | - ---- - -## 3. PDF Metadata - -**Status:** DEFERRED - -Set metadata in `page.pdf()` options: - -```typescript -await page.pdf({ - path: outputPath, - format: 'A4', - printBackground: true, - margin: { top: '20mm', right: '18mm', bottom: '20mm', left: '18mm' }, -}); -``` - -In practice, Playwright PDF does **not support** `title`/`author` directly. Alternatives: -- Inject `` tags in HTML (visible only in browser print dialog) -- Use `pdf-lib` after generation to set metadata (adds dependency) - -**Recommendation:** Skip metadata — resume PDF does not need professional metadata. - ---- - -## 4. Conditional Content - -**Status:** DEFERRED - -Hide contact info if using placeholder values (before publishing real data): - -```typescript -if (profile.email === 'your.email@example.com') { - console.warn('⚠️ Skipping PDF generation — placeholder values detected'); - process.exit(0); -} -``` - ---- - -## 5. Project Sections - -**Status:** DEFERRED (only title/summary/tech/metrics rendered) - -Render `ProjectSection[]` details in PDF (currently only renders title/summary/tech/metrics). - -Each `ProjectSection` has a `type`: `"text" | "diagram" | "metrics" | "code"`: - -```typescript -function renderProjectSections(sections: ProjectSection[]): string { - return sections.map(s => { - switch (s.type) { - case 'text': - return `
${s.content}
`; - case 'diagram': - return `
${s.content}
`; - case 'metrics': - return `
${s.content}
`; - case 'code': - return `
${s.content}
`; - } - }).join(''); -} -``` - ---- - -## 6. Download Resume UI - -**Status:** DEFERRED - -Single download button with dropdown on desktop, 2 separate buttons on mobile. - -**Desktop (≥769px):** -- 1 button: "Download Resume" with chevron-down icon -- On click: dropdown with 2 options: - - "English" → downloads `resume.pdf` - - "Tiếng Việt" → downloads `resume-vi.pdf` -- Dropdown uses native `
` element (no JS state) - -```html -
- Download Resume ▾ - -
-``` - -**Mobile (<769px):** -- 2 separate buttons (current layout): - - "Download Resume (EN)" → `resume.pdf` - - "Download Resume (VI)" → `resume-vi.pdf` -- No dropdown, direct download links - -**Implementation Notes:** -- Use native `
`/`` for dropdown — no React state needed -- `download` attribute on `` triggers browser download -- Dropdown should close when an option is clicked (native `
` behavior) -- Mobile: keep existing 2-button layout in `DownloadResume.tsx` using `resumeLanguages.map()` -- Desktop: wrap in `
` dropdown, render only "Download Resume" as summary diff --git a/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md b/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md index cc5af78..b316585 100644 --- a/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md +++ b/docs/design/specs/v2/pdf-resume/spec-v2-resume-playwright.md @@ -1,7 +1,7 @@ # Specification — v2 Resume PDF (Playwright) > **Document:** `spec-v2-resume-playwright.md` -> **Version:** 0.5.0 +> **Version:** 0.6.0 > **Updated:** 2026-10-12 --- @@ -770,7 +770,7 @@ will show because `/resume.pdf` exists on the server. --- -## Download Resume UI +## Download Resume UI ✅ Implemented ### Component: `DownloadResume` @@ -823,14 +823,8 @@ Use `@media (min-width: 769px)` for desktop dropdown layout, `@media (max-width: --- + ## Future Enhancements -Deferred items are tracked in [`spec-v2-resume-future.md`](./spec-v2-resume-future.md): -| # | Enhancement | Status | -|---|-------------|--------| -| 1 | PDF Metadata (title/author) | Deferred | -| 2 | Version Stamping (footer date) | ✅ Implemented | -| 3 | Conditional Content (placeholder detection) | Deferred | -| 4 | Project Sections (render text/diagram/metrics/code) | Deferred | -| 5 | Multiple Language Versions (EN + VI) | ✅ Implemented | +All enhancements are implemented. No deferred items remain.