mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat: add lazer border effect to download resume buttons
- Add rotating conic gradient border animation using pure CSS - Apply to both Hero section dropdown and Contact section dropdown - Shared wrapper for proper positioning context - Flex layout for correct height calculation - Respects prefers-reduced-motion
This commit is contained in:
1 parent
f1d249061e
commit
21311d311d
3 files changed
+139
-57
No files matched your search
@@ -5,8 +5,8 @@ import { resumeAvailable, resumeLanguages, resumeUrlFor } from "@/data/resume"
|
||||
import type { Language } from '@/types'
|
||||
|
||||
const langLabels: Record<Language, string> = {
|
||||
en: 'EN',
|
||||
vi: 'VI',
|
||||
en: 'English',
|
||||
vi: 'Tiếng Việt',
|
||||
}
|
||||
function HeroDownloadDropdown() {
|
||||
const [open, setOpen] = useState(false)
|
||||
@@ -29,32 +29,40 @@ function HeroDownloadDropdown() {
|
||||
|
||||
return (
|
||||
<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" strokeLinecap="round" strokeLinejoin="round" width="14" height="14" className="chevron">
|
||||
<polyline points="6 9 12 15 18 9" />
|
||||
</svg>
|
||||
</button>
|
||||
<div className={`download-resume-options ${open ? 'open' : ''}`}>
|
||||
{resumeLanguages.map(lang => (
|
||||
<a
|
||||
key={lang}
|
||||
href={resumeUrlFor(lang)}
|
||||
download
|
||||
target="_blank"
|
||||
className="download-resume-option"
|
||||
>
|
||||
{langLabels[lang]}
|
||||
</a>
|
||||
))}
|
||||
<div className="download-resume-shared-wrapper">
|
||||
<div className="download-resume-lazer-wrapper">
|
||||
<div className="download-resume-lazer-border" />
|
||||
<div className="download-resume-lazer-glow" />
|
||||
<div className="download-resume-lazer-inner">
|
||||
<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" strokeLinecap="round" strokeLinejoin="round" width="14" height="14" className="chevron">
|
||||
<polyline points="6 9 12 15 18 9" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`download-resume-options ${open ? 'open' : ''}`}>
|
||||
{resumeLanguages.map(lang => (
|
||||
<a
|
||||
key={lang}
|
||||
href={resumeUrlFor(lang)}
|
||||
download
|
||||
target="_blank"
|
||||
className="download-resume-option"
|
||||
>
|
||||
{langLabels[lang]}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user