mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(motion): standardize animation recipes across sections and pages
- Replace the AnimatedSection wrapper with the per-section recipe: InView
wrapping motion.section with initial="hidden" whileInView="visible" and
viewport={{ once: true, amount: 0.1 }}; delete AnimatedSection.tsx
- Apply the item recipe (opacity/y 24, amount 0.2, delay i * 0.08) to timeline
entries, philosophy/expertise/project cards, hero blocks, contact links and
project-detail blocks
- Move transforms into motion: whileHover/whileTap on cards, links and Button;
CSS :hover keeps only colour/border/shadow, and `transition: all` becomes an
explicit property list so motion owns the transform
- Rebuild HeroParticles as perspective-projected depth tiers with scroll-linked
transforms, no mask-image, plus a documented reduced-motion caveat
- Update AGENTS.md motion section and spec-v3-ui-enhancements /
spec-v3-mobile-navigation progress notes
This commit is contained in:
1 parent
ae4a5b9cca
commit
4387f889f5
18 files changed
+885
-490
No files matched your search
@@ -18,10 +18,7 @@ export function Expertise() {
|
||||
viewport={{ once: true, amount: 0.1 }}
|
||||
variants={{
|
||||
hidden: { opacity: 0 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: 0.1 },
|
||||
},
|
||||
visible: { opacity: 1, transition: { duration: 0.5 } },
|
||||
}}
|
||||
>
|
||||
<SectionHeading title={strings.expertise.heading[lang]} tag={strings.expertise.heading[lang]} />
|
||||
@@ -30,15 +27,11 @@ export function Expertise() {
|
||||
<motion.div
|
||||
key={group.title}
|
||||
className="expertise-card"
|
||||
variants={{
|
||||
hidden: { opacity: 0, y: 30 },
|
||||
visible: {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
transition: { duration: 0.5, delay: i * 0.1 },
|
||||
},
|
||||
}}
|
||||
whileHover={{ scale: 1.05, y: -2 }}
|
||||
initial={{ opacity: 0, y: 24 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true, amount: 0.2 }}
|
||||
transition={{ duration: 0.45, ease: 'easeOut', delay: i * 0.08 }}
|
||||
whileHover={{ scale: 1.02, y: -4 }}
|
||||
whileTap={{ scale: 0.98 }}
|
||||
>
|
||||
<h3>{useField(group.title, group.titleEn)}</h3>
|
||||
|
||||
Reference in new issue
Block a user