-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added animations with framer-motion
- Loading branch information
Showing
10 changed files
with
311 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,59 @@ | ||
"use client"; | ||
|
||
import { motion, Variants } from "framer-motion"; | ||
|
||
import { Navbar } from "../Navbar"; | ||
|
||
const variants: Variants = { | ||
offscreen: { | ||
y: 10, | ||
opacity: 0, | ||
}, | ||
onscreen: { | ||
y: 0, | ||
opacity: 1, | ||
transition: { | ||
type: "spring", | ||
duration: 1, | ||
}, | ||
}, | ||
}; | ||
|
||
export const Hero = () => ( | ||
<div className="bg-[#EDB8B8] flex flex-col"> | ||
<Navbar /> | ||
<div className="w-full flex px-8 md:px-16 lg:px-32 xl:px-60 pt-12 lg:pt-28 pb-12 lg:pb-24 mx-auto"> | ||
<div className="flex flex-col mx-auto text-left text-black"> | ||
<p className="block lg:hidden mb-4 text-sm"> | ||
<motion.div | ||
className="flex flex-col mx-auto text-left text-black" | ||
initial="offscreen" | ||
whileInView="onscreen" | ||
viewport={{ once: true, amount: 0.7 }} | ||
transition={{ staggerChildren: 0.3 }} | ||
> | ||
<motion.p className="block lg:hidden mb-4 text-sm" variants={variants}> | ||
Have no fear of perfection | ||
<br />— you{"'"}ll never reach it. {"–"} Salvador Dali | ||
</p> | ||
<p className="lg:mb-4 hidden lg:block text-sm"> | ||
</motion.p> | ||
<motion.p | ||
className="lg:mb-4 hidden lg:block text-sm" | ||
variants={variants} | ||
> | ||
Have no fear of perfection—you{"'"}ll never reach it. | ||
{"–"} Salvador Dali | ||
</p> | ||
<div className="w-full md:w-3/4 leading-[1.9rem] md:leading-[2.5rem] text-xl md:text-3xl font-[500] lg:font-[400]"> | ||
</motion.p> | ||
<motion.div | ||
className="w-full md:w-3/4 leading-[1.9rem] md:leading-[2.5rem] text-xl md:text-3xl font-[500] lg:font-[400]" | ||
variants={variants} | ||
> | ||
<p> | ||
Working in multidisciplinary environments and different design areas | ||
including: 2D/3D graphics, 3D interiors and UX/UI strategy. I{"'"}m | ||
a true believer in working ways around things to try and make them | ||
environmentally less impactful, more ethical and always try to be | ||
aware of the bigger picture. | ||
</p> | ||
</div> | ||
</div> | ||
</motion.div> | ||
</motion.div> | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.