From 33fa6ebefd13fbaf4e64ba8d93eb4858788544dd Mon Sep 17 00:00:00 2001 From: "dong.nguyen" Date: Tue, 27 Oct 2026 12:34:22 +0700 Subject: [PATCH] resume: rename EN output to resume-en.pdf, show bare filenames in the dialog (spec-v3 follow-up 24) --- .gitea/workflows/deploy.yml | 2 +- .github/workflows/deploy.yml | 2 +- docs/design/specs/v3/spec-v3-resume-redesign.md | 3 ++- scripts/generate-resume.ts | 5 ++--- src/components/ui/ResumeDialog.tsx | 4 ++-- src/data/resume.ts | 5 +++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 7814157..e047f54 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -70,7 +70,7 @@ jobs: - uses: actions/upload-artifact@v7 with: name: resume-pdf-en - path: dist/resume.pdf + path: dist/resume-en.pdf retention-days: 1 - uses: actions/upload-artifact@v7 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 649d6c6..1c5a987 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -75,7 +75,7 @@ jobs: - uses: actions/upload-artifact@v7 with: name: resume-pdf-en - path: dist/resume.pdf + path: dist/resume-en.pdf retention-days: 1 - uses: actions/upload-artifact@v7 diff --git a/docs/design/specs/v3/spec-v3-resume-redesign.md b/docs/design/specs/v3/spec-v3-resume-redesign.md index a66fd6e..5691b3e 100644 --- a/docs/design/specs/v3/spec-v3-resume-redesign.md +++ b/docs/design/specs/v3/spec-v3-resume-redesign.md @@ -126,4 +126,5 @@ Modern, elegant, brand-consistent A4 resume: correct print geometry, timeline ex - [x] Owner follow-up 21 (2026-10-20): **bar resume glyph always carries the theme colour** — the trigger inherited `.nav-control`'s rest `color: var(--text-primary)`, which is identical across the red and blue palettes, so switching palette left the CV glyph unchanged: the entry did not read as themed. `.nav-resume-trigger` now declares `color: var(--accent)` at rest (`App.css`), joining the `border-color: transparent` rule; hover and open already resolve to `--accent` through `.nav-control:hover / .open` (specificity 0,2,0), so the glyph is the active theme/palette's signal colour in every state — rest, hover, open — with no colour step between them, and it follows both theme axes because `--accent` is re-declared in all five blocks of `index.css`. Contrast is the same accent already used by `.nav-link.active` and every control's hover. Cascade verified by rule order (`.nav-resume-trigger` 0,1,0 after `.nav-control` 0,1,0) and a full-file grep: no other rule touches the trigger's colour. `AGENTS.md` bar-controls paragraph updated. - [x] Owner follow-up 22 (2026-10-20): **bar resume icon at 24×24** — `ResumeNavButton` now renders `` instead of the component's 20px default. The glyph is built on the 24 grid (follow-up 19), so at 24px it renders 1:1: strokes land at exactly 2px like every other bar icon and the 6-unit letters become 6px — the size the follow-up 17 notes had already named as the alternative when 20px was the constraint. The 44px target is untouched: `.nav-control`'s 8px padding + 1px border leave a 26px content box, 2px wider than the icon, and the icon now matches the 24px home glyph beside it. Proof: the shipped path strings rasterized at 24px on `#151914` and `#f6f5f2` — dash open at both gaps, both letters clear; `pnpm lint` + `tsc -b` clean. - [x] Owner follow-up 23 (2026-10-20): **tighter brand-group spacing — the left icons carry no borders** — `.nav-brand`'s 12px gap was sized for bordered boxes, but the group's three controls (hamburger, home, resume) are borderless, so the spacing that reads is glyph-to-glyph: 10px of target padding + 12px gap + 10px = 32px between the 24px glyphs. The gap drops to 4px at every width: 24px between glyphs, hover fills stay 4px apart, and two 2px-offset focus rings (2+2px) meet without overlapping. The `@media (max-width: 420px)` rule now only drops the bordered action controls 16px→8px; the brand group needs no narrow-width override because 4px is already below 8px. Width budgets improve at every breakpoint: at 390px, 260px controls + 8px brand gaps + 16px action gaps = 284px inside 358px; at 320px, 284px inside 296px — 12px of slack where the old layout had 4px. All 44px targets unchanged. -- [ ] Owner visual check of `dist/resume.pdf` / `dist/resume-vi.pdf` in a real browser/PDF viewer +- [x] Owner follow-up 24 (2026-10-27): **EN resume renamed `resume.pdf` → `resume-en.pdf`; the dialog shows bare filenames** — the EN output now follows the `resume-.pdf` pattern the VI file already used. `resumeFileNameFor(lang)` in `src/data/resume.ts` is the single source of both names; `resumeUrlFor` is `/` + filename, so the leading slash is a URL concern, not a filename. `scripts/generate-resume.ts` writes `dist/resume-${lang}.pdf` for every language (the `lang === 'en' ? ''` suffix special case is gone); the `resume-pdf-en` artifact path is renamed in both deploy workflows, and `rsync --delete` drops the stale `/resume.pdf` from the server on the first deploy after the change. `ResumeDialog`'s option line renders `resumeFileNameFor` — `resume-en.pdf` / `resume-vi.pdf` — under each language label, while the `href` keeps the absolute path. Proof: `tsc -b` + `pnpm lint` clean; `pnpm build:resume-all` writes `dist/resume-en.pdf` + `dist/resume-vi.pdf` +- [ ] Owner visual check of `dist/resume-en.pdf` / `dist/resume-vi.pdf` in a real browser/PDF viewer diff --git a/scripts/generate-resume.ts b/scripts/generate-resume.ts index acb1757..cea35ed 100644 --- a/scripts/generate-resume.ts +++ b/scripts/generate-resume.ts @@ -235,8 +235,7 @@ if (previewMode) { } else { const page = await browser.newPage(); for (const lang of langs) { - const langSuffix = lang === 'en' ? '' : `-${lang}`; - const outputPath = join(ROOT, `dist/resume${langSuffix}.pdf`); + const outputPath = join(ROOT, `dist/resume-${lang}.pdf`); mkdirSync(dirname(outputPath), { recursive: true }); await page.setContent(pages[lang]); await page.pdf({ @@ -246,7 +245,7 @@ if (previewMode) { preferCSSPageSize: true, tagged: true, }); - console.log(`resume${langSuffix}.pdf generated at ${outputPath} [${lang}]`); + console.log(`resume-${lang}.pdf generated at ${outputPath} [${lang}]`); } await browser.close(); } diff --git a/src/components/ui/ResumeDialog.tsx b/src/components/ui/ResumeDialog.tsx index 29528eb..9470bbf 100644 --- a/src/components/ui/ResumeDialog.tsx +++ b/src/components/ui/ResumeDialog.tsx @@ -1,7 +1,7 @@ import { AnimatePresence, motion } from 'motion/react' import { useEffect } from 'react' import { createPortal } from 'react-dom' -import { resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume' +import { resumeFileNameFor, resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume' import { useI18n } from '@/i18n/provider' type ResumeDialogProps = { @@ -78,7 +78,7 @@ export function ResumeDialog({ open, close, panelRef, dialogId }: ResumeDialogPr onClick={close} > {resumeLanguageLabels[optionLang]} - {resumeUrlFor(optionLang)} + {resumeFileNameFor(optionLang)} ))} diff --git a/src/data/resume.ts b/src/data/resume.ts index 7fefe6c..b67a3ea 100644 --- a/src/data/resume.ts +++ b/src/data/resume.ts @@ -15,5 +15,6 @@ export const resumeQr: { id: string; file: string; label: string }[] = [ { id: 'zalo', file: 'zalo.jpg', label: 'Zalo' }, ] -export const resumeUrlFor = (lang: Language): string => - lang === 'en' ? '/resume.pdf' : `/resume-${lang}.pdf` +export const resumeFileNameFor = (lang: Language): string => `resume-${lang}.pdf` + +export const resumeUrlFor = (lang: Language): string => `/${resumeFileNameFor(lang)}`