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
+70
-4
@@ -691,7 +691,7 @@
|
||||
/* ===== Download Resume Dropdown ===== */
|
||||
.download-resume-dropdown {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.download-resume-summary {
|
||||
@@ -706,8 +706,8 @@
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: all var(--transition-fast);
|
||||
border: 1px solid var(--border);
|
||||
background: transparent;
|
||||
border: none;
|
||||
width: 100%;
|
||||
color: var(--accent);
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
@@ -745,7 +745,7 @@
|
||||
position: absolute;
|
||||
top: calc(100% + 4px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
width: fit-content;
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
@@ -767,6 +767,72 @@
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
/* Shared wrapper for lazer + dropdown positioning context */
|
||||
.download-resume-shared-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
/* ===== Download Resume Lazer Border ===== */
|
||||
.download-resume-lazer-wrapper {
|
||||
position: relative;
|
||||
padding: 2px;
|
||||
width: fit-content;
|
||||
overflow: hidden;
|
||||
border-radius: calc(var(--radius-md) + 2px);
|
||||
}
|
||||
|
||||
.download-resume-lazer-border {
|
||||
position: absolute;
|
||||
inset: -200%;
|
||||
background: conic-gradient(
|
||||
from 0deg,
|
||||
transparent 60%,
|
||||
var(--accent) 80%,
|
||||
var(--accent-hover) 95%,
|
||||
transparent 100%
|
||||
);
|
||||
animation: download-resume-lazer-spin 4s linear infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.download-resume-lazer-glow {
|
||||
position: absolute;
|
||||
inset: -200%;
|
||||
background: conic-gradient(
|
||||
from 0deg,
|
||||
transparent 60%,
|
||||
var(--accent) 80%,
|
||||
var(--accent-hover) 95%,
|
||||
transparent 100%
|
||||
);
|
||||
animation: download-resume-lazer-spin 4s linear infinite;
|
||||
pointer-events: none;
|
||||
filter: blur(12px);
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.download-resume-lazer-inner {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
@keyframes download-resume-lazer-spin {
|
||||
from { rotate: 0deg; }
|
||||
to { rotate: 360deg; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.download-resume-lazer-border,
|
||||
.download-resume-lazer-glow {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Desktop: show dropdown, hide mobile buttons */
|
||||
|
||||
Reference in new issue
Block a user