Skip to content

Commit 11d274a

Browse files
committed
AnimationsAdded
1 parent 619158b commit 11d274a

File tree

5 files changed

+49
-7
lines changed

5 files changed

+49
-7
lines changed

src/pages/TryNow/BootableSoas.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Header from '@/sections/Header';
22
import Footer from '@/sections/Footer';
33
import FeatureSection from '@/components/TryNow/FeatureSection';
4+
import { motion } from 'framer-motion';
5+
import { zoomFadeInAnimation } from '@/styles/Animations';
46
import {
57
bootableSoasData,
68
mockupImage,
@@ -14,7 +16,14 @@ const BootableSoasPage = () => {
1416
<main className="container mx-auto px-4 sm:px-6 md:px-8 py-6">
1517
<FeatureSection data={bootableSoasData} />
1618

17-
<img src={mockupImage.path} alt="TurtleMockup" />
19+
<motion.img
20+
src={mockupImage.path}
21+
alt="BootableSoasMockup"
22+
variants={zoomFadeInAnimation}
23+
initial="initial"
24+
animate="animate"
25+
className="w-[80%] mx-auto"
26+
/>
1827

1928
<StepsToUse />
2029
</main>

src/pages/TryNow/MusicBlocks.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { motion } from 'framer-motion';
2-
import { fadeInUpAnimation } from '@/styles/Animations.ts';
2+
import { fadeInUpAnimation, zoomFadeInAnimation } from '@/styles/Animations.ts';
33
import Header from '@/sections/Header';
44
import Footer from '@/sections/Footer';
55
import FeatureSection from '@/components/TryNow/FeatureSection';
@@ -82,7 +82,14 @@ const MusicBlocksPage = () => {
8282
</div>
8383

8484
<div className="w-[80%] mx-auto flex justify-center">
85-
<img src={mockupImage.path} alt="TurtleMockup" />
85+
<motion.img
86+
src={mockupImage.path}
87+
alt="MusicBlocksMockup"
88+
variants={zoomFadeInAnimation}
89+
initial="initial"
90+
animate="animate"
91+
className="w-[80%] mx-auto"
92+
/>
8693
</div>
8794

8895
<p className="w-[80%] mx-auto flex justify-center">

src/pages/TryNow/Sugarizer.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Footer from '@/sections/Footer';
33
import FeatureSection from '@/components/TryNow/FeatureSection';
44
import LogoCards from '@/components/TryNow/LogoCards';
55
import { motion } from 'framer-motion';
6-
import { fadeInUpAnimation } from '@/styles/Animations.ts';
6+
import { fadeInUpAnimation, zoomFadeInAnimation } from '@/styles/Animations.ts';
77
import {
88
logoCardsData,
99
sugarizerData,
@@ -31,7 +31,14 @@ const SugarizerPage = () => {
3131
/>
3232
</motion.div>
3333

34-
<img src={mockupImage.path} alt="TurtleMockup" />
34+
<motion.img
35+
src={mockupImage.path}
36+
alt="SugarizerMockup"
37+
variants={zoomFadeInAnimation}
38+
initial="initial"
39+
animate="animate"
40+
className="w-[80%] mx-auto"
41+
/>
3542

3643
<h2 className="text-3xl sm:text-4xl font-semibold border-b-2 border-gray-300 pb-2 font-[Caveat] text-center mx-auto w-fit mt-10">
3744
Try it now!

src/pages/TryNow/TurtleBlocks.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Footer from '@/sections/Footer';
33
import FeatureSection from '@/components/TryNow/FeatureSection';
44
import Paragraph from '@/components/TryNow/Paragraph';
55
import { motion } from 'framer-motion';
6-
import { fadeInUpAnimation } from '@/styles/Animations.ts';
6+
import { fadeInUpAnimation, zoomFadeInAnimation } from '@/styles/Animations.ts';
77
import {
88
turtleBlocksData,
99
turtleBlocksSections,
@@ -50,7 +50,14 @@ const TurtleBlocksPage = () => {
5050
probably want to use Turtle Blocks rather than Turtle Blocks JS.
5151
</p>
5252

53-
<img src={mockupImage.path} alt="TurtleMockup" />
53+
<motion.img
54+
src={mockupImage.path}
55+
alt="TurtleMockup"
56+
variants={zoomFadeInAnimation}
57+
initial="initial"
58+
animate="animate"
59+
className="w-[80%] mx-auto"
60+
/>
5461

5562
{/* Render Paragraph components dynamically */}
5663
{turtleBlocksSections.map((section, index) => (

src/styles/Animations.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,3 +1035,15 @@ export const fadeInUpAnimation: Variants = {
10351035
},
10361036
},
10371037
};
1038+
export const zoomFadeInAnimation: Variants = {
1039+
initial: { opacity: 0, scale: 0.9 }, // Start with a slight shrink and hidden
1040+
animate: {
1041+
opacity: 1,
1042+
scale: 1, // Smoothly zoom to normal size
1043+
transition: {
1044+
delay: 1, // Starts after 2 seconds (optional, tweak as needed)
1045+
duration: 1.5, // Takes 1.5 seconds
1046+
ease: 'easeOut',
1047+
},
1048+
},
1049+
};

0 commit comments

Comments
 (0)