resume: rename EN output to resume-en.pdf, show bare filenames in the dialog (spec-v3 follow-up 24)

This commit is contained in:
dong.nguyen committed 2026-10-27 12:34:22 +07:00
1 parent 61a01e25ca
commit 33fa6ebefd
6 files changed
+11 -10

No files matched your search

+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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 `<ResumeIcon size={24} />` 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-<lang>.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
+2 -3
View File
@@ -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();
}
+2 -2
View File
@@ -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}
>
<span className="resume-modal-option-label">{resumeLanguageLabels[optionLang]}</span>
<span className="resume-modal-option-file">{resumeUrlFor(optionLang)}</span>
<span className="resume-modal-option-file">{resumeFileNameFor(optionLang)}</span>
</a>
))}
</div>
+3 -2
View File
@@ -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)}`