From 25b0ead76a3a797cfe1f7220e7936bee2abda846 Mon Sep 17 00:00:00 2001 From: "dong.nguyen" Date: Mon, 19 Oct 2026 22:15:10 +0700 Subject: [PATCH] feat: drop site Zalo, widen resume header, remove contact download button - site: Zalo removed from SocialId, Profile, social.ts, ContactLinks, strings and icons.tsx; the resume QR block keeps Zalo by owner decision - resume: .header-photo 72 -> 96px, .header-info margin-left 12 -> 24px, .header-qr gap 18 -> 50px so the Telegram code sits clear of Zalo - contact: removed from the Contact section and ContactPage; DownloadResume() + DownloadButton() and the dead .download-resume-button rule deleted, Hero CTA untouched --- AGENTS.md | 4 +- docs/design/specs/v2/spec-v2-resume.md | 2 +- .../specs/v3/spec-v3-resume-redesign.md | 3 ++ public/resume-template.html | 11 ++++-- src/App.css | 7 ---- src/components/sections/Contact.tsx | 2 - src/components/sections/DownloadResume.tsx | 37 +------------------ src/components/ui/ContactLinks.tsx | 5 +-- src/components/ui/SocialLinks.tsx | 3 +- src/components/ui/icons.tsx | 8 ---- src/data/profile.ts | 1 - src/data/social.ts | 1 - src/i18n/strings.ts | 3 -- src/pages/ContactPage.tsx | 2 - src/types/index.ts | 3 +- 15 files changed, 19 insertions(+), 73 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 05d8c43..21d5326 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -66,13 +66,13 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript ## Data Layer -- `src/data/profile.ts` — name, title, bio, links, social handles (`githubHandle`, `linkedinHandle`, `telegramHandle`), messaging URLs (`telegramUrl`, `zaloUrl`) — the Contact cards render `@{profile.githubHandle}`, never a literal +- `src/data/profile.ts` — name, title, bio, links, social handles (`githubHandle`, `linkedinHandle`, `telegramHandle`), messaging URLs (`telegramUrl`) — the Contact cards render `@{profile.githubHandle}`, never a literal - `src/data/skills.ts` — skill groups → skills - `src/data/experience.ts` — work history entries; optional `variant: 'current' | 'gap'` selects the timeline decoration (live node / career break) - `src/data/projects.ts` — project cards with categories - `src/data/resume.ts` — resume availability, supported languages, URL generation - `src/data/navigation.ts` — `navPaths` (bar + sheet order: Home, About, Experience, Projects, Contact, Philosophy), `footerPaths` -- `src/data/social.ts` — social tiles as `{id, href, external}` (github, linkedin, email, telegram, zalo); `email` is a `mailto:` link with `external: false`, so it renders no `target`/`rel` +- `src/data/social.ts` — social tiles as `{id, href, external}` (github, linkedin, email, telegram); `email` is a `mailto:` link with `external: false`, so it renders no `target`/`rel` - `src/i18n/strings.ts` — every chrome string as `{en, vi}`; the sheet's group labels, the Mode options, the language names (`langEn` / `langVi`, each named in its own language) and the language action labels (`langSwitch`, `switchTo`) live in `strings.nav`, the social `aria-label`s in `strings.social` - `src/data/site.ts` — `siteUrl` (the canonical origin) and `siteName`; every absolute URL the site publishes — canonical, Open Graph, JSON-LD, `robots.txt`, `sitemap.xml` — derives from it - `src/i18n/field.ts` — `field(lang, value, valueEn)` is a plain function, not a hook: `lang` is read once at component top level with `useLanguage()`, so bilingual selection is legal inside `.map()` callbacks. Convention: `value` is Vietnamese, `valueEn` English diff --git a/docs/design/specs/v2/spec-v2-resume.md b/docs/design/specs/v2/spec-v2-resume.md index 194bf6c..9aab219 100644 --- a/docs/design/specs/v2/spec-v2-resume.md +++ b/docs/design/specs/v2/spec-v2-resume.md @@ -114,7 +114,7 @@ Nút Resume trong nav chỉ hiện khi có `/resume` route (HTML resume page). ## Acceptance - [x] Nút "Download Resume" hiển thị trong Hero CTA row -- [x] DownloadResume component riêng, dùng lại trong Contact section và ContactPage +- [x] ~~DownloadResume component riêng, dùng lại trong Contact section và ContactPage~~ — superseded 2026-10-19: the button was removed from both contact surfaces (follow-up 12 in `specs/v3/spec-v3-resume-redesign.md`); Hero keeps the CTA - [x] Click → download PDF từ `/resume.pdf` - [x] Khi chưa có PDF → ẩn hoàn toàn ở cả 2 vị trí - [x] Responsive trên mobile diff --git a/docs/design/specs/v3/spec-v3-resume-redesign.md b/docs/design/specs/v3/spec-v3-resume-redesign.md index c200c9f..d099577 100644 --- a/docs/design/specs/v3/spec-v3-resume-redesign.md +++ b/docs/design/specs/v3/spec-v3-resume-redesign.md @@ -112,4 +112,7 @@ Modern, elegant, brand-consistent A4 resume: correct print geometry, timeline ex - [x] Owner follow-up 8 (2026-10-19): Telegram + Zalo added to website social links — `SocialId` extended (`telegram`, `zalo`), `Profile.telegramUrl` (`https://t.me/dongdn`) + `Profile.zaloUrl` (`https://zaloapp.com/qr/p/14ic4cmkuegf`, same target as the resume QR), two entries appended in `social.ts`, aria labels en/vi in `strings.social.aria`; new `TelegramIcon` + `ZaloIcon` in `icons.tsx` as **simple-icons brand glyphs** (monochrome `currentColor`; lucide dropped brand icons — `lucide:telegram` 404s) — so the tiles are stroke lucide (mail/github/linkedin) + filled brand glyphs (telegram/zalo). Hero, footer, and the mobile sheet pick up all 5 tiles automatically via `SocialLinks`. Verified: `tsc -b` pass, bundle contains both hrefs + both aria labels exactly once, lint unchanged - [x] Throwaway strict typecheck of `scripts/generate-resume.ts` — clean (temp config removed) - [x] Owner follow-up 9 (2026-10-19): Telegram + Zalo cards added to contact — new shared `src/components/ui/ContactLinks.tsx` renders all 5 cards (email, github, linkedin, telegram, zalo) from `profile` + `strings.contact` (new labels `telegram`/`zalo`, new `Profile.telegramHandle`); **`Contact.tsx` (98→34 lines) and `ContactPage.tsx` (83→29 lines) deduplicated** — the two hand-copied card lists (root cause of the follow-up 7 miss) are gone, both consumers render ``; Zalo card sub is `zaloapp.com/qr/p/14ic4cmkuegf` (URL minus protocol; swap to `zalo.me/` if owner supplies the number). Proof: throwaway SSR render → exactly 5 `contact-link` anchors with correct href/target/rel (mailto has none) incl. `t.me/dongdn` + `@dongdn`; `pnpm build` + sitemap clean (ContactPage chunk 2.04 → 0.53 kB), lint unchanged. Also unblocked: viewer closed → both resume PDFs rebuilt (14:34) +- [x] Owner follow-up 10 (2026-10-19): **Zalo removed from the site** — `SocialId` drops `'zalo'`; `Profile.zaloUrl` removed from `src/data/profile.ts` and from the `Profile` interface in `src/types/index.ts`; the zalo entries are gone from `social.ts` and `ContactLinks.tsx` (its `labelKey` union narrows to email/github/linkedin/telegram); `strings.social.aria.zalo` and `strings.contact.zalo` + `zaloSub` deleted; `ZaloIcon` deleted from `icons.tsx`, so the tiles are stroke lucide (mail/github/linkedin) + the filled telegram glyph. Hero, footer and the mobile sheet follow automatically through `SocialLinks`. **Resume QR block unchanged by owner decision** — `resumeQr` keeps `{id: 'zalo', file: 'zalo.jpg'}` and `public/resume-qr/zalo.jpg` stays on disk; only the website drops Zalo. Proof: `pnpm lint` no new warnings, `tsc -b` + `vite build` clean (545 modules, ContactPage chunk 0.53 kB), grep over `src/` finds `zalo` only in `resume.ts` +- [x] Owner follow-up 11 (2026-10-19): **header photo + QR gap** — `.header-photo` 72 → 96px; `.header-info` `margin-left` 12 → 24px (clear space for the bigger photo); `.header-qr` keeps `margin-left: auto` and its `gap` goes 18 → **50px**, so the pair stays pinned to the right edge while the Telegram code sits 50px left of Zalo — each code gets its own quiet zone and a scanner cannot land on the wrong one. Measured at the real print content width (180mm = 680px): photo 96×96 at x=0, info x=138, Telegram QR 493.9–562, Zalo QR 612–680 (flush with the right edge), **QR separation 18 → 50.0 px**, 137px clear between the contact info and the Telegram code, all four contact URLs still one line each, nothing overflows the 680px content box. Header height is unchanged (150.8px — the info block, not the photo, is the tallest child), so pagination does not move. QR payloads re-decoded before the move: `telegram.jpg` → `https://t.me/dongdn`, `zalo.jpg` → `https://zaloapp.com/qr/p/14ic4cmkuegf` (assets correctly labelled). Both `resume.pdf` and `resume-vi.pdf` rebuilt (21:25) +- [x] Owner follow-up 12 (2026-10-19): **download-resume button removed from the site contact surfaces** — `` deleted from `src/components/sections/Contact.tsx` and `src/pages/ContactPage.tsx` (each now ends at ``); `DownloadResume()` and its single-language `DownloadButton()` fallback deleted from `src/components/sections/DownloadResume.tsx` (104 → 71 lines, the file exports only `DownloadResumeDropdown`, which is what Hero uses — hero CTA untouched), so the `resumeAvailable` and `Language` imports that only those two components used are gone; the dead `.download-resume-button` rule and its comment deleted from `src/App.css`. `resumeAvailable` stays in `src/data/resume.ts` because Hero gates its CTA on it. Proof: `pnpm lint` unchanged (4 pre-existing warnings), `tsc -b` + `vite build` clean, built CSS 33.69 → 33.60 kB with zero `download-resume-button` hits, ContactPage chunk 0.53 → 0.51 kB, hero CTA classes (`hero-download-dropdown`, `hero-download-summary`, `hero-download-mobile-btn`, `download-resume-option`) and the `/resume.pdf` href still in the bundle - [ ] Owner visual check of `dist/resume.pdf` / `dist/resume-vi.pdf` in a real browser/PDF viewer diff --git a/public/resume-template.html b/public/resume-template.html index 120af73..8bcc37b 100644 --- a/public/resume-template.html +++ b/public/resume-template.html @@ -51,8 +51,8 @@ } .header-photo { - width: 72px; - height: 72px; + width: 96px; + height: 96px; border-radius: 50%; object-fit: cover; object-position: center top; @@ -60,7 +60,7 @@ flex-shrink: 0; } - .header-info { margin-left: 12px; } + .header-info { margin-left: 24px; } .header-info h1 { font-size: 20pt; font-weight: 700; @@ -88,7 +88,10 @@ .header-info .contact svg { width: 12px; height: 12px; color: var(--meta); } .header-info .contact a { color: var(--muted); } - .header-qr { display: flex; gap: 18px; margin-left: auto; } + /* The QR pair is pinned to the right edge; the 50px gap gives each code its + own quiet zone and keeps the Telegram code left of Zalo, so a scanner + cannot land on the wrong one. */ + .header-qr { display: flex; gap: 50px; margin-left: auto; } .qr-item { display: flex; flex-direction: column; align-items: center; gap: 3px; } .qr-img { width: 18mm; height: 18mm; object-fit: contain; } .qr-label { font-size: 7pt; letter-spacing: 0.08em; text-transform: uppercase; color: var(--meta); } diff --git a/src/App.css b/src/App.css index c225b4a..243e355 100644 --- a/src/App.css +++ b/src/App.css @@ -1717,13 +1717,6 @@ overflow-wrap: anywhere; } -/* Resume download button variant of the contact tile */ -.download-resume-button { - justify-content: center; - padding: 12px 20px; - color: var(--text-primary); -} - @media (max-width: 1024px) { .contact-links { grid-template-columns: repeat(2, 1fr); diff --git a/src/components/sections/Contact.tsx b/src/components/sections/Contact.tsx index 2b5535f..6024862 100644 --- a/src/components/sections/Contact.tsx +++ b/src/components/sections/Contact.tsx @@ -1,5 +1,4 @@ import { motion } from "motion/react" -import { DownloadResume } from "@/components/sections/DownloadResume" import { SectionHeading } from "@/components/ui/SectionHeading" import { ContactLinks } from "@/components/ui/ContactLinks" import { InView } from "@/components/ui/InView" @@ -23,7 +22,6 @@ export function Contact() { - ) diff --git a/src/components/sections/DownloadResume.tsx b/src/components/sections/DownloadResume.tsx index 7db5685..14dad07 100644 --- a/src/components/sections/DownloadResume.tsx +++ b/src/components/sections/DownloadResume.tsx @@ -1,5 +1,4 @@ -import { resumeAvailable, resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume' -import type { Language } from '@/types' +import { resumeUrlFor, resumeLanguages, resumeLanguageLabels } from '@/data/resume' import { useState, useRef, useEffect } from 'react' import { useLanguage } from '@/hooks/useLanguage' import { strings } from '@/i18n/strings' @@ -10,7 +9,7 @@ interface DownloadResumeDropdownProps { targetBlank?: boolean } -function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = false }: DownloadResumeDropdownProps) { +export function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = false }: DownloadResumeDropdownProps) { const { lang } = useLanguage() const [open, setOpen] = useState(false) const ref = useRef(null) @@ -70,35 +69,3 @@ function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = fal ) } - -function DownloadButton({ lang }: { lang: Language }) { - const { lang: currentLang } = useLanguage() - return ( - - - - -
{strings.common.resumeDownload[currentLang]} {resumeLanguageLabels[lang]}
-
- ) -} - -export function DownloadResume() { - if (!resumeAvailable) return null - - return ( -
- {resumeLanguages.length > 1 ? ( - - ) : ( - - )} -
- ) -} - -export { DownloadResumeDropdown , DownloadButton} diff --git a/src/components/ui/ContactLinks.tsx b/src/components/ui/ContactLinks.tsx index eead89a..f24653f 100644 --- a/src/components/ui/ContactLinks.tsx +++ b/src/components/ui/ContactLinks.tsx @@ -2,14 +2,14 @@ import { motion } from "motion/react" import { profile } from "@/data/profile" import { useLanguage } from "@/hooks/useLanguage" import { strings } from "@/i18n/strings" -import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon, ZaloIcon } from "@/components/ui/icons" +import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon } from "@/components/ui/icons" import type { Language, SocialId } from "@/types" type ContactEntry = { id: SocialId href: string external: boolean - labelKey: 'email' | 'github' | 'linkedin' | 'telegram' | 'zalo' + labelKey: 'email' | 'github' | 'linkedin' | 'telegram' sub: Record icon: React.ReactNode } @@ -19,7 +19,6 @@ const entries: ContactEntry[] = [ { id: 'github', href: profile.githubUrl, external: true, labelKey: 'github', sub: { en: `@${profile.githubHandle}`, vi: `@${profile.githubHandle}` }, icon: }, { id: 'linkedin', href: profile.linkedinUrl, external: true, labelKey: 'linkedin', sub: { en: `@${profile.linkedinHandle}`, vi: `@${profile.linkedinHandle}` }, icon: }, { id: 'telegram', href: profile.telegramUrl, external: true, labelKey: 'telegram', sub: { en: `@${profile.telegramHandle}`, vi: `@${profile.telegramHandle}` }, icon: }, - { id: 'zalo', href: profile.zaloUrl, external: true, labelKey: 'zalo', sub: strings.contact.zaloSub, icon: }, ] export function ContactLinks() { diff --git a/src/components/ui/SocialLinks.tsx b/src/components/ui/SocialLinks.tsx index c6abade..a9be3a0 100644 --- a/src/components/ui/SocialLinks.tsx +++ b/src/components/ui/SocialLinks.tsx @@ -2,7 +2,7 @@ import { motion } from "motion/react" import { socialLinks } from "@/data/social" import { useLanguage } from "@/hooks/useLanguage" import { strings } from "@/i18n/strings" -import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon, ZaloIcon } from "@/components/ui/icons" +import { GithubIcon, LinkedinIcon, MailIcon, TelegramIcon } from "@/components/ui/icons" import type { SocialId } from "@/types" const icons: Record = { @@ -10,7 +10,6 @@ const icons: Record = { linkedin: , email: , telegram: , - zalo: , } export function SocialLinks() { diff --git a/src/components/ui/icons.tsx b/src/components/ui/icons.tsx index 52319a3..3bcf7c3 100644 --- a/src/components/ui/icons.tsx +++ b/src/components/ui/icons.tsx @@ -43,11 +43,3 @@ export function TelegramIcon({ size = 20 }: IconProps) { ) } - -export function ZaloIcon({ size = 20 }: IconProps) { - return ( - - ) -} diff --git a/src/data/profile.ts b/src/data/profile.ts index 9b7b873..411f566 100644 --- a/src/data/profile.ts +++ b/src/data/profile.ts @@ -20,7 +20,6 @@ export const profile: Profile = { linkedinHandle: "dong-nz", telegramUrl: "https://t.me/dongdn", telegramHandle: "dongdn", - zaloUrl: "https://zaloapp.com/qr/p/14ic4cmkuegf", currentInterests: [ "AI in logistics", "Digital twins", diff --git a/src/data/social.ts b/src/data/social.ts index b0310c1..13cc01f 100644 --- a/src/data/social.ts +++ b/src/data/social.ts @@ -10,5 +10,4 @@ export const socialLinks: { { id: 'linkedin', href: profile.linkedinUrl, external: true }, { id: 'email', href: `mailto:${profile.email}`, external: false }, { id: 'telegram', href: profile.telegramUrl, external: true }, - { id: 'zalo', href: profile.zaloUrl, external: true }, ] diff --git a/src/i18n/strings.ts b/src/i18n/strings.ts index 683c61f..edc2383 100644 --- a/src/i18n/strings.ts +++ b/src/i18n/strings.ts @@ -32,7 +32,6 @@ export const strings = { linkedin: {en: 'View LinkedIn profile', vi: 'Xem hồ sơ LinkedIn'}, email: {en: 'Send email', vi: 'Gửi email'}, telegram: {en: 'Open Telegram chat', vi: 'Mở chat Telegram'}, - zalo: {en: 'Open Zalo profile', vi: 'Mở hồ sơ Zalo'}, }, }, footer: { @@ -92,8 +91,6 @@ export const strings = { github: {en: 'GitHub', vi: 'GitHub'}, linkedin: {en: 'LinkedIn', vi: 'LinkedIn'}, telegram: {en: 'Telegram', vi: 'Telegram'}, - zalo: {en: 'Zalo', vi: 'Zalo'}, - zaloSub: {en: 'Chat on Zalo', vi: 'Chat qua Zalo'}, }, projectDetail: { notFound: {en: 'Project Not Found', vi: 'Không tìm thấy dự án'}, diff --git a/src/pages/ContactPage.tsx b/src/pages/ContactPage.tsx index 0190b4b..1f080c1 100644 --- a/src/pages/ContactPage.tsx +++ b/src/pages/ContactPage.tsx @@ -1,5 +1,4 @@ import { SectionHeading } from '@/components/ui/SectionHeading' -import { DownloadResume } from '@/components/sections/DownloadResume' import { ContactLinks } from '@/components/ui/ContactLinks' import { motion } from 'motion/react' import { InView } from '@/components/ui/InView' @@ -22,7 +21,6 @@ export function ContactPage() { > - ) diff --git a/src/types/index.ts b/src/types/index.ts index 0e2bfdf..edee98e 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -2,7 +2,7 @@ export type Language = 'en' | 'vi'; export type Palette = 'red' | 'blue'; -export type SocialId = 'github' | 'linkedin' | 'email' | 'telegram' | 'zalo'; +export type SocialId = 'github' | 'linkedin' | 'email' | 'telegram'; export type ProjectCategory = | "software-engineering" @@ -83,7 +83,6 @@ export interface Profile { linkedinHandle: string; telegramUrl: string; telegramHandle: string; - zaloUrl: string; currentInterests: string[]; roles: string[]; philosophy: PhilosophyPoint[];