Skip to content

Commit 6055bc1

Browse files
committed
Banner and header animation
1 parent 22e54f7 commit 6055bc1

File tree

3 files changed

+216
-180
lines changed

3 files changed

+216
-180
lines changed

src/App.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import { AnimatePresence } from 'framer-motion';
1212

1313
function App() {
1414
return (
15-
<div className=" bg-secondary-light dark:bg-primary-dark transition duration-300">
16-
<Router>
17-
<AnimatePresence>
15+
<AnimatePresence>
16+
<div className=" bg-secondary-light dark:bg-primary-dark transition duration-300">
17+
<Router>
1818
<ScrollToTop />
1919
<AppHeader />
2020
<Routes>
@@ -29,9 +29,9 @@ function App() {
2929
<Route path="contact" element={<Contact />} />
3030
</Routes>
3131
<AppFooter />
32-
</AnimatePresence>
33-
</Router>
34-
</div>
32+
</Router>
33+
</div>
34+
</AnimatePresence>
3535
);
3636
}
3737

src/components/shared/AppBanner.js

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,44 @@ const AppBanner = () => {
1111
<motion.section
1212
initial={{ opacity: 0 }}
1313
animate={{ opacity: 1 }}
14-
exit={{ opacity: 0 }}
14+
transition={{ ease: 'easeInOut', duration: 0.9, delay: 0.2 }}
1515
className="flex flex-col sm:justify-between items-center sm:flex-row mt-12 md:mt-2"
1616
>
1717
<div className="w-full md:w-1/3 text-left">
18-
<h1 className="text-2xl lg:text-4xl xl:text-5xl text-center sm:text-left font-semibold text-ternary-dark dark:text-primary-light uppercase">
18+
<motion.h1
19+
initial={{ opacity: 0 }}
20+
animate={{ opacity: 1 }}
21+
transition={{
22+
ease: 'easeInOut',
23+
duration: 0.9,
24+
delay: 0.1,
25+
}}
26+
className="text-2xl lg:text-4xl xl:text-5xl text-center sm:text-left font-semibold text-ternary-dark dark:text-primary-light uppercase"
27+
>
1928
Hi, Iam Stoman
20-
</h1>
21-
<p className="mt-4 text-lg sm:text-xl lg:text-3xl xl:text-4xl text-center sm:text-left font-semibold leading-none text-gray-400">
29+
</motion.h1>
30+
<motion.p
31+
initial={{ opacity: 0 }}
32+
animate={{ opacity: 1 }}
33+
transition={{
34+
ease: 'easeInOut',
35+
duration: 0.9,
36+
delay: 0.2,
37+
}}
38+
className="mt-4 text-lg sm:text-xl lg:text-3xl xl:text-4xl text-center sm:text-left font-semibold leading-none text-gray-400"
39+
>
2240
A Full-Stack Developer & Design Enthusiast
23-
</p>
24-
<div className="flex justify-center sm:block">
41+
</motion.p>
42+
<motion.div
43+
initial={{ opacity: 0 }}
44+
animate={{ opacity: 1 }}
45+
transition={{
46+
ease: 'easeInOut',
47+
duration: 0.9,
48+
delay: 0.3,
49+
}}
50+
className="flex justify-center sm:block"
51+
>
2552
<a
2653
download="Stoman-Resume.pdf"
2754
href="/files/Stoman-Resume.pdf"
@@ -31,16 +58,21 @@ const AppBanner = () => {
3158
<FiArrowDownCircle className="ml-0 sm:ml-1 mr-2 sm:mr-3 h-5 w-5 sn:w-6 sm:h-6"></FiArrowDownCircle>
3259
<span className="text-sm sm:text-lg">Download CV</span>
3360
</a>
34-
</div>
61+
</motion.div>
3562
</div>
36-
<div className="w-full sm:w-2/3 text-right float-right mt-8 sm:mt-0">
63+
<motion.div
64+
initial={{ opacity: 0, y: -180 }}
65+
animate={{ opacity: 1, y: 0 }}
66+
transition={{ ease: 'easeInOut', duration: 0.9, delay: 0.4 }}
67+
className="w-full sm:w-2/3 text-right float-right mt-8 sm:mt-0"
68+
>
3769
<img
3870
src={
3971
activeTheme === 'dark' ? developerLight : developerDark
4072
}
4173
alt="Developer"
4274
/>
43-
</div>
75+
</motion.div>
4476
</motion.section>
4577
);
4678
};

0 commit comments

Comments
 (0)