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: <DownloadResume /> removed from the Contact section and ContactPage;
  DownloadResume() + DownloadButton() and the dead .download-resume-button rule
  deleted, Hero CTA untouched
This commit is contained in:
dong.nguyen committed 2026-10-19 22:15:10 +07:00
1 parent 2573977508
commit 25b0ead76a
15 files changed
+19 -73

No files matched your search

+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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 `<ContactLinks />`; Zalo card sub is `zaloapp.com/qr/p/14ic4cmkuegf` (URL minus protocol; swap to `zalo.me/<phone>` 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** — `<DownloadResume />` deleted from `src/components/sections/Contact.tsx` and `src/pages/ContactPage.tsx` (each now ends at `<ContactLinks />`); `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
+7 -4
View File
@@ -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); }
-7
View File
@@ -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);
-2
View File
@@ -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() {
<SectionHeading title={strings.contact.heading[lang]} tag={strings.common.contactTag[lang]} />
<ContactLinks />
<DownloadResume />
</motion.section>
</InView>
)
+2 -35
View File
@@ -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<HTMLDivElement>(null)
@@ -70,35 +69,3 @@ function DownloadResumeDropdown({ className, wrapperClassName, targetBlank = fal
</div>
)
}
function DownloadButton({ lang }: { lang: Language }) {
const { lang: currentLang } = useLanguage()
return (
<a
href={resumeUrlFor(lang)}
download
className="contact-link download-resume-button"
>
<svg viewBox="0 0 24 24" fill="currentColor" width="24" height="24">
<path d="M12 2a1 1 0 0 1 1 1v9.586l2.707-2.707a1 1 0 1 1 1.414 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-4.5-4.5a1 1 0 0 1 1.414-1.414L11 12.586V3a1 1 0 0 1 1-1zm-7 16a1 1 0 1 1 0 2h14a1 1 0 1 1 0-2H5z" />
</svg>
<div className="link-label">{strings.common.resumeDownload[currentLang]} {resumeLanguageLabels[lang]}</div>
</a>
)
}
export function DownloadResume() {
if (!resumeAvailable) return null
return (
<div style={{ marginTop: '32px' }}>
{resumeLanguages.length > 1 ? (
<DownloadResumeDropdown />
) : (
<DownloadButton lang={resumeLanguages[0]} />
)}
</div>
)
}
export { DownloadResumeDropdown , DownloadButton}
+2 -3
View File
@@ -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<Language, string>
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: <GithubIcon size={24} /> },
{ id: 'linkedin', href: profile.linkedinUrl, external: true, labelKey: 'linkedin', sub: { en: `@${profile.linkedinHandle}`, vi: `@${profile.linkedinHandle}` }, icon: <LinkedinIcon size={24} /> },
{ id: 'telegram', href: profile.telegramUrl, external: true, labelKey: 'telegram', sub: { en: `@${profile.telegramHandle}`, vi: `@${profile.telegramHandle}` }, icon: <TelegramIcon size={24} /> },
{ id: 'zalo', href: profile.zaloUrl, external: true, labelKey: 'zalo', sub: strings.contact.zaloSub, icon: <ZaloIcon size={24} /> },
]
export function ContactLinks() {
+1 -2
View File
@@ -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<SocialId, React.ReactNode> = {
@@ -10,7 +10,6 @@ const icons: Record<SocialId, React.ReactNode> = {
linkedin: <LinkedinIcon size={20} />,
email: <MailIcon size={20} />,
telegram: <TelegramIcon size={20} />,
zalo: <ZaloIcon size={20} />,
}
export function SocialLinks() {
-8
View File
@@ -43,11 +43,3 @@ export function TelegramIcon({ size = 20 }: IconProps) {
</svg>
)
}
export function ZaloIcon({ size = 20 }: IconProps) {
return (
<svg viewBox="0 0 24 24" width={size} height={size} aria-hidden="true" fill="currentColor">
<path d="M12.49 10.272v-.45h1.347v6.322h-.77a.576.576 0 0 1-.577-.573v.001a3.27 3.27 0 0 1-1.938.632a3.284 3.284 0 0 1-3.284-3.282a3.284 3.284 0 0 1 3.284-3.282a3.27 3.27 0 0 1 1.937.632zM6.919 7.79v.205c0 .382-.051.694-.3 1.06l-.03.034a8 8 0 0 0-.242.285L2.024 14.8h4.895v.768a.576.576 0 0 1-.577.576H0v-.362c0-.443.11-.641.25-.847L4.858 9.23H.192V7.79zm8.551 8.354a.48.48 0 0 1-.48-.48V7.79h1.441v8.354zM20.693 9.6a3.306 3.306 0 1 1 .002 6.612a3.306 3.306 0 0 1-.002-6.612m-10.14 5.253a1.932 1.932 0 1 0 0-3.863a1.932 1.932 0 0 0 0 3.863m10.14-.003a1.945 1.945 0 1 0 0-3.89a1.945 1.945 0 0 0 0 3.89" fillRule="evenodd" />
</svg>
)
}
-1
View File
@@ -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",
-1
View File
@@ -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 },
]
-3
View File
@@ -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'},
-2
View File
@@ -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() {
>
<SectionHeading title={strings.contact.heading[lang]} tag={strings.common.contactTag[lang]} />
<ContactLinks />
<DownloadResume />
</motion.section>
</InView>
)
+1 -2
View File
@@ -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[];