diff --git a/AGENTS.md b/AGENTS.md index 5c01d89..9008edd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -69,11 +69,11 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript Content is split once, at authoring time, into language-neutral **structure documents** and per-language **text/UI dictionaries**, joined once at load (spec: `docs/design/specs/v4/spec-v4-live-edit.md`). -- `src/data/profile.json` + `profile.ts` loader — links, social handles (`githubHandle`, `linkedinHandle`, `telegramHandle`), messaging URLs (`telegramUrl`), `firstName`/`lastName` — the Contact cards render `@{c.profile.githubHandle}`, never a literal; name / title / tagline / bio are text, so they live in the content dictionaries +- `src/data/profile.json` + `profile.ts` loader — links, social handles (`githubHandle`, `linkedinHandle`, `telegramHandle`), messaging URLs (`telegramUrl`), `firstName`/`lastName`, the ordered philosophy id list — the Contact cards render `@{c.profile.githubHandle}`, never a literal; name / title / tagline / bio / about-subtitle / career TL;DR / interests / roles / philosophy quotes + keywords are text, so they live in the content dictionaries - `src/data/skills.json` + `skills.ts` loader — skill groups: `{id, skills}`; group titles are text -- `src/data/experience.json` + `experience.ts` loader — work history: company / duration / location / logo / optional `variant: 'current' | 'gap'` (timeline decoration: live node / career break); titles and responsibilities are text -- `src/data/projects.json` + `projects.ts` loader — cards: category / role / technologies / metrics / featured / `sections[].{id, type}`; titles, summaries and section prose are text -- `src/i18n/locales/{vi,en}/content.json` — all content text, keyed by the structure ids; `src/i18n/locales/{vi,en}/ui.json` — every chrome string in its own language (nav group labels, Mode options, language names `langEn` / `langVi`, action labels, social `aria-label`s, the resume's section labels) +- `src/data/experience.json` + `experience.ts` loader — work history: id / location / logo / optional `variant: 'current' | 'gap'` (timeline decoration: live node / career break); company, duration, titles and responsibilities are text — the VI document carries localized dates ("11/2026 – nay") and company labels, en overrides with the originals, proper nouns identical per language +- `src/data/projects.json` + `projects.ts` loader — cards: category / technologies / featured / `sections[].{id, type}`; titles, summaries, role, metrics and section prose are text (role follows the owner's EN title convention; metrics are localized) +- `src/i18n/locales/{vi,en}/content.json` — all content text, keyed by the structure ids; the `profile` record is fixed-keyed (`name`, `title`, `bio`, `subtitle`, `tldr`, `tagline`, `currentInterests`, `roles`, `philosophyQuotes`, `philosophy..{title, description, keywords}`); `src/i18n/locales/{vi,en}/ui.json` — chrome strings only, in each language (nav group labels, Mode options, language names `langEn` / `langVi`, action labels, social `aria-label`s, the resume's section labels, edit-mode labels) — person text never lives here - `src/i18n/index.ts` — load + validate + join ONCE at module load; exports `UI` and `CONTENT` as `Record`; `src/i18n/dict-types.ts` carries the document types; `src/i18n/validate.ts` + `scripts/validate-content.ts` enforce the cross-document rules (orphan or missing keys, HTML markup in text values) — a malformed document fails `pnpm build`, CI, and the browser load, never a silent half-render - `src/i18n/provider.tsx` — `I18nProvider` wraps the app; components consume `const { ui: s, content: c } = useI18n()`: `s` is the chrome of the current language, `c` the joined records (`c.profile`, `c.skillGroups`, `c.experiences`, `c.projects`). There is no `field()` and no `*En` field pair anymore - Translation is a JSON edit, never a component edit; a new language is a new locale directory plus one `Language` union member diff --git a/docs/design/specs/v4/spec-v4-live-edit.md b/docs/design/specs/v4/spec-v4-live-edit.md index 904a3c5..5ea0af8 100644 --- a/docs/design/specs/v4/spec-v4-live-edit.md +++ b/docs/design/specs/v4/spec-v4-live-edit.md @@ -135,13 +135,16 @@ Structure (language-neutral) and text (per language) are separate documents join ```ts // --- structure (src/data/*.json) --- +// Shapes as implemented, incl. the row 18–19 follow-up (2026-10-22): display +// strings that are language-dependent (company labels, durations, roles, +// metrics, interests, roles, keywords) moved from structure to text. export type ProjectStructure = { - id: ProjectId; category: ProjectCategory; role: string; technologies: string[]; - metrics?: string[]; featured: boolean; + id: ProjectId; category: ProjectCategory; technologies: string[]; + featured: boolean; sections: Array<{ id: string; type: 'text' | 'diagram' | 'metrics' | 'code' }>; }; export type ExperienceStructure = { - id: ExperienceId; company: string; duration: string; location?: string; + id: ExperienceId; location?: string; variant?: 'current' | 'gap'; logo?: string; }; export type SkillGroupStructure = { id: SkillGroupId; skills: string[] }; @@ -149,22 +152,24 @@ export type ProfileStructure = { firstName: string; lastName: string; email: string; githubUrl: string; linkedinUrl: string; githubHandle: string; linkedinHandle: string; telegramUrl: string; telegramHandle: string; - currentInterests: string[]; roles: string[]; - philosophy: Array<{ id: PhilosophyId; keywords: string[] }>; + philosophy: Array<{ id: PhilosophyId }>; }; // --- text (src/i18n/locales/{vi,en}/content.json) --- export type SectionText = { title: string; content: string }; export type ProjectText = { - title: string; summary: string; + title: string; summary: string; role: string; metrics?: string[]; sections: Record; // keys validated against the structure's section ids }; -export type ExperienceText = { title: string; responsibilities: string[] }; +export type ExperienceText = { title: string; company: string; duration: string; responsibilities: string[] }; export type SkillGroupText = { title: string }; export type ProfileText = { name: string; title: string; bio: string; - tagline: Array<{ text: string; emphasis?: boolean }>; // D9 — markup lives in Hero.tsx, never in content - philosophy: Record; + subtitle: string; tldr: string; // row 18 — moved out of ui.json + tagline: Array<{ text: string; emphasis?: boolean }>; // D9 — markup lives in Hero.tsx, never in content + currentInterests: string[]; roles: string[]; // row 19 — term lists, EN-only until translated per language + philosophyQuotes: Array<{ title: string; details: string[] }>; // row 18 — the owner's essays + philosophy: Record; }; export type ContentVi = { @@ -301,6 +306,18 @@ Field-by-field disposition. "structure" = `src/data/.json`; "text" = `co | `scripts/generate-resume.ts` `labels` map | — | EXPERIENCE / SKILLS / PROJECTS / UPDATED / QR_ALT → `ui.{vi,en}.json` `resume` section | — | | `resume.ts`, `navigation.ts`, `palettes.ts`, `social.ts`, `site.ts` | unchanged — code config, not content | resume language labels already in `strings.nav` → move with ui | — | +Follow-up — rows 18–19 (2026-10-22 dictionary-boundary audit, implemented). The table above stays as the original migration record; this is the cutover it deferred: + +| Moved | From | To | +|---|---|---| +| `about.subtitle`, `experience.tldrText`, `philosophy.quotes` | `ui.{vi,en}.json` | `profile.subtitle`, `profile.tldr`, `profile.philosophyQuotes` in `content.{vi,en}.json` — person text is content: validated, editable in edit mode | +| `experience.company`, `experience.duration` | `experience.json` | `experience[id].company` / `.duration` in the text documents. VI carries localized values ("11/2026 – nay", "Sẵn sàng cho cơ hội mới", "Nghỉ giữa chặng"); en overrides with the original strings; proper company names are identical per language (en omits); numeric date ranges are locale-neutral and inherited | +| `projects.role`, `projects.metrics` | `projects.json` | `projects[id].role` / `.metrics` in the text documents — role keeps EN (the owner's title convention, same as `profile.title`), metrics localized ("Đã triển khai tại 16 sortations") | +| `profile.currentInterests`, `profile.roles`, `philosophy[].keywords` | `profile.json` | `profile.currentInterests` / `profile.roles` / `profile.philosophy[id].keywords` in the text documents — term lists follow the technologies/skills EN-only convention, now localizable per-field by JSON edit | + +Structure documents now carry only language-neutral fields (§3.2). The join keeps resolved records identical for consumers: components iterate resolved records and never noticed the move. `ui.json` keeps only chrome; `edit.fields` gained labels for the new inline-editable paths. + + Type changes in `src/types/index.ts`: every `*En` optional is deleted from the 6 interfaces; id unions added (§3.1); structure/text/resolved types as §3.2. The old `Project` / `ProjectDetail` / `ExperienceEntry` interfaces are replaced by `*Structure` + `Resolved*` types — no shim left behind. --- @@ -315,7 +332,7 @@ The site itself gains an edit mode. There is no second preview machinery — the - **Draft initialization:** the draft is initialized from **live repository files fetched through the proxy** (`GET` per document + its `last_commit_sha`), not from the bundle — the bundle may be older than master if anyone edited via Gitea web since the last build, and a bundle-seeded draft would silently revert those edits. The static bundle is used only as an offline fallback, with a visible "stale" warning. - **Mechanism:** edit mode wraps `` in ``. All pages, all components, both languages render the draft — text **and** structure. - **Inline text editing:** rendered text nodes bound to a text-document path become editable on focus (`contentEditable`); blur writes `{ path, value }` into the draft. Editing `projects['iot-dws-integration'].title` updates the card on `/projects`, the header on `/projects/:id`, and the featured block on the home page **simultaneously** — one draft, every consumer. -- **Editable surface (curated scope):** inline editing covers **text documents only** — profile bio and tagline (each tagline segment is an individually editable span; the `emphasis` toggle is edited in the JSON panel), project titles/summaries/section content, experience titles/responsibilities, skill group titles, philosophy titles/descriptions. `ui.json` is **read-only** in v4 (labels/aria are low-frequency chrome). This bounds the wrapping work to the ~40 content render sites, not the 130+ UI-string sites. Adjacent tagline segments are separate edit targets — the caret does not cross a segment boundary; intended behavior (D9), not a bug. +- **Editable surface (curated scope):** inline editing covers **text documents only** — profile bio and tagline (each tagline segment is an individually editable span; the `emphasis` toggle is edited in the JSON panel), profile subtitle / career TL;DR / philosophy quote titles+paragraphs (row 18), project titles/summaries/section content/role, experience titles/companies/durations/responsibilities (row 19), skill group titles, philosophy titles/descriptions. Tag arrays (`currentInterests`, `roles`, `keywords`, `metrics`) are JSON-panel-only — tag chips are not inline-edit targets. `ui.json` is **read-only** in v4 (labels/aria are low-frequency chrome). This bounds the wrapping work to the ~40 content render sites, not the 130+ UI-string sites. Adjacent tagline segments are separate edit targets — the caret does not cross a segment boundary; intended behavior (D9), not a bug. - **Structural editing:** add/remove/edit records in the structure documents and their text entries happens in a JSON panel docked beside the page (the panel edits the draft documents directly; the live page re-renders on every valid change). The panel validates against §3.2/§3.6 before accepting — an invalid draft never reaches the preview. - **Language/theme:** the existing language, theme, and palette controls work unchanged inside edit mode — the owner previews exactly what visitors will see. - **Save:** a persistent save bar lists the diff (changed paths per document), runs the §3.6 validator on the full draft, then PUTs each touched document through the proxy (§6). Unsaved draft is invisible to visitors. @@ -538,7 +555,7 @@ Resolved by owner decision during the 2026-10-22 review: - **`profile.tagline`** → Decision D9 (segment the value; markup moves to `Hero.tsx`). - Display name (rev.1 Q3) → Decision D6. `ui.json` editability (rev.1 Q4) → §5.1 editable surface: read-only in v4. -Open — recorded by the 2026-10-22 dictionary-boundary audit (owner decision: record now, fix later): +Resolved — 2026-10-22 dictionary-boundary audit, implemented the same day (rows 18–19): An audit of every key in `ui.{vi,en}.json` against the D1/D2 boundary (language-neutral structure / per-language text / chrome) found exactly three keys that hold person content inside the chrome document — and because §3.3/§5.1 keep `ui.json` read-only in edit mode, the owner cannot edit these own texts through `?edit`: @@ -548,9 +565,9 @@ An audit of every key in `ui.{vi,en}.json` against the D1/D2 boundary (language- Everything else in `ui.json` is chrome (nav/aria/CTA labels, section headings, category labels, resume and edit-mode strings); conversely nothing in `content.json` belongs in the structure documents — `profile.name` is localized by D6, `experience.*.title` is language-dependent by nature. -Fix when scheduled (Plan A, row 18): move the three values into the `profile` record of the text documents — `profile.subtitle`, `profile.tldr`, `profile.philosophyQuotes: [{ title, details: [string] }]` — a fixed record, not id-keyed, so §3.6 rule 2 is untouched; extend `ProfileText` in `dict-types.ts` (vi required, en optional per-field); repoint the four call sites; wrap them with `EditableText` (`SectionHeading`'s `subtitle` prop becomes `ReactNode`); update the JsonPanel content-tab shape hint; delete the keys from both `ui` documents — `UIDict = typeof uiViJson` makes `tsc` the migration net. +Fix applied (Plan A, row 18): the three values now live in the `profile` record of the text documents — `profile.subtitle`, `profile.tldr`, `profile.philosophyQuotes` (a fixed record, not id-keyed, so §3.6 rule 2 was untouched); `ProfileText` extended (vi required, en optional per-field); the four call sites repointed and wrapped with `EditableText`; `SectionHeading`'s `subtitle` prop is `ReactNode`; the JsonPanel content-tab hint updated; the keys deleted from both `ui` documents. `UIDict = typeof uiViJson` proved to be the migration net — every stale call site was a tsc error. -Owner decision still open (row 19 — not a rule violation, §4 assigns these to structure deliberately): language-dependent strings rendered untranslated on Vietnamese pages — `experience.company` of the two non-company entries ("Open to new opportunities", "Career break"), `duration` month names, `profile.currentInterests` / `roles` / `philosophy[].keywords`, `projects.role` / `metrics`. Localizing them reverses §4 (types, loaders, validator, resume generator): data would keep machine-readable dates (`start`/`end`) with the display string moved to the text documents. +Row 19 implemented: `experience.company`/`.duration`, `projects.role`/`.metrics`, `profile.currentInterests`/`roles`, and `philosophy[].keywords` moved from structure documents to the text documents (disposition table in §4, follow-up). Recorded decisions: human-language strings are localized into Vietnamese (numeric date ranges + "nay", descriptive company labels, metrics); proper nouns stay identical per language (en omits); term lists and job titles (`currentInterests`, `roles`, `keywords`, `role`) follow the technologies/skills EN-only convention — the owner's own titles render EN in both languages today — and each is now localizable by a JSON edit alone. No machine-readable date model: the display strings moved as-is, ordering remains array order, `variant` still marks the live entry. Deferred (not v4): @@ -577,5 +594,5 @@ Deferred (not v4): | 15 | Edit mode 3c: save bar, conflicts, failure recovery | 3 | ✅ Done 2026-10-22 (automated) — `EditBar.tsx`: changed-path diff with per-path revert and per-document discard, validate-before-save, sequential-PUT progress lines (written / conflict / failed), resume after partial failure, conflict actions (rebase / take-theirs / hand-merge), exit confirm when dirty. Verified via the same (now deleted) SSR smoke — vi markup carried the conflict controls, save statuses, and the resume button. ⬜ Browser + Gitea: save → commit → queued CI deploy → live change; full 412 flow against a real stale sha | | 16 | Layout designer research (WYSIWYG / layout config) | deferred | ⬜ Out of v4 scope | | 17 | Target-branch editing (D10): `?edit=`, `?ref=` on GET, `branch` on PUT, branch chip + merge hint | 3 | ✅ Done 2026-10-22 (automated) — tri-state URL parsing with git-ref validation (`edit-mode.ts`), `?ref=` on every document GET and `branch` in every PUT body (`draft.ts`, incl. the 412-refresh and id-union legs), branch persisted beside the session flag, EditBar branch chip + merge hint on non-default branches (`ui.json` `branchLabel`/`mergeHint`). Verified: `pnpm build`, `pnpm lint` (no new warnings), `scripts/smoke-draft.ts` 7/7, throwaway wiring smoke (URL tri-state, ref/branch transport, EditBar render for branch vs master) — deleted after the run. ⬜ Browser + Gitea: edit on a non-master branch → commits land there; merge → deploy | -| 18 | Move the three person-content keys out of `ui.json` (§11 Open item): `about.subtitle` → `profile.subtitle`, `experience.tldrText` → `profile.tldr`, `philosophy.quotes` → `profile.philosophyQuotes`; extend `ProfileText`, repoint 4 call sites, `EditableText` wrap + `SectionHeading` `subtitle: ReactNode`, JsonPanel hint update; `tsc` is the migration net | post-v4 | ⬜ TODO — recorded 2026-10-22 by the dictionary-boundary audit; owner chose record-only | -| 19 | Owner decision: localize the §4 structure-assigned strings (`experience.company` of non-company entries, `duration`, `currentInterests`, `roles`, `keywords`, `projects.role`/`metrics`) or keep them EN-only like `technologies` | open question | ⬜ Open — recorded 2026-10-22; reverses §4 if adopted | +| 18 | Move the three person-content keys out of `ui.json` (§11): `about.subtitle` → `profile.subtitle`, `experience.tldrText` → `profile.tldr`, `philosophy.quotes` → `profile.philosophyQuotes`; extend `ProfileText`, repoint 4 call sites, `EditableText` wrap + `SectionHeading` `subtitle: ReactNode`, JsonPanel hint update; `tsc` is the migration net | post-v4 | ✅ Done 2026-10-22 (automated) — values in both `content.{vi,en}.json`, keys deleted from both `ui` documents, `edit.fields` labels added; verified: `pnpm build`, `pnpm validate:content`, `pnpm lint` (no new warnings), `scripts/smoke-draft.ts` 7/7, throwaway SSR smoke asserting the subtitle / TL;DR / essay markers on `/about`, home + `/experience`, `/philosophy` in both languages — deleted after the run. ⬜ Browser: inline-edit the three fields in `?edit` | +| 19 | Localize the §4 structure-assigned strings (`experience.company` of non-company entries, `duration`, `currentInterests`, `roles`, `keywords`, `projects.role`/`metrics`) or keep them EN-only like `technologies` | post-v4 | ✅ Done 2026-10-22 (automated) — fields moved to the text documents (§4 follow-up); VI document carries localized values (numeric dates + "nay", "Sẵn sàng cho cơ hội mới", "Nghỉ giữa chặng", "Đã triển khai tại 16 sortations", "Xử lý 70.000 ảnh/tháng"), en overrides with the originals, proper nouns and term lists identical (en omits); company/duration/role inline-editable, tag arrays JSON-panel-only; templates in `draft.ts` and JsonPanel hints follow the new shapes; resume generator reads `profile.tldr` from content. Verified: `pnpm build`, `pnpm validate:content`, `pnpm lint` (no new warnings), `pnpm build:resume-all` (both PDFs), SSR smoke marker sets per language incl. localized durations/companies/metrics/roles on home + `/experience` + project detail — deleted after the run. ⬜ Browser: VI pages show the localized timeline; `?edit` company/duration/role | diff --git a/scripts/generate-resume.ts b/scripts/generate-resume.ts index 1c9a493..acb1757 100644 --- a/scripts/generate-resume.ts +++ b/scripts/generate-resume.ts @@ -154,7 +154,7 @@ function renderTldr(lang: Language): string { return `
${escapeHtml(UI[lang].experience.tldr)}
-
${escapeHtml(UI[lang].experience.tldrText)}
+
${escapeHtml(CONTENT[lang].profile.tldr)}
`; } diff --git a/src/components/layout/JsonPanel.tsx b/src/components/layout/JsonPanel.tsx index 8e864d8..ad5478d 100644 --- a/src/components/layout/JsonPanel.tsx +++ b/src/components/layout/JsonPanel.tsx @@ -22,14 +22,14 @@ const PANEL_TABS: PanelTab[] = [...DRAFT_DOCS.map((d) => d.id), 'ui.vi', 'ui.en' // discoverable without reading the spec (§5.4). const SHAPES: Record = { profile: - 'profile.json — { firstName, lastName, email, githubUrl, linkedinUrl, githubHandle, linkedinHandle, telegramUrl, telegramHandle, currentInterests: [string], roles: [string], philosophy: [{ id, keywords: [string] }] }', + 'profile.json — { firstName, lastName, email, githubUrl, linkedinUrl, githubHandle, linkedinHandle, telegramUrl, telegramHandle, philosophy: [{ id }] }', skills: 'skills.json — [{ id, skills: [string] }]', experience: - 'experience.json — [{ id, company, duration, location?, variant?: "current" | "gap", logo? }]', + 'experience.json — [{ id, location?, variant?: "current" | "gap", logo? }]', projects: - 'projects.json — [{ id, category, role, technologies: [string], metrics?: [string], featured, sections: [{ id, type: "text" | "diagram" | "metrics" | "code" }] }]', + 'projects.json — [{ id, category, technologies: [string], featured, sections: [{ id, type: "text" | "diagram" | "metrics" | "code" }] }]', 'content.vi': - 'content.vi.json — { profile: { name, title, tagline: [{ text, emphasis? }], bio, philosophy: { : { title, description } } }, skills: { : { title } }, experience: { : { title, responsibilities: [string] } }, projects: { : { title, summary, sections: { : { title, content } } } } }', + 'content.vi.json — { profile: { name, title, tagline: [{ text, emphasis? }], bio, subtitle, tldr, currentInterests: [string], roles: [string], philosophyQuotes: [{ title, details: [string] }], philosophy: { : { title, description, keywords: [string] } } }, skills: { : { title } }, experience: { : { title, company, duration, responsibilities: [string] } }, projects: { : { title, summary, role, metrics?: [string], sections: { : { title, content } } } } }', 'content.en': 'content.en.json — same tree; every field optional, a missing field renders the Vietnamese value', 'ui.vi': 'locales/vi/ui.json — chrome strings; read-only in edit mode (Phase 4)', diff --git a/src/components/sections/Experience.tsx b/src/components/sections/Experience.tsx index 28cd863..7bd0655 100644 --- a/src/components/sections/Experience.tsx +++ b/src/components/sections/Experience.tsx @@ -36,9 +36,13 @@ export function Experience() { {exp.title} -
{exp.company}
+ + {exp.company} +
- {exp.duration} + + {exp.duration} + {exp.location && ( {exp.location} )} @@ -61,7 +65,9 @@ export function Experience() {
diff --git a/src/components/ui/SectionHeading.tsx b/src/components/ui/SectionHeading.tsx index 806337e..4ead6e7 100644 --- a/src/components/ui/SectionHeading.tsx +++ b/src/components/ui/SectionHeading.tsx @@ -1,6 +1,10 @@ +import type { ReactNode } from 'react' + interface SectionHeadingProps { title: string - subtitle?: string + // The caller supplies the subtitle element (a plain

, or an EditableText + // bound to `profile.subtitle` in edit mode) — SectionHeading only places it. + subtitle?: ReactNode tag?: string id?: string } @@ -10,7 +14,7 @@ export function SectionHeading({ title, subtitle, tag, id }: SectionHeadingProps

{tag && {tag}}

{title}

- {subtitle &&

{subtitle}

} + {subtitle}
) } diff --git a/src/data/experience.json b/src/data/experience.json index 7755419..16bbcf1 100644 --- a/src/data/experience.json +++ b/src/data/experience.json @@ -1,33 +1,23 @@ [ { "id": "open-to-work", - "company": "Open to new opportunities", - "duration": "Nov 2026 – Present", "variant": "current" }, { "id": "relax-gap", - "company": "Career break", - "duration": "Aug 2026 – Oct 2026", "variant": "gap" }, { "id": "lazada-senior-swe", - "company": "Lazada Tech Hub Vietnam", - "duration": "Jan 2020 – Aug 2026", "location": "Ho Chi Minh City, Vietnam", "logo": "lazada" }, { "id": "nexts-founder", - "company": "Nexts Limited Company", - "duration": "06/2019 – 12/2019", "location": "Ho Chi Minh City, Vietnam" }, { "id": "sap-senior-swe", - "company": "SAP Lab Vietnam", - "duration": "2017 – 12/2019", "location": "Ho Chi Minh City, Vietnam", "logo": "sap" } diff --git a/src/data/experience.ts b/src/data/experience.ts index d72bfc0..cbba6c5 100644 --- a/src/data/experience.ts +++ b/src/data/experience.ts @@ -1,7 +1,7 @@ // Typed loader for the experience structure document (spec-v4 D2) — see the -// note in profile.ts. Titles and responsibilities are localized text in the -// content dictionaries; company, duration, location, variant, and logo are -// language-neutral structure. +// note in profile.ts. Titles, company, duration, and responsibilities are +// localized text in the content dictionaries (row 19); location, variant, and +// logo are language-neutral structure. import experienceJson from './experience.json'; import type { ExperienceStructure } from '../i18n/dict-types'; diff --git a/src/data/profile.json b/src/data/profile.json index d75b280..8b6af64 100644 --- a/src/data/profile.json +++ b/src/data/profile.json @@ -8,62 +8,21 @@ "linkedinHandle": "dong-nz", "telegramUrl": "https://t.me/dongdn", "telegramHandle": "dongdn", - "currentInterests": [ - "AI in logistics", - "Digital twins", - "Simulation", - "LLM", - "Computer Vision", - "High-performance systems" - ], - "roles": [ - "System Architect", - "Full-Stack Developer", - "System Engineer", - "AI/ML Application Engineer" - ], "philosophy": [ { - "id": "build-for-the-real-problem", - "keywords": [ - "Problem-first", - "Business value", - "Measurement" - ] + "id": "build-for-the-real-problem" }, { - "id": "think-in-systems", - "keywords": [ - "Architecture", - "Integration", - "Scalability", - "Reliability" - ] + "id": "think-in-systems" }, { - "id": "measure-impact", - "keywords": [ - "Performance", - "Reliability", - "Cost", - "Efficiency" - ] + "id": "measure-impact" }, { - "id": "keep-learning", - "keywords": [ - "AI/ML", - "Computer Vision", - "LLM", - "Distributed systems" - ] + "id": "keep-learning" }, { - "id": "business-domain-knowledge-is-a-key-of-success", - "keywords": [ - "Biz knowledge", - "Business value" - ] + "id": "business-domain-knowledge-is-a-key-of-success" } ] } diff --git a/src/data/profile.ts b/src/data/profile.ts index d4a68c6..0952a22 100644 --- a/src/data/profile.ts +++ b/src/data/profile.ts @@ -1,4 +1,5 @@ // Typed loader for the profile structure document (spec-v4 D2). Localized text +// — including interests, roles, and philosophy keywords/quotes (row 19) — // lives in src/i18n/locales and is joined in src/i18n/index.ts; this module // exports the language-neutral structure under today's name, for the i18n // loader and for scripts/generate-sitemap.ts. diff --git a/src/data/projects.json b/src/data/projects.json index 7273ddf..8a1bf39 100644 --- a/src/data/projects.json +++ b/src/data/projects.json @@ -2,7 +2,6 @@ { "id": "iot-dws-integration", "category": "logistics", - "role": "Senior Software Engineer — System Owner", "technologies": [ "Java", "HTTP", @@ -10,9 +9,6 @@ "RocketMQ", "DWS" ], - "metrics": [ - "16 sortations deployed" - ], "featured": true, "sections": [ { @@ -44,7 +40,6 @@ { "id": "awb-detection", "category": "computer-vision", - "role": "Senior Software Engineer — ML Engineering", "technologies": [ "Python", "OpenCV", @@ -52,9 +47,6 @@ "ONNX", "OCR" ], - "metrics": [ - "70,000 images/month processed" - ], "featured": true, "sections": [ { @@ -82,7 +74,6 @@ { "id": "facility-management", "category": "software-engineering", - "role": "Senior Software Engineer — Platform Design", "technologies": [ "Go", "TypeScript", @@ -108,7 +99,6 @@ { "id": "local-llm-experiments", "category": "experiment", - "role": "Engineering Experiment", "technologies": [ "llama.cpp", "Qwen", diff --git a/src/data/projects.ts b/src/data/projects.ts index bb39348..c0db210 100644 --- a/src/data/projects.ts +++ b/src/data/projects.ts @@ -1,8 +1,9 @@ // Typed loader for the projects structure document (spec-v4 D2) — see the note -// in profile.ts. Titles, summaries, and section prose are localized text in the -// content dictionaries; ids, categories, roles, technologies, metrics, -// featured, and section {id, type} are language-neutral structure. Project ids -// already appear in URLs and the sitemap, so they are the stable join keys. +// in profile.ts. Titles, summaries, roles, metrics, and section prose are +// localized text in the content dictionaries (row 19); ids, categories, +// technologies, featured, and section {id, type} are language-neutral +// structure. Project ids already appear in URLs and the sitemap, so they are +// the stable join keys. import projectsJson from './projects.json'; import type { ProjectStructure } from '../i18n/dict-types'; diff --git a/src/i18n/dict-types.ts b/src/i18n/dict-types.ts index 5cd8a27..42b84a1 100644 --- a/src/i18n/dict-types.ts +++ b/src/i18n/dict-types.ts @@ -21,17 +21,16 @@ export type ProjectSectionStructure = { export type ProjectStructure = { id: ProjectId; category: ProjectCategory; - role: string; technologies: string[]; - metrics?: string[]; featured: boolean; sections: ProjectSectionStructure[]; }; +// Only language-neutral fields stay: location is a proper noun, `variant` and +// `logo` are decoration switches. Company and duration are display strings and +// therefore text (row 19) — the timeline renders them per language. export type ExperienceStructure = { id: ExperienceId; - company: string; - duration: string; location?: string; variant?: 'current' | 'gap'; logo?: string; @@ -49,11 +48,10 @@ export type ProfileStructure = { linkedinHandle: string; telegramUrl: string; telegramHandle: string; - currentInterests: string[]; - roles: string[]; // The display name is localized (D6) and therefore lives in the text // documents, never here; only the language-neutral name parts stay. - philosophy: Array<{ id: PhilosophyId; keywords: string[] }>; + // Philosophy keeps only the ordered ids — keywords are display text (row 19). + philosophy: Array<{ id: PhilosophyId }>; }; // --- text (src/i18n/locales/{vi,en}/content.json) --- @@ -69,10 +67,17 @@ export type SectionText = { title: string; content: string }; export type ProjectText = { title: string; summary: string; + role: string; + metrics?: string[]; sections: Record; }; -export type ExperienceText = { title: string; responsibilities: string[] }; +export type ExperienceText = { + title: string; + company: string; + duration: string; + responsibilities: string[]; +}; export type SkillGroupText = { title: string }; @@ -80,8 +85,22 @@ export type ProfileText = { name: string; title: string; bio: string; + // Row 18: the /about heading subtitle, the timeline TL;DR line, and the + // philosophy essays are person text, not chrome — they moved out of ui.json + // so edit mode can edit them like any other content. + subtitle: string; + tldr: string; tagline: TaglineSegment[]; - philosophy: Record; + // Row 19: tag lists are display text. Term lists (interests, roles) follow + // the technologies/skills convention — EN-only until the owner translates + // them in the text document; the field is now localizable per language. + currentInterests: string[]; + roles: string[]; + philosophyQuotes: Array<{ title: string; details: string[] }>; + philosophy: Record< + PhilosophyId, + { title: string; description: string; keywords: string[] } + >; }; export type ContentVi = { diff --git a/src/i18n/draft.ts b/src/i18n/draft.ts index 8e12134..808e4f2 100644 --- a/src/i18n/draft.ts +++ b/src/i18n/draft.ts @@ -410,17 +410,17 @@ export class DraftStore { if (kind === 'project') { const projects = structuredClone(this.dataOf('projects')) as Record[]; const id = uniqueId('new-project', projects.map((p) => p.id)); - projects.push({ id, category: 'experiment', role: 'Owner', technologies: [], featured: false, sections: [] }); + projects.push({ id, category: 'experiment', technologies: [], featured: false, sections: [] }); candidates.set('projects', projects); - const stub = { title: 'New project', summary: 'Write the summary here.', sections: {} }; + const stub = { title: 'New project', summary: 'Write the summary here.', role: 'Owner', sections: {} }; vi.projects = { ...vi.projects, [id]: structuredClone(stub) }; en.projects = { ...en.projects, [id]: structuredClone(stub) }; } else if (kind === 'experience') { const experiences = structuredClone(this.dataOf('experience')) as Record[]; const id = uniqueId('new-experience', experiences.map((e) => e.id)); - experiences.push({ id, company: 'New company', duration: 'present' }); + experiences.push({ id }); candidates.set('experience', experiences); - const stub = { title: 'New role', responsibilities: ['Write a responsibility here.'] }; + const stub = { title: 'New role', company: 'New company', duration: 'present', responsibilities: ['Write a responsibility here.'] }; vi.experience = { ...vi.experience, [id]: structuredClone(stub) }; en.experience = { ...en.experience, [id]: structuredClone(stub) }; } else if (kind === 'skill-group') { @@ -434,9 +434,9 @@ export class DraftStore { const profile = structuredClone(this.dataOf('profile')) as Record; const points = profile.philosophy as Record[]; const id = uniqueId('new-philosophy-point', points.map((p) => p.id)); - points.push({ id, keywords: ['new-keyword'] }); + points.push({ id }); candidates.set('profile', profile); - const stub = { title: 'New principle', description: 'Write the principle here.' }; + const stub = { title: 'New principle', description: 'Write the principle here.', keywords: ['new-keyword'] }; vi.profile = { ...vi.profile, philosophy: { ...vi.profile.philosophy, [id]: structuredClone(stub) } }; en.profile = { ...en.profile, philosophy: { ...en.profile.philosophy, [id]: structuredClone(stub) } }; } else { diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 9338988..f28f79e 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -18,6 +18,7 @@ import type { ProfileText, ProjectSectionStructure, ProjectStructure, + ProjectText, SectionText, SkillGroupStructure, SkillGroupText, @@ -71,15 +72,14 @@ export const UI: Record = { vi: uiVi, en: uiEn }; // Resolved records: structure joined with text. These are the shapes every // component consumes. export type ResolvedProjectSection = ProjectSectionStructure & SectionText; -export type ResolvedProject = Omit & { - title: string; - summary: string; - sections: ResolvedProjectSection[]; -}; +export type ResolvedProject = Omit & + Pick & { + sections: ResolvedProjectSection[]; + }; export type ResolvedExperienceEntry = ExperienceStructure & ExperienceText; export type ResolvedSkillGroup = SkillGroupStructure & SkillGroupText; -// Structure carries philosophy as an ordered {id, keywords} array, text as a -// Record keyed by id — the join merges them back into one ordered array. +// Structure carries philosophy as the ordered id array, text as a Record +// keyed by id — the join merges them back into one ordered array. export type ResolvedPhilosophyPoint = { id: PhilosophyId; keywords: string[]; @@ -120,6 +120,8 @@ function joinContent(structures: ContentStructures, text: ContentVi): ResolvedCo ...project, title: text_.title, summary: text_.summary, + role: text_.role, + metrics: text_.metrics, sections: project.sections.map((section) => ({ ...section, ...text_.sections[section.id], diff --git a/src/i18n/locales/en/content.json b/src/i18n/locales/en/content.json index 296eb86..b92110c 100644 --- a/src/i18n/locales/en/content.json +++ b/src/i18n/locales/en/content.json @@ -2,11 +2,23 @@ "profile": { "name": "Dong Nguyen", "bio": "Senior Software Engineer with experience building distributed systems, logistics technology, and AI/ML applications for real-world problems. Focused on system architecture, integration, and production-grade solutions.", + "subtitle": "Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications.", + "tldr": "15 years of experience, more than 8 companies along the way. Too long to tell.", "tagline": [ { "text": "Building scalable software systems, intelligent logistics solutions, and practical AI applications." } ], + "philosophyQuotes": [ + { + "title": "Time is priceless", + "details": [ + "Time is priceless. You can’t buy it, pause it, or rewind it. Once it’s gone, it’s gone for good.", + "We spend so much of our lives chasing things—money, status, validation—but time is the one thing we can never earn back.", + "So be mindful of how you use it. Invest it in what truly matters: the people you love, the goals that inspire you, the moments that feed your soul." + ] + } + ], "philosophy": { "build-for-the-real-problem": { "title": "Build for the real problem", @@ -27,17 +39,22 @@ "experience": { "open-to-work": { "title": "Seeking a New Place", + "company": "Open to new opportunities", + "duration": "Nov 2026 – Present", "responsibilities": [ "Open to Senior Engineer roles: system architecture, integration platforms, full-stack delivery" ] }, "relax-gap": { "title": "Relax", + "company": "Career break", + "duration": "Aug 2026 – Oct 2026", "responsibilities": [ "Intentional break between roles — recovering the rhythm before the next system" ] }, "lazada-senior-swe": { + "duration": "Jan 2020 – Aug 2026", "responsibilities": [ "System ownership and architecture design for logistics integration systems", "Developed IoT-DWS integration solution deployed across 16 sortations", @@ -62,6 +79,9 @@ "iot-dws-integration": { "title": "IoT-DWS Integration System", "summary": "Designed and deployed an integration system between IoT devices and DWS (Dimensioning Weighing Scanning) machines across 16 sortations.", + "metrics": [ + "16 sortations deployed" + ], "sections": { "context": { "content": "Took over and rapidly mastered an IoT-DWS system after the previous responsible team member left the project. Needed to quickly understand the current architecture and continue developing the integration solution." @@ -82,6 +102,9 @@ }, "awb-detection": { "summary": "Applied Computer Vision and Machine Learning to automatically detect and OCR shipping labels from camera images on sortation lines.", + "metrics": [ + "70,000 images/month processed" + ], "sections": { "context": { "content": "Sortation machines capture images of packages as they move on conveyor belts. Need to automatically read AWB (Air Waybill) from images for tracking and sorting." diff --git a/src/i18n/locales/en/ui.json b/src/i18n/locales/en/ui.json index 93da667..f37c0e2 100644 --- a/src/i18n/locales/en/ui.json +++ b/src/i18n/locales/en/ui.json @@ -52,7 +52,6 @@ }, "about": { "heading": "About Me", - "subtitle": "Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications.", "engineeringTitle": "How I Think About Engineering", "exploringTitle": "What I'm Exploring", "exploringTitlePage": "What I'm Currently Exploring", @@ -63,8 +62,7 @@ }, "experience": { "heading": "Experience", - "tldr": "TL;DR", - "tldrText": "15 years of experience, more than 8 companies along the way. Too long to tell." + "tldr": "TL;DR" }, "projects": { "featured": "Featured Projects", @@ -96,17 +94,7 @@ "experiments": "Engineering Experiments" }, "philosophy": { - "heading": "Philosophy", - "quotes": [ - { - "title": "Time is priceless", - "details": [ - "Time is priceless. You can’t buy it, pause it, or rewind it. Once it’s gone, it’s gone for good.", - "We spend so much of our lives chasing things—money, status, validation—but time is the one thing we can never earn back.", - "So be mindful of how you use it. Invest it in what truly matters: the people you love, the goals that inspire you, the moments that feed your soul." - ] - } - ] + "heading": "Philosophy" }, "common": { "resumeDownload": "Get Resume", @@ -176,6 +164,8 @@ "title": "title", "summary": "summary", "bio": "bio", + "subtitle": "about subtitle", + "tldr": "career TL;DR", "tagline": "tagline segment", "groupTitle": "skill group title", "expTitle": "role title", @@ -183,7 +173,12 @@ "sectionTitle": "section title", "sectionContent": "section content", "pointTitle": "philosophy title", - "pointDescription": "philosophy description" + "pointDescription": "philosophy description", + "quoteTitle": "quote title", + "quoteDetail": "quote paragraph", + "company": "company", + "duration": "duration", + "projectRole": "project role" } } } diff --git a/src/i18n/locales/vi/content.json b/src/i18n/locales/vi/content.json index ad7fe74..f0e5dd6 100644 --- a/src/i18n/locales/vi/content.json +++ b/src/i18n/locales/vi/content.json @@ -3,6 +3,8 @@ "name": "Nguyễn Đông", "title": "Senior Software Engineer", "bio": "Senior Software Engineer với kinh nghiệm xây dựng hệ thống phân tán, logistics technology, và ứng dụng AI/ML vào bài toán thực tế. Tập trung vào system architecture, integration, và production-grade solutions.", + "subtitle": "Kỹ sư phần mềm cao cấp với chuyên môn sâu về hệ thống phân tán, công nghệ logistics và ứng dụng AI thực tiễn.", + "tldr": "15 năm kinh nghiệm, hơn 8 công ty đã đi qua. Quá dài để kể hết.", "tagline": [ { "text": "Phần lớn thời gian tôi là Backend Software Engineer. Muốn tôi là Full Stack Developer, " @@ -15,26 +17,77 @@ "text": ", có thể." } ], + "currentInterests": [ + "AI in logistics", + "Digital twins", + "Simulation", + "LLM", + "Computer Vision", + "High-performance systems" + ], + "roles": [ + "System Architect", + "Full-Stack Developer", + "System Engineer", + "AI/ML Application Engineer" + ], + "philosophyQuotes": [ + { + "title": "Thời gian là vô giá", + "details": [ + "Thời gian là vô giá. Bạn không thể mua nó bằng tiền, không thể khiến nó dừng lại, cũng chẳng thể quay ngược về quá khứ. Một khi thời gian đã trôi qua, nó sẽ mãi mãi không trở lại.", + "Chúng ta dành quá nhiều thời gian trong cuộc đời để theo đuổi những thứ như tiền bạc, địa vị và sự công nhận từ người khác. Nhưng thời gian là thứ duy nhất mà chúng ta không bao giờ có thể lấy lại.", + "Vì vậy, hãy luôn ý thức về cách bạn sử dụng thời gian của mình. Hãy dành thời gian cho những điều thực sự quan trọng: những người bạn yêu thương, những mục tiêu truyền cảm hứng cho bạn và những khoảnh khắc nuôi dưỡng tâm hồn bạn." + ] + } + ], "philosophy": { "build-for-the-real-problem": { "title": "Giải pháp được xây dựng dựa trên vấn đề thực tế", - "description": "Không bắt đầu bằng technology. Bắt đầu bằng problem." + "description": "Không bắt đầu bằng technology. Bắt đầu bằng problem.", + "keywords": [ + "Problem-first", + "Business value", + "Measurement" + ] }, "think-in-systems": { "title": "Think in systems", - "description": "Quan tâm đến kiến trúc tổng thể, không chỉ từng component." + "description": "Quan tâm đến kiến trúc tổng thể, không chỉ từng component.", + "keywords": [ + "Architecture", + "Integration", + "Scalability", + "Reliability" + ] }, "measure-impact": { "title": "Measure impact", - "description": "Technical implementation phải gắn với measurable outcome." + "description": "Technical implementation phải gắn với measurable outcome.", + "keywords": [ + "Performance", + "Reliability", + "Cost", + "Efficiency" + ] }, "keep-learning": { "title": "Keep learning", - "description": "Continuous exploration of new technologies and approaches." + "description": "Continuous exploration of new technologies and approaches.", + "keywords": [ + "AI/ML", + "Computer Vision", + "LLM", + "Distributed systems" + ] }, "business-domain-knowledge-is-a-key-of-success": { "title": "Kiến thức nghiệp vụ là chìa khóa thành công", - "description": "Hiểu sâu về business domain giúp hiểu rõ vấn đề và đưa ra giải pháp phù hợp." + "description": "Hiểu sâu về business domain giúp hiểu rõ vấn đề và đưa ra giải pháp phù hợp.", + "keywords": [ + "Biz knowledge", + "Business value" + ] } } }, @@ -61,12 +114,16 @@ "experience": { "open-to-work": { "title": "Đang tìm nơi làm việc mới", + "company": "Sẵn sàng cho cơ hội mới", + "duration": "11/2026 – nay", "responsibilities": [ "Sẵn sàng cho vai trò Senior Engineer: system architecture, integration platform, full-stack delivery" ] }, "relax-gap": { "title": "Nghỉ ngơi", + "company": "Nghỉ giữa chặng", + "duration": "08/2026 – 10/2026", "responsibilities": [ "Nghỉ có chủ đích giữa hai vai trò — lấy lại nhịp trước khi nhận hệ thống tiếp theo", "Tự thử nghiệm theo nhịp riêng: local LLM với llama.cpp, đọc về Computer Vision" @@ -74,6 +131,8 @@ }, "lazada-senior-swe": { "title": "Senior Software Engineer", + "company": "Lazada Tech Hub Vietnam", + "duration": "01/2020 – 08/2026", "responsibilities": [ "System ownership và architecture design cho logistics integration systems", "Developed IoT-DWS integration solution deployed across 16 sortations", @@ -84,12 +143,16 @@ }, "nexts-founder": { "title": "Người sáng lập", + "company": "Nexts Limited Company", + "duration": "06/2019 – 12/2019", "responsibilities": [ "Phát triển giải pháp cho xe tự hành, thu thập dữ liệu thời gian thực từ cảm biến và hệ thống onboard: LiDAR, camera, GPS, CAN bus." ] }, "sap-senior-swe": { "title": "Senior Software Engineer", + "company": "SAP Lab Vietnam", + "duration": "2017 – 12/2019", "responsibilities": [ "Team leader quản lý sản phẩm B1 Integration" ] @@ -99,6 +162,10 @@ "iot-dws-integration": { "title": "Tích hợp hệ thống IoT-DWS", "summary": "Thiết kế và triển khai hệ thống integration giữa IoT devices và DWS (Dimensioning Weighing Scanning) machines cho 16 sortations.", + "role": "Senior Software Engineer — System Owner", + "metrics": [ + "Đã triển khai tại 16 sortations" + ], "sections": { "context": { "title": "Context", @@ -129,6 +196,10 @@ "awb-detection": { "title": "AWB Detection / Computer Vision", "summary": "Ứng dụng Computer Vision và Machine Learning để tự động phát hiện và OCR shipping label từ hình ảnh camera trên sortation.", + "role": "Senior Software Engineer — ML Engineering", + "metrics": [ + "Xử lý 70.000 ảnh/tháng" + ], "sections": { "context": { "title": "Context", @@ -155,6 +226,7 @@ "facility-management": { "title": "Facility Management Platform", "summary": "Xây dựng nền tảng digital twin cho logistics facilities — mô hình hóa facility, theo dõi real-time, và recommendation system.", + "role": "Senior Software Engineer — Platform Design", "sections": { "vision": { "title": "Vision", @@ -173,6 +245,7 @@ "local-llm-experiments": { "title": "Local LLM Experiments", "summary": "Technical exploration về running local MoE LLMs với llama.cpp — GPU offloading, VRAM optimization, performance tracing.", + "role": "Engineering Experiment", "sections": { "exploration": { "title": "Exploration", diff --git a/src/i18n/locales/vi/ui.json b/src/i18n/locales/vi/ui.json index 014a0f8..4584d60 100644 --- a/src/i18n/locales/vi/ui.json +++ b/src/i18n/locales/vi/ui.json @@ -52,7 +52,6 @@ }, "about": { "heading": "Giới thiệu", - "subtitle": "Kỹ sư phần mềm cao cấp với chuyên môn sâu về hệ thống phân tán, công nghệ logistics và ứng dụng AI thực tiễn.", "engineeringTitle": "Cách tôi tư duy về kỹ thuật", "exploringTitle": "Những điều tôi đang tìm hiểu", "exploringTitlePage": "Những điều tôi đang tìm hiểu", @@ -63,8 +62,7 @@ }, "experience": { "heading": "Kinh nghiệm", - "tldr": "TL;DR", - "tldrText": "15 năm kinh nghiệm, hơn 8 công ty đã đi qua. Quá dài để kể hết." + "tldr": "TL;DR" }, "projects": { "featured": "Dự án nổi bật", @@ -96,17 +94,7 @@ "experiments": "Thí nghiệm kỹ thuật" }, "philosophy": { - "heading": "Triết lý", - "quotes": [ - { - "title": "Thời gian là vô giá", - "details": [ - "Thời gian là vô giá. Bạn không thể mua nó bằng tiền, không thể khiến nó dừng lại, cũng chẳng thể quay ngược về quá khứ. Một khi thời gian đã trôi qua, nó sẽ mãi mãi không trở lại.", - "Chúng ta dành quá nhiều thời gian trong cuộc đời để theo đuổi những thứ như tiền bạc, địa vị và sự công nhận từ người khác. Nhưng thời gian là thứ duy nhất mà chúng ta không bao giờ có thể lấy lại.", - "Vì vậy, hãy luôn ý thức về cách bạn sử dụng thời gian của mình. Hãy dành thời gian cho những điều thực sự quan trọng: những người bạn yêu thương, những mục tiêu truyền cảm hứng cho bạn và những khoảnh khắc nuôi dưỡng tâm hồn bạn." - ] - } - ] + "heading": "Triết lý" }, "common": { "resumeDownload": "Tải CV", @@ -176,6 +164,8 @@ "title": "tiêu đề", "summary": "tóm tắt", "bio": "giới thiệu", + "subtitle": "phụ đề giới thiệu", + "tldr": "TL;DR sự nghiệp", "tagline": "đoạn tagline", "groupTitle": "tiêu đề nhóm kỹ năng", "expTitle": "tên vị trí", @@ -183,7 +173,12 @@ "sectionTitle": "tiêu đề mục", "sectionContent": "nội dung mục", "pointTitle": "tiêu đề nguyên lý", - "pointDescription": "mô tả nguyên lý" + "pointDescription": "mô tả nguyên lý", + "quoteTitle": "tiêu đề trích dẫn", + "quoteDetail": "đoạn trích dẫn", + "company": "công ty", + "duration": "thời gian công tác", + "projectRole": "vai trò dự án" } } } diff --git a/src/pages/AboutPage.tsx b/src/pages/AboutPage.tsx index c484a1b..33e67db 100644 --- a/src/pages/AboutPage.tsx +++ b/src/pages/AboutPage.tsx @@ -23,7 +23,15 @@ export function AboutPage() { > + {c.profile.subtitle} + + } tag={s.about.heading} /> {exp.title} -
{exp.company}
+ + {exp.company} +
- {exp.duration} + + {exp.duration} + {exp.location && {exp.location}}
@@ -58,7 +62,9 @@ export function ExperiencePage() {
diff --git a/src/pages/PhilosophyPage.tsx b/src/pages/PhilosophyPage.tsx index 92c69b8..5101347 100644 --- a/src/pages/PhilosophyPage.tsx +++ b/src/pages/PhilosophyPage.tsx @@ -1,11 +1,12 @@ import {SectionHeading} from '@/components/ui/SectionHeading' +import {EditableText} from '@/components/ui/EditableText' import {motion} from 'motion/react' import {InView} from '@/components/ui/InView' import {useI18n} from '@/i18n/provider' export function PhilosophyPage() { - const {ui: s} = useI18n() + const {ui: s, content: c} = useI18n() return (
- {s.philosophy.quotes.map((quote, i) => ( + {c.profile.philosophyQuotes.map((quote, i) => ( -

+ {quote.title} -

+
{quote.details.map((detail, j) => ( -

{detail}

+ + {detail} + ))}
diff --git a/src/pages/ProjectDetailPage.tsx b/src/pages/ProjectDetailPage.tsx index a74026b..f1f8e48 100644 --- a/src/pages/ProjectDetailPage.tsx +++ b/src/pages/ProjectDetailPage.tsx @@ -108,7 +108,9 @@ export function ProjectDetailPage() { transition={itemTransition(0.24)} >

{s.projectDetail.role}

-

{project.role}

+ + {project.role} +