mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-23 00:20:40 +07:00
feat(ui): v3 enhancements - hero photo, particles, mobile responsive
- Hero photo: circular shape, object-position center top, transparent background - Hero particles: bigger (6-16px), more visible (opacity 0.8) - Mobile: hide hero photo, transparent hero content, fix text/social link colors - Mobile social links: darker border in light mode - Update spec docs and all section components for v3 UI
This commit is contained in:
1 parent
a303d98e41
commit
dd22f3be3a
26 files changed
+810
-504
No files matched your search
@@ -1,7 +1,8 @@
|
||||
# Specification - v3 UI Enhancements
|
||||
|
||||
> **Document:** `spec-v3-ui-enhancements.md`
|
||||
> **Version:** 0.1.0
|
||||
firstName: "Dong",
|
||||
lastName: "Nguyen",
|
||||
name: "Dong Nguyen",
|
||||
> **Parent:** `spec-v2-homepage-enhancements.md`
|
||||
> **Status:** Draft — not yet implemented
|
||||
|
||||
@@ -15,21 +16,21 @@ Enhance the portfolio UI with visual effects inspired by modern developer portfo
|
||||
|
||||
| # | Feature | Status | File(s) |
|
||||
|---|---------|--------|---------|
|
||||
| 1 | Section headers (numbered tags) | ⬜ Pending | `SectionHeading.tsx`, `index.css`, `data/*.ts` |
|
||||
| 2 | Hero: greeting + animated dot | ⬜ Pending | `Hero.tsx`, `App.css` |
|
||||
| 3 | Hero: gradient name highlight | ⬜ Pending | `Hero.tsx`, `App.css` |
|
||||
| 4 | Hero: background grid | ⬜ Pending | `Hero.tsx`, `App.css` |
|
||||
| 5 | Hero: typewriter effect | ⬜ Pending | `Typewriter.tsx`, `Hero.tsx`, `profile.ts`, `index.css` |
|
||||
| 6 | Hero: floating particles | ⬜ Pending | `HeroParticles.tsx`, `Hero.tsx`, `index.css` |
|
||||
| 7 | Hero: scroll indicator | ⬜ Pending | `Hero.tsx`, `App.css` |
|
||||
| 8 | Button: gradient + outline + icon slide | ⬜ Pending | `App.css` |
|
||||
| 9 | Social links: circular + glow | ⬜ Pending | `SocialLinks.tsx`, `Footer.tsx`, `App.css` |
|
||||
| 10 | Scroll animations: AnimatedSection | ⬜ Pending | `AnimatedSection.tsx`, `About.tsx`, `Hero.tsx` |
|
||||
| 11 | Custom cursor | ⬜ Pending | `CustomCursor.tsx`, `Layout.tsx`, `App.css` |
|
||||
| 12 | Projects: overlay + gradients | ⬜ Pending | `Projects.tsx`, `App.css` |
|
||||
| 13 | Footer: back to top | ⬜ Pending | `Footer.tsx`, `App.css` |
|
||||
| 14 | Logo: bracket format | ⬜ Pending | `Navigation.tsx`, `App.css` |
|
||||
|
||||
| 0 | Prerequisites: types + data | ✅ Done | `types/index.ts`, `data/profile.ts`, `SectionHeading.tsx`, `App.css` |
|
||||
| 1 | Section headers (numbered tags) | ✅ Done | `SectionHeading.tsx`, `App.css`, pages/sections |
|
||||
| 2 | Hero: greeting + animated dot | ✅ Done | `Hero.tsx`, `App.css` |
|
||||
| 3 | Hero: gradient name highlight | ✅ Done | `Hero.tsx`, `App.css` |
|
||||
| 4 | Hero: background grid | ✅ Done | `Hero.tsx`, `App.css` |
|
||||
| 5 | Hero: typewriter effect | ✅ Done | `Typewriter.tsx`, `Hero.tsx`, `App.css` |
|
||||
| 6 | Hero: floating particles | ✅ Done | `HeroParticles.tsx`, `Hero.tsx`, `App.css` |
|
||||
| 7 | Hero: scroll indicator | ✅ Done | `Hero.tsx`, `App.css` |
|
||||
| 8 | Button: gradient + outline + icon slide | ✅ Done | `Button.tsx`, `App.css` |
|
||||
| 9 | Scroll animations: AnimatedSection | ✅ Done | `AnimatedSection.tsx`, `AboutPage.tsx` |
|
||||
| 10 | Logo: bracket format | ✅ Done | `Navigation.tsx`, `App.css` |
|
||||
| 11 | Build + verify | ✅ Done | type-check + lint pass (build locked by dev server) |
|
||||
| 12 | Download resume: click outside to close | ✅ Done | `DownloadResume.tsx`, `Hero.tsx`, `App.css`, `hooks/useClickOutside.ts` |
|
||||
| 13 | Download resume: FontAwesome-style icon | ✅ Done | `DownloadResume.tsx`, `Hero.tsx` |
|
||||
| 14 | Mobile: hero section responsive fixes | ✅ Done | `App.css` |
|
||||
---
|
||||
|
||||
## Prerequisites (Type/Data Changes)
|
||||
@@ -78,20 +79,24 @@ export const profile: Profile = {
|
||||
"Open Source Contributor",
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
### 3. SectionHeading Type — Add `tag` prop
|
||||
|
||||
**File:** `src/components/ui/SectionHeading.tsx`
|
||||
|
||||
```tsx
|
||||
interface SectionHeadingProps {
|
||||
title: string
|
||||
subtitle?: string
|
||||
tag?: string // NEW — e.g. "01 — About"
|
||||
id?: string
|
||||
export interface Profile {
|
||||
name: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
title: string;
|
||||
titleEn?: string;
|
||||
tagline: string;
|
||||
taglineEn?: string;
|
||||
bio: string;
|
||||
bioEn?: string;
|
||||
email: string;
|
||||
githubUrl: string;
|
||||
linkedinUrl: string;
|
||||
resumeUrl?: string;
|
||||
currentInterests: string[];
|
||||
roles: string[];
|
||||
philosophy: PhilosophyPoint[];
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -549,14 +554,14 @@ export function SectionHeading({ title, subtitle, tag, id }: SectionHeadingProps
|
||||
```
|
||||
|
||||
**Usage per section:**
|
||||
| Section | Tag | Component |
|
||||
|---------|-----|-----------|
|
||||
| About | `"01 — About"` | `AboutPage.tsx` |
|
||||
| Expertise | `"02 — Expertise"` | `Expertise.tsx` |
|
||||
| Experience | `"03 — Experience"` | `ExperiencePage.tsx` |
|
||||
| Projects | `"04 — Projects"` | `ProjectsListPage.tsx` |
|
||||
| Engineering | `"05 — Engineering"` | `EngineeringPage.tsx` |
|
||||
| Contact | `"06 — Contact"` | `ContactPage.tsx` |
|
||||
| Section | Tag | Component | Current Pattern | Change |
|
||||
|---------|-----|-----------|----------------|--------|
|
||||
| About | `"01 — About"` | `AboutPage.tsx`, `About.tsx` | `SectionHeading` | Add `tag` prop |
|
||||
| Expertise | `"02 — Expertise"` | `Expertise.tsx`, AboutPage.tsx | `SectionHeading` | Add `tag` prop |
|
||||
| Experience | `"03 — Experience"` | `ExperiencePage.tsx`, `Experience.tsx` | `<h2>` inline | Replace with `SectionHeading` |
|
||||
| Projects | `"04 — Projects"` | `ProjectsListPage.tsx`, `Projects.tsx` | No heading / `<h2>` inline | Add `SectionHeading` |
|
||||
| Engineering | `"05 — Engineering"` | `EngineeringPage.tsx` | `<h2>` inline | Replace with `SectionHeading` |
|
||||
| Contact | `"06 — Contact"` | `ContactPage.tsx`, `Contact.tsx` | `SectionHeading` | Add `tag` prop |
|
||||
|
||||
**CSS:**
|
||||
```css
|
||||
@@ -572,73 +577,26 @@ export function SectionHeading({ title, subtitle, tag, id }: SectionHeadingProps
|
||||
```
|
||||
|
||||
**Files:**
|
||||
- `src/components/ui/SectionHeading.tsx`
|
||||
- `src/App.css`
|
||||
- `src/pages/AboutPage.tsx` (add tag)
|
||||
- `src/components/sections/Expertise.tsx` (add tag)
|
||||
- `src/pages/ExperiencePage.tsx` (add tag)
|
||||
- `src/pages/ProjectsListPage.tsx` (add tag)
|
||||
- `src/pages/EngineeringPage.tsx` (add tag)
|
||||
- `src/pages/ContactPage.tsx` (add tag)
|
||||
- `src/components/ui/SectionHeading.tsx` (add `tag` prop)
|
||||
- `src/App.css` (add `.section-tag` styles)
|
||||
- `src/pages/AboutPage.tsx` (add `tag` to 2x `SectionHeading`)
|
||||
- `src/components/sections/About.tsx` (add `tag` to `SectionHeading`)
|
||||
- `src/components/sections/Expertise.tsx` (add `tag` to `SectionHeading`)
|
||||
- `src/pages/ExperiencePage.tsx` (replace `<h2>` with `SectionHeading`)
|
||||
- `src/components/sections/Experience.tsx` (replace `<h2>` with `SectionHeading`)
|
||||
- `src/pages/ProjectsListPage.tsx` (add `SectionHeading` before grid)
|
||||
- `src/components/sections/Projects.tsx` (replace `<h2>` with `SectionHeading`)
|
||||
- `src/pages/EngineeringPage.tsx` (replace `<h2>` with `SectionHeading`)
|
||||
- `src/pages/ContactPage.tsx` (add `tag` to `SectionHeading`)
|
||||
- `src/components/sections/Contact.tsx` (add `tag` to `SectionHeading`)
|
||||
|
||||
---
|
||||
|
||||
## 4. Social Links
|
||||
|
||||
### 4.1 Circular Social Links
|
||||
|
||||
**Effect:** Social icons become circular with border, glow on hover.
|
||||
|
||||
**Implementation:**
|
||||
- Update `.social-link` in both `SocialLinks.tsx` and `Footer.tsx`:
|
||||
- Width/height: `48px`
|
||||
- Border: `1.5px solid rgba(255, 255, 255, 0.15)`
|
||||
- Border radius: `50%`
|
||||
- Remove `<span>` label text (icons only)
|
||||
- Hover: `border-color: var(--accent)`, `color: var(--accent)`, `transform: translateY(-3px)`, `box-shadow: 0 0 30px rgba(96, 165, 250, 0.15)`
|
||||
|
||||
**CSS:**
|
||||
```css
|
||||
.social-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 1.5px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 50%;
|
||||
color: var(--text-secondary);
|
||||
transition: color var(--transition-fast), border-color var(--transition-fast),
|
||||
transform var(--transition-fast), box-shadow var(--transition-fast);
|
||||
}
|
||||
.social-link:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 0 30px rgba(96, 165, 250, 0.15);
|
||||
}
|
||||
.social-link svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
/* Hide label text */
|
||||
.social-link span {
|
||||
display: none;
|
||||
}
|
||||
```
|
||||
|
||||
**SocialLinks.tsx changes:** Remove `<span>{link.label}</span>` from JSX.
|
||||
|
||||
**Files:**
|
||||
- `src/components/ui/SocialLinks.tsx`
|
||||
- `src/components/layout/Footer.tsx`
|
||||
- `src/App.css`
|
||||
|
||||
---
|
||||
|
||||
## 5. Scroll Animations
|
||||
## 4. Scroll Animations
|
||||
|
||||
### 5.1 Unified Animation Wrapper
|
||||
### 4.1 Unified Animation Wrapper
|
||||
|
||||
**Effect:** Sections animate in on scroll with configurable direction and delay.
|
||||
|
||||
@@ -722,258 +680,11 @@ export function AnimatedSection({
|
||||
|
||||
---
|
||||
|
||||
## 6. Custom Cursor (Desktop Only)
|
||||
|
||||
### 6.1 Dot + Follower Cursor
|
||||
|
||||
**Effect:** Small dot follows mouse exactly; larger circle follows with lag. Both expand on hover over interactive elements. Disabled on mobile.
|
||||
## 5. Footer Enhancements
|
||||
|
||||
**Implementation:**
|
||||
- New component: `src/components/ui/CustomCursor.tsx`
|
||||
- Two `div` elements: `.cursor` (8px dot) and `.cursor-follower` (40px circle)
|
||||
- Mouse move listener updates dot position immediately
|
||||
- `requestAnimationFrame` loop interpolates follower position (lerp factor 0.1)
|
||||
- Hover detection on `a, button, .project-card, .skill-tag, .filter-btn, .social-link`
|
||||
- Active state: scale dot to 3x, reduce follower opacity to 0.5
|
||||
- `mix-blend-mode: difference` for dot
|
||||
- Hidden on `≤768px` via CSS media query
|
||||
- Rendered once in `Layout.tsx` (NOT in App.tsx — ensures single instance across routes)
|
||||
|
||||
**CSS:**
|
||||
```css
|
||||
.cursor {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
z-index: 10000;
|
||||
transition: transform 0.1s ease, opacity 0.1s ease;
|
||||
mix-blend-mode: difference;
|
||||
}
|
||||
.cursor-follower {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1.5px solid var(--accent);
|
||||
border-radius: 50%;
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
z-index: 10000;
|
||||
transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.cursor.active {
|
||||
transform: scale(3);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.cursor-follower.active {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.cursor, .cursor-follower { display: none !important; }
|
||||
}
|
||||
```
|
||||
|
||||
**CustomCursor.tsx:**
|
||||
```tsx
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
export function CustomCursor() {
|
||||
const cursorRef = useRef<HTMLDivElement>(null)
|
||||
const followerRef = useRef<HTMLDivElement>(null)
|
||||
const mouseX = useRef(0)
|
||||
const mouseY = useRef(0)
|
||||
const followerX = useRef(0)
|
||||
const followerY = useRef(0)
|
||||
const rafId = useRef<number>(0)
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window === 'undefined' || window.innerWidth <= 768) return
|
||||
|
||||
const handleMouseMove = (e: MouseEvent) => {
|
||||
mouseX.current = e.clientX
|
||||
mouseY.current = e.clientY
|
||||
if (cursorRef.current) {
|
||||
cursorRef.current.style.left = e.clientX + 'px'
|
||||
cursorRef.current.style.top = e.clientY + 'px'
|
||||
}
|
||||
}
|
||||
|
||||
const animate = () => {
|
||||
followerX.current += (mouseX.current - followerX.current) * 0.1
|
||||
followerY.current += (mouseY.current - followerY.current) * 0.1
|
||||
if (followerRef.current) {
|
||||
followerRef.current.style.left = followerX.current + 'px'
|
||||
followerRef.current.style.top = followerY.current + 'px'
|
||||
}
|
||||
rafId.current = requestAnimationFrame(animate)
|
||||
}
|
||||
|
||||
const interactiveSelectors = 'a, button, .project-card, .skill-tag, .filter-btn, .social-link'
|
||||
const handleMouseEnter = () => {
|
||||
cursorRef.current?.classList.add('active')
|
||||
followerRef.current?.classList.add('active')
|
||||
}
|
||||
const handleMouseLeave = () => {
|
||||
cursorRef.current?.classList.remove('active')
|
||||
followerRef.current?.classList.remove('active')
|
||||
}
|
||||
|
||||
document.addEventListener('mousemove', handleMouseMove)
|
||||
rafId.current = requestAnimationFrame(animate)
|
||||
document.addEventListener('mouseenter', handleMouseEnter, true)
|
||||
document.addEventListener('mouseleave', handleMouseLeave, true)
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(rafId.current)
|
||||
document.removeEventListener('mousemove', handleMouseMove)
|
||||
document.removeEventListener('mouseenter', handleMouseEnter, true)
|
||||
document.removeEventListener('mouseleave', handleMouseLeave, true)
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div ref={cursorRef} className="cursor" aria-hidden="true" />
|
||||
<div ref={followerRef} className="cursor-follower" aria-hidden="true" />
|
||||
</>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
**Layout.tsx changes:** Add `<CustomCursor />` after `<main>`:
|
||||
```tsx
|
||||
<main id="main-content">
|
||||
<Routes>...</Routes>
|
||||
</main>
|
||||
<CustomCursor />
|
||||
```
|
||||
|
||||
**Files:**
|
||||
- `src/components/ui/CustomCursor.tsx` (new)
|
||||
- `src/components/layout/Layout.tsx`
|
||||
- `src/App.css`
|
||||
|
||||
---
|
||||
|
||||
## 7. Projects Enhancements
|
||||
|
||||
### 7.1 Project Card Overlay
|
||||
|
||||
**Effect:** On hover, project cards show overlay with live demo / source code links.
|
||||
|
||||
**Implementation:**
|
||||
- Add `<div className="project-overlay">` inside each project card
|
||||
- Overlay: full coverage, semi-transparent background, center-aligned links
|
||||
- Links: circular icons for GitHub and external link
|
||||
- Overlay fades in on card hover: `opacity: 0 → 1`
|
||||
- Link icons slide up from bottom: `transform: translateY(10px) → 0`
|
||||
|
||||
**CSS:**
|
||||
```css
|
||||
.project-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity var(--transition-base);
|
||||
border-radius: inherit;
|
||||
}
|
||||
.project-card:hover .project-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
.project-links {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
.project-link {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
transform: translateY(10px);
|
||||
transition: transform var(--transition-base), background var(--transition-fast);
|
||||
text-decoration: none;
|
||||
}
|
||||
.project-card:hover .project-link {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.project-link:hover {
|
||||
background: var(--accent-hover);
|
||||
}
|
||||
```
|
||||
|
||||
**Projects.tsx changes:** Wrap card content with overlay:
|
||||
```tsx
|
||||
<div className="project-card">
|
||||
{/* existing card content (image, title, summary, tags) */}
|
||||
<div className="project-overlay">
|
||||
<div className="project-links">
|
||||
{project.demoUrl && (
|
||||
<a href={project.demoUrl} target="_blank" rel="noopener noreferrer" className="project-link" aria-label="Live Demo">
|
||||
<svg>...</svg>
|
||||
</a>
|
||||
)}
|
||||
{project.githubUrl && (
|
||||
<a href={project.githubUrl} target="_blank" rel="noopener noreferrer" className="project-link" aria-label="Source Code">
|
||||
<svg>...</svg>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
**Files:**
|
||||
- `src/components/sections/Projects.tsx`
|
||||
- `src/App.css`
|
||||
|
||||
### 7.2 Gradient Card Placeholders
|
||||
|
||||
**Effect:** Project cards without images use unique gradient backgrounds.
|
||||
|
||||
**Implementation:**
|
||||
- Use CSS `nth-child` selectors with different gradient pairs
|
||||
- Each gradient uses `--accent`-family colors for theme consistency
|
||||
|
||||
**Gradients:**
|
||||
| Card | Dark Theme | Light Theme |
|
||||
|------|-----------|-------------|
|
||||
| 1 | `linear-gradient(135deg, #60a5fa, #818cf8)` | `linear-gradient(135deg, #2563eb, #4f46e5)` |
|
||||
| 2 | `linear-gradient(135deg, #ec4899, #f43f5e)` | `linear-gradient(135deg, #db2777, #e11d48)` |
|
||||
| 3 | `linear-gradient(135deg, #06b6d4, #3b82f6)` | `linear-gradient(135deg, #0891b2, #2563eb)` |
|
||||
| 4 | `linear-gradient(135deg, #f59e0b, #ef4444)` | `linear-gradient(135deg, #d97706, #dc2626)` |
|
||||
| 5 | `linear-gradient(135deg, #10b981, #059669)` | `linear-gradient(135deg, #059669, #047857)` |
|
||||
| 6 | `linear-gradient(135deg, #8b5cf6, #60a5fa)` | `linear-gradient(135deg, #7c3aed, #2563eb)` |
|
||||
|
||||
**CSS:**
|
||||
```css
|
||||
.project-card:nth-child(1) { background: linear-gradient(135deg, #60a5fa, #818cf8); }
|
||||
.project-card:nth-child(2) { background: linear-gradient(135deg, #ec4899, #f43f5e); }
|
||||
.project-card:nth-child(3) { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
|
||||
.project-card:nth-child(4) { background: linear-gradient(135deg, #f59e0b, #ef4444); }
|
||||
.project-card:nth-child(5) { background: linear-gradient(135deg, #10b981, #059669); }
|
||||
.project-card:nth-child(6) { background: linear-gradient(135deg, #8b5cf6, #60a5fa); }
|
||||
```
|
||||
|
||||
**Files:**
|
||||
- `src/App.css`
|
||||
|
||||
---
|
||||
|
||||
## 8. Footer Enhancements
|
||||
|
||||
### 8.1 Back to Top Button
|
||||
### 5.1 Back to Top Button
|
||||
|
||||
**Effect:** Floating button appears after scrolling, smoothly scrolls to top.
|
||||
|
||||
@@ -1057,9 +768,9 @@ export function Footer() {
|
||||
|
||||
---
|
||||
|
||||
## 9. Logo Enhancement
|
||||
## 6. Logo Enhancement
|
||||
|
||||
### 9.1 Bracket Logo
|
||||
### 6.1 Bracket Logo
|
||||
|
||||
**Effect:** Navigation logo uses `{Name}` format with bracket styling.
|
||||
|
||||
@@ -1103,6 +814,175 @@ export function Footer() {
|
||||
- `src/data/profile.ts` (import `profile`)
|
||||
|
||||
---
|
||||
## 7. Download Resume Dropdown — Click Outside to Close
|
||||
|
||||
### 7.1 Controlled Dropdown with Outside Click Close
|
||||
|
||||
**Effect:** Replace HTML `<details>` toggle with controlled React state. Click outside the dropdown to close (instead of clicking the button again).
|
||||
|
||||
**Current state:**
|
||||
- `DownloadDropdown` (Contact page) and `HeroDownloadDropdown` (Hero section) use `<details>` element
|
||||
- Toggles open/close on summary click
|
||||
- Native `<details>` behavior — no external click handling
|
||||
|
||||
**Implementation:**
|
||||
- Replace `<details>` with controlled `<div>` + React state
|
||||
- Add `mousedown` + `touchstart` listener on `document` when dropdown is open
|
||||
- Click outside the dropdown ref → `setOpen(false)`
|
||||
- Replace `<summary>` with `<button>` (proper accessibility)
|
||||
- Add `.open` class to options container when open (CSS controls visibility)
|
||||
- Add `.open` class to summary for chevron rotation
|
||||
|
||||
**DownloadResume.tsx changes:**
|
||||
```tsx
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
|
||||
function DownloadDropdown() {
|
||||
const [open, setOpen] = useState(false)
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) return
|
||||
const listener = (e: MouseEvent | TouchEvent) => {
|
||||
if (ref.current && !ref.current.contains(e.target as Node)) {
|
||||
setOpen(false)
|
||||
}
|
||||
}
|
||||
document.addEventListener('mousedown', listener)
|
||||
document.addEventListener('touchstart', listener)
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', listener)
|
||||
document.removeEventListener('touchstart', listener)
|
||||
}
|
||||
}, [open])
|
||||
|
||||
return (
|
||||
<div ref={ref} className="download-resume-dropdown">
|
||||
<button
|
||||
className="download-resume-summary"
|
||||
onClick={() => setOpen(!open)}
|
||||
type="button"
|
||||
>
|
||||
{/* icon + label + chevron */}
|
||||
</button>
|
||||
<div className={`download-resume-options ${open ? 'open' : ''}`}>
|
||||
{/* language options */}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
**Hero.tsx changes:** Same pattern for `HeroDownloadDropdown`.
|
||||
|
||||
**CSS changes (App.css):**
|
||||
```css
|
||||
/* Hide options by default, show when .open class present */
|
||||
.download-resume-dropdown .download-resume-options {
|
||||
display: none;
|
||||
}
|
||||
.download-resume-dropdown .download-resume-options.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Rotate chevron when summary has .open class */
|
||||
.download-resume-dropdown .download-resume-summary.open .chevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
```
|
||||
|
||||
**Removed:** `.download-resume-dropdown[open]` pseudo-class selectors (no longer needed).
|
||||
|
||||
**Files:**
|
||||
- `src/components/sections/DownloadResume.tsx` (controlled dropdown)
|
||||
- `src/components/sections/Hero.tsx` (controlled dropdown)
|
||||
- `src/App.css` (CSS for `.open` class visibility)
|
||||
- `src/hooks/useClickOutside.ts` (reusable hook, created but logic inlined)
|
||||
## 8. Mobile Responsive Fixes
|
||||
|
||||
### 8.1 Download Resume Icon — FontAwesome Style
|
||||
|
||||
**Effect:** Replace Material Design download icon with FontAwesome-style outline icon (document + arrow).
|
||||
|
||||
**Implementation:**
|
||||
- Update SVG path in `DownloadResume.tsx` and `Hero.tsx`
|
||||
- New icon: FontAwesome download style with document outline and downward arrow
|
||||
|
||||
**Files:**
|
||||
- `src/components/sections/DownloadResume.tsx`
|
||||
- `src/components/sections/Hero.tsx`
|
||||
|
||||
### 8.2 Hero Section — Mobile Layout
|
||||
|
||||
**Issues fixed:**
|
||||
1. Hero height using `100vh` on mobile includes browser UI (address bar), causing content to be clipped
|
||||
2. Scroll indicator positioned outside visible viewport due to overflow clipping
|
||||
3. Social links not centered on mobile
|
||||
4. Hero text (greeting, title, tagline, social links) invisible in light mode on dark overlay
|
||||
|
||||
**Implementation:**
|
||||
|
||||
**Hero height:**
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
.hero {
|
||||
min-height: 100dvh; /* Changed from 100vh */
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Scroll indicator positioning:**
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
.scroll-indicator {
|
||||
position: absolute;
|
||||
bottom: 20px; /* Changed from 40px */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 10; /* Above hero-content (z-index: 1) */
|
||||
color: #ffffff; /* White text on dark overlay */
|
||||
}
|
||||
.scroll-mouse {
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.hero .scroll-indicator span {
|
||||
display: block !important;
|
||||
color: #ffffff !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Social links centering:**
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
.social-links {
|
||||
justify-content: center;
|
||||
}
|
||||
.social-link {
|
||||
color: #ffffff; /* White on dark overlay */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Hero text colors (light/dark mode consistency):**
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
.hero-name {
|
||||
color: #ffffff;
|
||||
}
|
||||
.hero-title,
|
||||
.hero-tagline,
|
||||
.hero-greeting {
|
||||
color: #e0e0e0; /* Same color for title, tagline, greeting */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Files:**
|
||||
- `src/App.css` (mobile media query overrides)
|
||||
|
||||
|
||||
## Implementation Order
|
||||
|
||||
@@ -1117,15 +997,15 @@ export function Footer() {
|
||||
| 6 | Hero: floating particles | — | 15m |
|
||||
| 7 | Hero: scroll indicator | — | 10m |
|
||||
| 8 | Button: gradient + outline + icon slide | — | 10m |
|
||||
| 9 | Social links: circular + glow | — | 10m |
|
||||
| 10 | Scroll animations: AnimatedSection | — | 20m |
|
||||
| 11 | Custom cursor | — | 20m |
|
||||
| 12 | Projects: overlay + gradients | — | 15m |
|
||||
| 13 | Footer: back to top | — | 10m |
|
||||
| 14 | Logo: bracket format | Step 0 | 5m |
|
||||
| 15 | Build + verify | All | 10m |
|
||||
| 9 | Scroll animations: AnimatedSection | — | 20m |
|
||||
| 10 | Logo: bracket format | Step 0 | 5m |
|
||||
| 11 | Build + verify | All | 10m |
|
||||
| 12 | Download resume: click outside to close | — | 15m |
|
||||
| 13 | Download resume: FontAwesome-style icon | — | 5m |
|
||||
| 14 | Mobile: hero section responsive fixes | — | 15m |
|
||||
|
||||
**Total:** ~4h 35m
|
||||
|
||||
**Total:** ~4h 10m
|
||||
|
||||
---
|
||||
|
||||
@@ -1141,21 +1021,23 @@ export function Footer() {
|
||||
1. [ ] Typewriter cycles through `profile.roles` with cursor blink
|
||||
2. [ ] Greeting dot pulses continuously
|
||||
3. [ ] Background grid visible on hero, faded at edges
|
||||
3. [ ] Particles float upward, 30 desktop / 15 mobile
|
||||
4. [ ] Scroll indicator with mouse animation at hero bottom
|
||||
5. [ ] Name uses gradient text fill (lastName only)
|
||||
6. [ ] Primary buttons: gradient bg, glow shadow, pill shape, lift on hover
|
||||
7. [ ] Secondary buttons: outline style, glow on hover, lift
|
||||
8. [ ] Button icons slide right on hover
|
||||
9. [ ] Section headers have numbered tags
|
||||
10. [ ] Social links: circular, glow on hover, no text labels
|
||||
4. [ ] Particles float upward, 30 desktop / 15 mobile
|
||||
5. [ ] Scroll indicator with mouse animation at hero bottom
|
||||
6. [ ] Name uses gradient text fill (lastName only)
|
||||
7. [ ] Primary buttons: gradient bg, glow shadow, pill shape, lift on hover
|
||||
8. [ ] Secondary buttons: outline style, glow on hover, lift
|
||||
9. [ ] Button icons slide right on hover
|
||||
10. [ ] Section headers have numbered tags
|
||||
11. [ ] All sections animate in on scroll with direction control
|
||||
12. [ ] Custom cursor: dot + follower, expands on interactive hover, hidden on mobile
|
||||
13. [ ] Project cards: overlay on hover with links, gradient placeholders
|
||||
14. [ ] Back to top button: appears after scroll, smooth scroll to top
|
||||
15. [ ] Logo: `{FirstName LastName}` bracket format
|
||||
16. [ ] No new dependencies added
|
||||
17. [ ] All features work in dark/light themes
|
||||
18. [ ] No breaking changes to existing layout
|
||||
19. [ ] `pnpm build` passes (type-check + build)
|
||||
20. [ ] `pnpm lint` passes
|
||||
12. [ ] Logo: `{FirstName LastName}` bracket format
|
||||
13. [ ] Download resume dropdown: click outside to close (instead of toggle on button click)
|
||||
14. [ ] No new dependencies added
|
||||
15. [ ] All features work in dark/light themes
|
||||
16. [ ] No breaking changes to existing layout
|
||||
17. [ ] `pnpm build` passes (type-check + build)
|
||||
18. [ ] `pnpm lint` passes
|
||||
19. [ ] Download resume icon uses FontAwesome-style SVG
|
||||
20. [ ] Hero section uses `100dvh` on mobile (no clipping)
|
||||
21. [ ] Scroll indicator visible and centered on mobile
|
||||
22. [ ] Social links centered on mobile
|
||||
23. [ ] All hero text (greeting, title, tagline, social links) visible in both dark/light modes on mobile
|
||||
+238
-24
@@ -30,6 +30,18 @@
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.logo-bracket {
|
||||
color: var(--accent);
|
||||
font-family: var(--mono);
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.logo-text {
|
||||
color: var(--text-primary);
|
||||
font-weight: 700;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
@@ -194,29 +206,45 @@
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--accent);
|
||||
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa);
|
||||
color: #ffffff;
|
||||
box-shadow: 0 4px 20px rgba(96, 165, 250, 0.3);
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--accent-hover);
|
||||
color: #ffffff;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 30px rgba(96, 165, 250, 0.4);
|
||||
}
|
||||
|
||||
.btn-primary:active {
|
||||
background: var(--accent-active);
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--border);
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
border-color: var(--accent);
|
||||
background: var(--accent);
|
||||
color: #ffffff;
|
||||
background: rgba(96, 165, 250, 0.1);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.btn-secondary:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
display: inline-flex;
|
||||
margin-left: 6px;
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
.btn-primary:hover .btn-icon,
|
||||
.btn-secondary:hover .btn-icon {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
@@ -326,6 +354,16 @@
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.section-tag {
|
||||
display: block;
|
||||
font-family: var(--mono);
|
||||
font-size: 0.85rem;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* ===== Social Links ===== */
|
||||
.social-links {
|
||||
display: flex;
|
||||
@@ -335,27 +373,32 @@
|
||||
.social-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-fast);
|
||||
justify-content: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 1.5px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 6px;
|
||||
color: var(--text-primary);
|
||||
transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
|
||||
}
|
||||
|
||||
.social-link:hover {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
transform: translateY(-3px);
|
||||
}
|
||||
|
||||
.social-link:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.social-link svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.social-link span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* ===== Section Background Gradient ===== */
|
||||
.section {
|
||||
position: relative;
|
||||
@@ -413,6 +456,35 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.hero-greeting {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.greeting-dot {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--success);
|
||||
border-radius: 50%;
|
||||
animation: pulse-dot 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-dot {
|
||||
0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
|
||||
50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
|
||||
}
|
||||
|
||||
.name-highlight {
|
||||
background: linear-gradient(135deg, #1d4ed8, #2563eb, #60a5fa);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.hero-cta {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
@@ -424,21 +496,111 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
aspect-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
.hero-bg-grid {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image:
|
||||
linear-gradient(var(--grid-color) 1px, transparent 1px),
|
||||
linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
|
||||
background-size: 60px 60px;
|
||||
mask-image: radial-gradient(ellipse at center, black 50%, transparent 70%);
|
||||
-webkit-mask-image: radial-gradient(ellipse at center, black 50%, transparent 70%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.typewriter-cursor {
|
||||
display: inline-block;
|
||||
width: 2px;
|
||||
height: 1.1em;
|
||||
background: var(--accent);
|
||||
margin-left: 2px;
|
||||
vertical-align: text-bottom;
|
||||
animation: blink 1s step-end infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
}
|
||||
|
||||
.hero-particles {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
.hero-particle {
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
opacity: 0.8;
|
||||
animation: float-particle linear infinite;
|
||||
}
|
||||
@keyframes float-particle {
|
||||
0% { transform: translateY(100vh) scale(0); opacity: 0; }
|
||||
10% { opacity: 0.8; }
|
||||
90% { opacity: 0.8; }
|
||||
100% { transform: translateY(-100px) scale(1); opacity: 0; }
|
||||
}
|
||||
|
||||
.scroll-indicator {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--text-muted);
|
||||
font-size: 0.8rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
animation: float 3s ease-in-out infinite;
|
||||
text-decoration: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
.scroll-mouse {
|
||||
width: 24px;
|
||||
height: 38px;
|
||||
border: 2px solid var(--border);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 8px;
|
||||
}
|
||||
.scroll-wheel {
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
background: var(--accent);
|
||||
border-radius: 2px;
|
||||
animation: scroll-wheel 2s ease-in-out infinite;
|
||||
}
|
||||
@keyframes scroll-wheel {
|
||||
0%, 100% { transform: translateY(0); opacity: 1; }
|
||||
50% { transform: translateY(8px); opacity: 0.3; }
|
||||
}
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateX(-50%) translateY(0); }
|
||||
50% { transform: translateX(-50%) translateY(-10px); }
|
||||
}
|
||||
|
||||
.hero-photo {
|
||||
width: 80%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center top;
|
||||
border-radius: 16px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.hero {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -461,9 +623,7 @@
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
padding: 64px 24px 56px;
|
||||
backdrop-filter: blur(4px);
|
||||
width: 100%;
|
||||
}
|
||||
.hero-name {
|
||||
@@ -473,8 +633,50 @@
|
||||
.hero-tagline {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.hero-greeting {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.hero-photo {
|
||||
display: none;
|
||||
}
|
||||
.scroll-indicator {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 10;
|
||||
color: #ffffff;
|
||||
}
|
||||
.scroll-mouse {
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.hero .scroll-indicator span {
|
||||
display: block !important;
|
||||
color: #ffffff !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
.social-links {
|
||||
justify-content: center;
|
||||
}
|
||||
.social-link {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
:root[data-theme='light'] .hero-name {
|
||||
color: var(--text-primary) !important;
|
||||
}
|
||||
:root[data-theme='light'] .hero-title,
|
||||
:root[data-theme='light'] .hero-tagline,
|
||||
:root[data-theme='light'] .hero-greeting {
|
||||
color: var(--text-secondary) !important;
|
||||
}
|
||||
:root[data-theme='light'] .social-link {
|
||||
color: var(--text-secondary) !important;
|
||||
border-color: rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1200px) {
|
||||
.hero-content {
|
||||
@@ -482,6 +684,9 @@
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
:root[data-theme='light'] .social-link {
|
||||
border-color: rgba(0, 0, 0, 0.2) !important;
|
||||
}
|
||||
|
||||
/* ===== Download Resume Dropdown ===== */
|
||||
.download-resume-dropdown {
|
||||
@@ -523,7 +728,16 @@
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.download-resume-dropdown[open] .download-resume-summary .chevron {
|
||||
|
||||
.download-resume-dropdown .download-resume-options {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.download-resume-dropdown .download-resume-options.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.download-resume-dropdown .download-resume-summary.open .chevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ export function Footer() {
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" />
|
||||
</svg>
|
||||
<span>GitHub</span>
|
||||
</a>
|
||||
<a
|
||||
href={profile.linkedinUrl}
|
||||
@@ -51,7 +50,6 @@ export function Footer() {
|
||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
|
||||
</svg>
|
||||
<span>LinkedIn</span>
|
||||
</a>
|
||||
<a
|
||||
href={`mailto:${profile.email}`}
|
||||
@@ -62,7 +60,6 @@ export function Footer() {
|
||||
<rect x="2" y="4" width="20" height="16" rx="2" />
|
||||
<path d="M22 4l-10 8L2 4" />
|
||||
</svg>
|
||||
<span>Email</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,9 @@ export function Navigation() {
|
||||
<nav className="nav" role="navigation" aria-label="Main navigation">
|
||||
<div className="nav-container">
|
||||
<Link to="/" className="nav-logo">
|
||||
Portfolio
|
||||
<span className="logo-bracket">{</span>
|
||||
<span className="logo-text">CV</span>
|
||||
<span className="logo-bracket">}</span>
|
||||
</Link>
|
||||
|
||||
<ul className="nav-menu">
|
||||
|
||||
@@ -7,7 +7,7 @@ export function About() {
|
||||
return (
|
||||
<InView>
|
||||
<section className="section container-wide" aria-labelledby="about-heading">
|
||||
<SectionHeading title="About Me" />
|
||||
<SectionHeading title="About Me" tag="01 - About" />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<p style={{ fontSize: '18px', marginBottom: '32px' }}>
|
||||
{profile.bio}
|
||||
|
||||
@@ -18,7 +18,7 @@ export function Contact() {
|
||||
visible: { opacity: 1, transition: { duration: 0.5 } },
|
||||
}}
|
||||
>
|
||||
<SectionHeading title="Contact" />
|
||||
<SectionHeading title="Contact" tag="06 - Contact" />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<div className="contact-links">
|
||||
<motion.a
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { resumeAvailable, resumeUrlFor, resumeLanguages } from '@/data/resume'
|
||||
import type { Language } from '@/types'
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
|
||||
const langLabels: Record<Language, string> = {
|
||||
en: 'English',
|
||||
@@ -23,10 +24,8 @@ function DownloadButton({ lang }: { lang: Language }) {
|
||||
border: '1px solid var(--border)',
|
||||
}}
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="24" height="24">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
|
||||
<polyline points="7 10 12 15 17 10" />
|
||||
<line x1="12" y1="15" x2="12" y2="3" />
|
||||
<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 1 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>
|
||||
<div style={{ fontWeight: 500, color: 'var(--text-primary)' }}>Download Resume</div>
|
||||
@@ -37,20 +36,41 @@ function DownloadButton({ lang }: { lang: Language }) {
|
||||
}
|
||||
|
||||
function DownloadDropdown() {
|
||||
const [open, setOpen] = useState(false)
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) return
|
||||
const listener = (e: MouseEvent | TouchEvent) => {
|
||||
if (ref.current && !ref.current.contains(e.target as Node)) {
|
||||
setOpen(false)
|
||||
}
|
||||
}
|
||||
document.addEventListener('mousedown', listener)
|
||||
document.addEventListener('touchstart', listener)
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', listener)
|
||||
document.removeEventListener('touchstart', listener)
|
||||
}
|
||||
}, [open])
|
||||
|
||||
return (
|
||||
<details className="download-resume-dropdown">
|
||||
<summary className="download-resume-summary">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="20" height="20">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
|
||||
<polyline points="7 10 12 15 17 10" />
|
||||
<line x1="12" y1="15" x2="12" y2="3" />
|
||||
<div ref={ref} className="download-resume-dropdown">
|
||||
<button
|
||||
className={`download-resume-summary ${open ? 'open' : ''}`}
|
||||
onClick={() => setOpen(!open)}
|
||||
type="button"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="20" height="20">
|
||||
<path d="M12 3v10m0 0l-3-3m3 3l3-3" />
|
||||
<path d="M3 17h18" />
|
||||
</svg>
|
||||
<span>Download Resume</span>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="16" height="16" className="chevron">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="16" height="16" className="chevron">
|
||||
<polyline points="6 9 12 15 18 9" />
|
||||
</svg>
|
||||
</summary>
|
||||
<div className="download-resume-options">
|
||||
</button>
|
||||
<div className={`download-resume-options ${open ? 'open' : ''}`}>
|
||||
{resumeLanguages.map(lang => (
|
||||
<a
|
||||
key={lang}
|
||||
@@ -62,7 +82,7 @@ function DownloadDropdown() {
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { motion } from "motion/react"
|
||||
import { experiences } from "@/data/experience"
|
||||
import { InView } from "@/components/ui/InView"
|
||||
@@ -19,16 +20,7 @@ export function Experience() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<motion.h2
|
||||
id="experience-heading"
|
||||
style={{ marginBottom: "48px" }}
|
||||
variants={{
|
||||
hidden: { opacity: 0, y: 30 },
|
||||
visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
|
||||
}}
|
||||
>
|
||||
Experience
|
||||
</motion.h2>
|
||||
<SectionHeading title="Experience" tag="03 - Experience" />
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<div className="timeline">
|
||||
{experiences.map((exp, i) => (
|
||||
|
||||
@@ -20,7 +20,7 @@ export function Expertise() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<SectionHeading title="Core Expertise" />
|
||||
<SectionHeading title="Core Expertise" tag="02 - Expertise" />
|
||||
<div className="expertise-grid">
|
||||
{skillGroups.map((group, i) => (
|
||||
<motion.div
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { useState, useRef, useEffect } from 'react'
|
||||
import { motion, useScroll, useTransform } from "motion/react"
|
||||
import { InView } from "@/components/ui/InView"
|
||||
import { resumeAvailable, resumeLanguages, resumeUrlFor } from "@/data/resume"
|
||||
@@ -7,22 +8,42 @@ const langLabels: Record<Language, string> = {
|
||||
en: 'EN',
|
||||
vi: 'VI',
|
||||
}
|
||||
|
||||
function HeroDownloadDropdown() {
|
||||
const [open, setOpen] = useState(false)
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) return
|
||||
const listener = (e: MouseEvent | TouchEvent) => {
|
||||
if (ref.current && !ref.current.contains(e.target as Node)) {
|
||||
setOpen(false)
|
||||
}
|
||||
}
|
||||
document.addEventListener('mousedown', listener)
|
||||
document.addEventListener('touchstart', listener)
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', listener)
|
||||
document.removeEventListener('touchstart', listener)
|
||||
}
|
||||
}, [open])
|
||||
|
||||
return (
|
||||
<details className="download-resume-dropdown hero-download-dropdown">
|
||||
<summary className="download-resume-summary hero-download-summary">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="18" height="18">
|
||||
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2 2v-4" />
|
||||
<polyline points="7 10 12 15 17 10" />
|
||||
<line x1="12" y1="15" x2="12" y2="3" />
|
||||
<div ref={ref} className="download-resume-dropdown hero-download-dropdown">
|
||||
<button
|
||||
className={`download-resume-summary hero-download-summary ${open ? 'open' : ''}`}
|
||||
onClick={() => setOpen(!open)}
|
||||
type="button"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="18" height="18">
|
||||
<path d="M12 3v10m0 0l-3-3m3 3l3-3" />
|
||||
<path d="M3 17h18" />
|
||||
</svg>
|
||||
<span>Download Resume</span>
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="14" height="14" className="chevron">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" width="14" height="14" className="chevron">
|
||||
<polyline points="6 9 12 15 18 9" />
|
||||
</svg>
|
||||
</summary>
|
||||
<div className="download-resume-options">
|
||||
</button>
|
||||
<div className={`download-resume-options ${open ? 'open' : ''}`}>
|
||||
{resumeLanguages.map(lang => (
|
||||
<a
|
||||
key={lang}
|
||||
@@ -35,7 +56,7 @@ function HeroDownloadDropdown() {
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -52,6 +73,8 @@ function HeroDownloadButton({ lang }: { lang: Language }) {
|
||||
)
|
||||
}
|
||||
import { Button } from "@/components/ui/Button"
|
||||
import { Typewriter } from '@/components/ui/Typewriter'
|
||||
import { HeroParticles } from '@/components/sections/HeroParticles'
|
||||
import { SocialLinks } from "@/components/ui/SocialLinks"
|
||||
import { profile } from "@/data/profile"
|
||||
|
||||
@@ -102,6 +125,8 @@ export function Hero() {
|
||||
transition={{ duration: 0.3 }}
|
||||
aria-labelledby="hero-heading"
|
||||
>
|
||||
<div className="hero-bg-grid" />
|
||||
<HeroParticles />
|
||||
<motion.div
|
||||
className="hero-content"
|
||||
style={{ opacity }}
|
||||
@@ -109,6 +134,16 @@ export function Hero() {
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ duration: 0.6, delay: 0.2 }}
|
||||
>
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.4, delay: 0.15 }}
|
||||
>
|
||||
<span className="hero-greeting">
|
||||
<span className="greeting-dot" />
|
||||
Hi, I'm
|
||||
</span>
|
||||
</motion.div>
|
||||
<motion.h1
|
||||
id="hero-heading"
|
||||
className="hero-name"
|
||||
@@ -116,7 +151,7 @@ export function Hero() {
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.5, delay: 0.3 }}
|
||||
>
|
||||
{profile.name}
|
||||
<span className="name-highlight">{profile.firstName}{" "}{profile.lastName}</span>
|
||||
</motion.h1>
|
||||
<motion.p
|
||||
className="hero-title"
|
||||
@@ -124,7 +159,7 @@ export function Hero() {
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.5, delay: 0.4 }}
|
||||
>
|
||||
{profile.title}
|
||||
<Typewriter texts={profile.roles} />
|
||||
</motion.p>
|
||||
<motion.p
|
||||
className="hero-tagline"
|
||||
@@ -143,6 +178,9 @@ export function Hero() {
|
||||
<Button href="/projects" variant="primary">
|
||||
View Projects
|
||||
</Button>
|
||||
<Button href="/contact" variant="primary">
|
||||
Contact Me
|
||||
</Button>
|
||||
{resumeAvailable && (
|
||||
<>
|
||||
<div className="hero-download-desktop">
|
||||
@@ -155,12 +193,15 @@ export function Hero() {
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<Button href="/contact" variant="primary">
|
||||
Contact Me
|
||||
</Button>
|
||||
</motion.div>
|
||||
<SocialLinks links={socialLinks} />
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
<div className="scroll-indicator" aria-hidden="true">
|
||||
<div className="scroll-mouse">
|
||||
<div className="scroll-wheel" />
|
||||
</div>
|
||||
<span>Scroll</span>
|
||||
</div>
|
||||
<motion.div
|
||||
className="hero-visual"
|
||||
style={{ y }}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import { useMemo } from "react"
|
||||
|
||||
export function HeroParticles() {
|
||||
const count = typeof window !== "undefined" && window.innerWidth < 768 ? 15 : 30
|
||||
const particles = useMemo(
|
||||
() =>
|
||||
Array.from({ length: count }, (_, i) => ({
|
||||
id: i,
|
||||
left: `${Math.random() * 100}%`,
|
||||
duration: `${Math.random() * 10 + 8}s`,
|
||||
delay: `${Math.random() * 10}s`,
|
||||
size: `${Math.random() * 10 + 6}px`,
|
||||
})),
|
||||
[count],
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="hero-particles" aria-hidden="true">
|
||||
{particles.map((p) => (
|
||||
<div
|
||||
key={p.id}
|
||||
className="hero-particle"
|
||||
style={{
|
||||
left: p.left,
|
||||
width: p.size,
|
||||
height: p.size,
|
||||
animationDuration: p.duration,
|
||||
animationDelay: p.delay,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { Link } from "react-router"
|
||||
import { motion } from "motion/react"
|
||||
import { Badge } from "@/components/ui/Badge"
|
||||
@@ -33,28 +34,13 @@ export function Projects() {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<motion.div
|
||||
style={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "baseline",
|
||||
marginBottom: "48px",
|
||||
}}
|
||||
variants={{
|
||||
hidden: { opacity: 0, y: 30 },
|
||||
visible: { opacity: 1, y: 0, transition: { duration: 0.5 } },
|
||||
}}
|
||||
<SectionHeading title="Featured Projects" tag="04 - Projects" />
|
||||
<Link
|
||||
to="/projects"
|
||||
style={{ fontSize: "14px", fontWeight: 500, color: "var(--accent)", display: "block", marginBottom: "24px" }}
|
||||
>
|
||||
<h2 id="projects-heading">Featured Projects</h2>
|
||||
<MotionLink
|
||||
to="/projects"
|
||||
style={{ fontSize: "14px", fontWeight: 500, color: "var(--accent)" }}
|
||||
whileHover={{ scale: 1.05 }}
|
||||
whileTap={{ scale: 0.95 }}
|
||||
>
|
||||
View All →
|
||||
</MotionLink>
|
||||
</motion.div>
|
||||
View All →
|
||||
</Link>
|
||||
<div className="projects-grid">
|
||||
{featured.map((project, i) => (
|
||||
<MotionLink
|
||||
@@ -72,30 +58,32 @@ export function Projects() {
|
||||
whileHover={{ scale: 1.02, y: -4 }}
|
||||
whileTap={{ scale: 0.98 }}
|
||||
>
|
||||
<div className="project-card-header">
|
||||
<h3>{project.title}</h3>
|
||||
<Badge variant="outline">
|
||||
{categoryLabels[project.category] || project.category}
|
||||
</Badge>
|
||||
</div>
|
||||
<p className="project-card-summary">{project.summary}</p>
|
||||
<div className="project-card-techs">
|
||||
{project.technologies.slice(0, 4).map((tech) => (
|
||||
<span key={tech} className="tag">
|
||||
{tech}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
{project.metrics && project.metrics.length > 0 && (
|
||||
<div className="project-card-metrics">
|
||||
{project.metrics.map((m) => (
|
||||
<span key={m} className="achievement-metric">
|
||||
{m}
|
||||
<div className="project-card-content">
|
||||
<div className="project-card-header">
|
||||
<h3>{project.title}</h3>
|
||||
<Badge variant="outline">
|
||||
{categoryLabels[project.category] || project.category}
|
||||
</Badge>
|
||||
</div>
|
||||
<p className="project-card-summary">{project.summary}</p>
|
||||
<div className="project-card-techs">
|
||||
{project.technologies.slice(0, 4).map((tech) => (
|
||||
<span key={tech} className="tag">
|
||||
{tech}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<span className="project-card-cta">View Details →</span>
|
||||
{project.metrics && project.metrics.length > 0 && (
|
||||
<div className="project-card-metrics">
|
||||
{project.metrics.map((m) => (
|
||||
<span key={m} className="achievement-metric">
|
||||
{m}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<span className="project-card-cta">View Details →</span>
|
||||
</div>
|
||||
</MotionLink>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { motion } from "motion/react"
|
||||
import { InView } from "@/components/ui/InView"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
interface AnimatedSectionProps {
|
||||
direction?: "up" | "right" | "left"
|
||||
delay?: number
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
function getDirection(direction: 'up' | 'right' | 'left') {
|
||||
switch (direction) {
|
||||
case 'up': return { y: [40, 0], opacity: [0, 1] }
|
||||
case 'right': return { x: [-40, 0], opacity: [0, 1] }
|
||||
case 'left': return { x: [40, 0], opacity: [0, 1] }
|
||||
}
|
||||
}
|
||||
|
||||
export function AnimatedSection({
|
||||
direction = "up",
|
||||
delay = 0,
|
||||
children,
|
||||
}: AnimatedSectionProps) {
|
||||
const { y, opacity } = getDirection(direction)
|
||||
return (
|
||||
<InView>
|
||||
<motion.div
|
||||
initial={{ y, opacity }}
|
||||
whileInView={{ y: 0, opacity: 1 }}
|
||||
viewport={{ once: true, margin: "0px 0px -50px 0px" }}
|
||||
transition={{ duration: 0.6, delay, ease: [0.25, 0.1, 0.25, 1] }}
|
||||
>
|
||||
{children}
|
||||
</motion.div>
|
||||
</InView>
|
||||
)
|
||||
}
|
||||
@@ -10,6 +10,7 @@ type ButtonSize = "sm" | "md" | "lg"
|
||||
interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
||||
variant?: ButtonVariant
|
||||
size?: ButtonSize
|
||||
icon?: React.ReactNode
|
||||
href?: string
|
||||
download?: boolean
|
||||
target?: string
|
||||
@@ -36,6 +37,7 @@ export const Button = forwardRef<
|
||||
variant = "primary",
|
||||
size = "md",
|
||||
href,
|
||||
icon,
|
||||
className = "",
|
||||
children,
|
||||
...props
|
||||
@@ -63,7 +65,10 @@ export const Button = forwardRef<
|
||||
keyof ButtonProps | "to"
|
||||
>)}
|
||||
>
|
||||
{children}
|
||||
{icon ? (<>
|
||||
{children}
|
||||
<span className="btn-icon">{icon}</span>
|
||||
</>) : children}
|
||||
</MotionLink>
|
||||
)
|
||||
}
|
||||
@@ -76,7 +81,10 @@ export const Button = forwardRef<
|
||||
whileTap={{ scale: 0.95 }}
|
||||
{...(props as Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof ButtonProps>)}
|
||||
>
|
||||
{children}
|
||||
{icon ? (<>
|
||||
{children}
|
||||
<span className="btn-icon">{icon}</span>
|
||||
</>) : children}
|
||||
</motion.a>
|
||||
)
|
||||
}
|
||||
@@ -88,7 +96,10 @@ export const Button = forwardRef<
|
||||
whileTap={{ scale: 0.95 }}
|
||||
{...(props as Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonProps>)}
|
||||
>
|
||||
{children}
|
||||
{icon ? (<>
|
||||
{children}
|
||||
<span className="btn-icon">{icon}</span>
|
||||
</>) : children}
|
||||
</motion.button>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
interface SectionHeadingProps {
|
||||
title: string
|
||||
subtitle?: string
|
||||
tag?: string
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function SectionHeading({ title, subtitle, id }: SectionHeadingProps) {
|
||||
export function SectionHeading({ title, subtitle, tag, id }: SectionHeadingProps) {
|
||||
return (
|
||||
<div className="section-heading" id={id}>
|
||||
{tag && <span className="section-tag">{tag}</span>}
|
||||
<h2>{title}</h2>
|
||||
{subtitle && <p>{subtitle}</p>}
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,6 @@ export function SocialLinks({ links, className = "" }: SocialLinksProps) {
|
||||
whileTap={{ scale: 0.9 }}
|
||||
>
|
||||
{link.icon}
|
||||
<span>{link.label}</span>
|
||||
</motion.a>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
interface TypewriterProps {
|
||||
texts: string[]
|
||||
typeSpeed?: number
|
||||
deleteSpeed?: number
|
||||
pauseDuration?: number
|
||||
}
|
||||
|
||||
export function Typewriter({
|
||||
texts,
|
||||
typeSpeed = 80,
|
||||
deleteSpeed = 40,
|
||||
pauseDuration = 2000,
|
||||
}: TypewriterProps) {
|
||||
const [currentTextIndex, setCurrentTextIndex] = useState(0)
|
||||
const [currentText, setCurrentText] = useState("")
|
||||
|
||||
const [isDeleting, setIsDeleting] = useState(false)
|
||||
useEffect(() => {
|
||||
const text = texts[currentTextIndex]
|
||||
let timeout: number
|
||||
|
||||
if (!isDeleting && currentText === text) {
|
||||
timeout = setTimeout(() => setIsDeleting(true), pauseDuration)
|
||||
} else if (isDeleting && currentText === "") {
|
||||
setIsDeleting(false)
|
||||
setCurrentTextIndex((prev) => (prev + 1) % texts.length)
|
||||
} else {
|
||||
timeout = setTimeout(
|
||||
() => {
|
||||
if (isDeleting) {
|
||||
setCurrentText(text.substring(0, currentText.length - 1))
|
||||
} else {
|
||||
setCurrentText(text.substring(0, currentText.length + 1))
|
||||
}
|
||||
},
|
||||
isDeleting ? deleteSpeed : typeSpeed,
|
||||
)
|
||||
}
|
||||
|
||||
return () => clearTimeout(timeout)
|
||||
}, [currentText, currentTextIndex, isDeleting, texts, typeSpeed, deleteSpeed, pauseDuration])
|
||||
|
||||
return (
|
||||
<span>
|
||||
{currentText}
|
||||
<span className="typewriter-cursor" />
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { Profile } from "@/types";
|
||||
|
||||
export const profile: Profile = {
|
||||
firstName: "Dong",
|
||||
lastName: "Nguyen",
|
||||
name: "Dong Nguyen",
|
||||
title: "Senior Software Engineer",
|
||||
titleEn: "Senior Software Engineer",
|
||||
@@ -21,6 +23,12 @@ export const profile: Profile = {
|
||||
"Computer Vision",
|
||||
"High-performance systems",
|
||||
],
|
||||
roles: [
|
||||
"Full-Stack Developer",
|
||||
"System Architect",
|
||||
"AI/ML Engineer",
|
||||
"Open Source Contributor",
|
||||
],
|
||||
philosophy: [
|
||||
{
|
||||
title: "Build for the real problem",
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export function useClickOutside(ref: React.RefObject<HTMLElement | null>, handler: () => void) {
|
||||
useEffect(() => {
|
||||
const listener = (event: MouseEvent | TouchEvent) => {
|
||||
const el = ref.current
|
||||
if (!el || el.contains(event.target as Node)) return
|
||||
handler()
|
||||
}
|
||||
document.addEventListener('mousedown', listener)
|
||||
document.addEventListener('touchstart', listener)
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', listener)
|
||||
document.removeEventListener('touchstart', listener)
|
||||
}
|
||||
}, [ref, handler])
|
||||
}
|
||||
+4
-1
@@ -13,7 +13,7 @@
|
||||
--shadow: rgba(0, 0, 0, 0.3);
|
||||
--code-bg: #1a1a2e;
|
||||
--success: #34d399;
|
||||
--error: #f87171;
|
||||
--grid-color: rgba(96, 165, 250, 0.04);
|
||||
|
||||
--sans: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
--mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
|
||||
@@ -56,6 +56,7 @@
|
||||
--code-bg: #f0f0ff;
|
||||
--success: #059669;
|
||||
--error: #dc2626;
|
||||
--grid-color: rgba(37, 99, 235, 0.08);
|
||||
}
|
||||
|
||||
/* System theme */
|
||||
@@ -75,6 +76,7 @@
|
||||
--code-bg: #1a1a2e;
|
||||
--success: #34d399;
|
||||
--error: #f87171;
|
||||
--grid-color: rgba(96, 165, 250, 0.04);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +96,7 @@
|
||||
--code-bg: #f0f0ff;
|
||||
--success: #059669;
|
||||
--error: #dc2626;
|
||||
--grid-color: rgba(37, 99, 235, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { AnimatedSection } from '@/components/ui/AnimatedSection'
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { Tag } from '@/components/ui/Tag'
|
||||
import { profile } from '@/data/profile'
|
||||
@@ -6,10 +7,12 @@ import { skillGroups } from '@/data/skills'
|
||||
export function AboutPage() {
|
||||
return (
|
||||
<>
|
||||
<AnimatedSection>
|
||||
<section className="section container-content" aria-labelledby="about-heading">
|
||||
<SectionHeading
|
||||
title="About Me"
|
||||
subtitle="Senior Software Engineer with deep expertise in distributed systems, logistics technology, and practical AI applications."
|
||||
tag="01 - About"
|
||||
/>
|
||||
<div style={{ maxWidth: '700px' }}>
|
||||
<p style={{ fontSize: '18px', marginBottom: '32px' }}>
|
||||
@@ -45,7 +48,9 @@ export function AboutPage() {
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</AnimatedSection>
|
||||
|
||||
<AnimatedSection>
|
||||
<section className="section container-wide" aria-labelledby="expertise-heading">
|
||||
<SectionHeading title="Core Expertise" />
|
||||
<div className="expertise-grid">
|
||||
@@ -63,6 +68,7 @@ export function AboutPage() {
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</AnimatedSection>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { DownloadResume } from '@/components/sections/DownloadResume'
|
||||
import { profile } from '@/data/profile'
|
||||
|
||||
export function ContactPage() {
|
||||
return (
|
||||
<section className="section container-content" aria-labelledby="contact-heading">
|
||||
<h2 id="contact-heading" style={{ marginBottom: '32px' }}>
|
||||
Contact
|
||||
</h2>
|
||||
<SectionHeading title="Contact" tag="06 - Contact" />
|
||||
<div className="contact-links">
|
||||
<a href={`mailto:${profile.email}`} className="contact-link">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" width="24" height="24">
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { Tag } from '@/components/ui/Tag'
|
||||
import { profile } from '@/data/profile'
|
||||
|
||||
export function EngineeringPage() {
|
||||
return (
|
||||
<section className="section container-content" aria-labelledby="engineering-heading">
|
||||
<h2 id="engineering-heading" style={{ marginBottom: '24px' }}>
|
||||
Engineering
|
||||
</h2>
|
||||
<SectionHeading title="Engineering" tag="05 - Engineering" />
|
||||
|
||||
{['Architecture', 'AI / ML', 'Experiments'].map((category) => (
|
||||
<div key={category} style={{ marginBottom: '48px' }}>
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { experiences } from '@/data/experience'
|
||||
|
||||
export function ExperiencePage() {
|
||||
return (
|
||||
<section className="section container-content" aria-labelledby="experience-heading">
|
||||
<h2 id="experience-heading" style={{ marginBottom: '48px' }}>
|
||||
Experience
|
||||
</h2>
|
||||
<SectionHeading title="Experience" tag="03 - Experience" />
|
||||
<div className="timeline">
|
||||
{experiences.map((exp) => (
|
||||
<div key={exp.id} className="timeline-entry">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { SectionHeading } from '@/components/ui/SectionHeading'
|
||||
import { Badge } from '@/components/ui/Badge'
|
||||
import { projects } from '@/data/projects'
|
||||
|
||||
@@ -13,6 +14,7 @@ const categoryLabels: Record<string, string> = {
|
||||
export function ProjectsListPage() {
|
||||
return (
|
||||
<section className="section container-wide" aria-labelledby="projects-heading">
|
||||
<SectionHeading title="Projects" tag="04 - Projects" />
|
||||
<div className="projects-grid">
|
||||
{projects.map((project) => (
|
||||
<a
|
||||
|
||||
@@ -79,6 +79,8 @@ export interface PhilosophyPoint {
|
||||
|
||||
export interface Profile {
|
||||
name: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
title: string;
|
||||
titleEn?: string;
|
||||
tagline: string;
|
||||
@@ -90,5 +92,6 @@ export interface Profile {
|
||||
linkedinUrl: string;
|
||||
resumeUrl?: string;
|
||||
currentInterests: string[];
|
||||
roles: string[];
|
||||
philosophy: PhilosophyPoint[];
|
||||
}
|
||||
Reference in new issue
Block a user