diff --git a/src/App.css b/src/App.css index 0e86750..e148ebf 100644 --- a/src/App.css +++ b/src/App.css @@ -478,6 +478,107 @@ } } +/* ===== Download Resume Dropdown ===== */ +.download-resume-dropdown { + position: relative; + width: 100%; +} + +.download-resume-summary { + display: flex; + align-items: center; + gap: 8px; + padding: 12px 20px; + border: 1px solid var(--border); + border-radius: 8px; + cursor: pointer; + list-style: none; + color: var(--text-primary); + background: var(--surface); + font-size: 14px; + font-weight: 500; + user-select: none; + transition: border-color 0.2s, color 0.2s; +} + +.download-resume-summary::-webkit-details-marker { + display: none; +} + +.download-resume-summary:hover { + border-color: var(--accent); + color: var(--accent); +} + +.download-resume-summary .chevron { + margin-left: auto; + transition: transform 0.2s; +} + +.download-resume-dropdown[open] .download-resume-summary .chevron { + transform: rotate(180deg); +} + +.download-resume-options { + position: absolute; + top: calc(100% + 4px); + left: 0; + width: 100%; + background: var(--surface); + border: 1px solid var(--border); + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); + z-index: 100; + overflow: hidden; +} + +.download-resume-option { + display: block; + padding: 10px 20px; + text-decoration: none; + color: var(--text-primary); + font-size: 14px; + transition: background 0.15s, color 0.15s; +} + +.download-resume-option:hover { + background: var(--accent); + color: #fff; +} + +/* Hero-specific overrides */ +.hero-download-dropdown .download-resume-summary { + font-size: 13px; +} + +.hero-download-option { + font-size: 13px; +} + +/* Desktop: show dropdown, hide mobile buttons */ +.download-resume-desktop, +.hero-download-desktop { + display: block; +} + +.download-resume-mobile, +.hero-download-mobile { + display: none; +} + +/* Mobile: show 2 buttons, hide dropdown */ +@media (max-width: 768px) { + .download-resume-desktop, + .hero-download-desktop { + display: none; + } + + .download-resume-mobile, + .hero-download-mobile { + display: block; + } +} + /* ===== Expertise Grid ===== */ .expertise-grid { display: grid; diff --git a/src/components/sections/DownloadResume.tsx b/src/components/sections/DownloadResume.tsx index 43fca22..2b541d8 100644 --- a/src/components/sections/DownloadResume.tsx +++ b/src/components/sections/DownloadResume.tsx @@ -24,7 +24,7 @@ function DownloadButton({ lang }: { lang: Language }) { }} > - + @@ -36,15 +36,52 @@ function DownloadButton({ lang }: { lang: Language }) { ) } +function DownloadDropdown() { + return ( +
+ + + + + + + Download Resume + + + + +
+ {resumeLanguages.map(lang => ( + + {langLabels[lang]} + + ))} +
+
+ ) +} + export function DownloadResume() { if (!resumeAvailable) return null return (
-
- {resumeLanguages.map(lang => ( - - ))} + {/* Desktop: dropdown */} +
+ +
+ {/* Mobile: 2 buttons */} +
+
+ {resumeLanguages.map(lang => ( + + ))} +
) diff --git a/src/components/sections/Hero.tsx b/src/components/sections/Hero.tsx index 6531b1b..1228f63 100644 --- a/src/components/sections/Hero.tsx +++ b/src/components/sections/Hero.tsx @@ -1,6 +1,56 @@ import { motion, useScroll, useTransform } from "motion/react" import { InView } from "@/components/ui/InView" import { resumeAvailable, resumeLanguages, resumeUrlFor } from "@/data/resume" +import type { Language } from '@/types' + +const langLabels: Record = { + en: 'EN', + vi: 'VI', +} + +function HeroDownloadDropdown() { + return ( +
+ + + + + + + Download Resume + + + + +
+ {resumeLanguages.map(lang => ( + + {langLabels[lang]} + + ))} +
+
+ ) +} + +function HeroDownloadButton({ lang }: { lang: Language }) { + return ( + + Download Resume ({langLabels[lang]}) + + ) +} import { Button } from "@/components/ui/Button" import { SocialLinks } from "@/components/ui/SocialLinks" import { profile } from "@/data/profile" @@ -95,11 +145,14 @@ export function Hero() { {resumeAvailable && ( <> - {resumeLanguages.map(lang => ( - - ))} +
+ +
+
+ {resumeLanguages.map(lang => ( + + ))} +
)}