mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-23 00:20:40 +07:00
feat: hero photo background, Open to Work badge, contact section, resume download
This commit is contained in:
1 parent
d827bf9b23
commit
531c70e13a
10 files changed
+304
-96
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# Specification — v2 Resume Download
|
||||
|
||||
> **Document:** `spec-v2-resume.md`
|
||||
> **Version:** 0.3.0
|
||||
> **Version:** 0.4.0
|
||||
> **Parent:** `spec-v2.md`
|
||||
> **Priority:** P1
|
||||
> **Estimate:** ~15 minutes
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
- Nút **"Download Resume"** hiển thị ở **2 vị trí**:
|
||||
1. **Hero section** — CTA row (bên cạnh "View Projects" / "Contact Me")
|
||||
2. **Contact section** — trong `contact-links` grid
|
||||
2. **Contact section / Contact page** — riêng biệt, sau `contact-links` grid
|
||||
- Link trực tiếp đến file PDF (`/resume.pdf`) với attribute `download`
|
||||
- Khi chưa có PDF → ẩn hoàn toàn ở cả 2 vị trí
|
||||
- PDF upload vào `public/resume.pdf`
|
||||
@@ -22,60 +22,77 @@
|
||||
|
||||
## Implementation
|
||||
|
||||
### DownloadResume Component
|
||||
|
||||
```tsx
|
||||
// src/components/sections/DownloadResume.tsx
|
||||
import { resumeAvailable } from '@/data/resume'
|
||||
|
||||
export function DownloadResume() {
|
||||
if (!resumeAvailable) return null
|
||||
return (
|
||||
<div style={{ marginTop: '32px' }}>
|
||||
<a href="/resume.pdf" download className="contact-link" style={...}>
|
||||
<svg>...</svg>
|
||||
<div>Download Resume</div>
|
||||
<div style={{ fontSize: '14px', color: 'var(--text-muted)' }}>PDF</div>
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
### Hero Section (primary CTA)
|
||||
|
||||
```tsx
|
||||
// Hero.tsx
|
||||
import { Button } from '@/components/ui/Button'
|
||||
import { resumeAvailable } from '@/data/resume'
|
||||
|
||||
export function Hero() {
|
||||
return (
|
||||
<section className="hero container-wide" aria-labelledby="hero-heading">
|
||||
<div className="hero-content">
|
||||
{/* ... heading, title, tagline ... */}
|
||||
<div className="hero-cta">
|
||||
<Button href="/projects" variant="primary">
|
||||
View Projects
|
||||
</Button>
|
||||
{resumeAvailable && (
|
||||
<Button href="/resume.pdf" variant="secondary" download>
|
||||
Download Resume
|
||||
</Button>
|
||||
)}
|
||||
<Button href="/contact" variant="secondary">
|
||||
Contact Me
|
||||
</Button>
|
||||
</div>
|
||||
<SocialLinks links={socialLinks} />
|
||||
<div className="hero-cta">
|
||||
<Button href="/projects" variant="primary">View Projects</Button>
|
||||
{resumeAvailable && (
|
||||
<Button href="/resume.pdf" variant="secondary" download>Download Resume</Button>
|
||||
)}
|
||||
<Button href="/contact" variant="secondary">Contact Me</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
### Contact Section (home page)
|
||||
|
||||
```tsx
|
||||
// Contact.tsx
|
||||
import { DownloadResume } from '@/components/sections/DownloadResume'
|
||||
|
||||
export function Contact() {
|
||||
return (
|
||||
<section>
|
||||
<SectionHeading title="Contact" />
|
||||
<div className="contact-links">
|
||||
{/* Email, GitHub, LinkedIn */}
|
||||
</div>
|
||||
{/* ... hero-visual ... */}
|
||||
<DownloadResume />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
### Contact Section (secondary)
|
||||
### ContactPage (standalone page)
|
||||
|
||||
```tsx
|
||||
// Contact.tsx
|
||||
import { resumeAvailable } from '@/data/resume'
|
||||
// ContactPage.tsx
|
||||
import { DownloadResume } from '@/components/sections/DownloadResume'
|
||||
|
||||
export function Contact() {
|
||||
export function ContactPage() {
|
||||
return (
|
||||
<section className="section container-content" aria-labelledby="contact-heading">
|
||||
<SectionHeading title="Contact" />
|
||||
<div className="contact-links">
|
||||
{/* ... existing links (Email, GitHub, LinkedIn) ... */}
|
||||
{resumeAvailable && (
|
||||
<a href="/resume.pdf" download className="contact-link btn-primary">
|
||||
<svg>...</svg>
|
||||
<div>
|
||||
<div>Download Resume</div>
|
||||
<div style={{ fontSize: '14px', color: 'var(--text-muted)' }}>PDF</div>
|
||||
</div>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
<section>
|
||||
<h2>Contact</h2>
|
||||
<div className="contact-links">...</div>
|
||||
<DownloadResume />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -95,10 +112,10 @@ Nút Resume trong nav chỉ hiện khi có `/resume` route (HTML resume page).
|
||||
---
|
||||
|
||||
## Acceptance
|
||||
|
||||
- [x] Nút "Download Resume" hiển thị trong Hero CTA row
|
||||
- [x] Nút "Download Resume" hiển thị trong Contact section
|
||||
- [x] DownloadResume component riêng, dùng lại trong Contact section và ContactPage
|
||||
- [x] Click → download PDF từ `/resume.pdf`
|
||||
- [x] Khi chưa có PDF → ẩn hoàn toàn ở cả 2 vị trí
|
||||
- [x] Responsive trên mobile
|
||||
- [x] Nav không có nút Resume (Phase 2)
|
||||
|
||||
Reference in new issue
Block a user