@@ -5,8 +5,15 @@ import {
55 donationData ,
66 Img ,
77} from '@/constants/Donation' ;
8+ import {
9+ slideInLeft ,
10+ slideInRight ,
11+ slideInBottom ,
12+ buttonAnimation ,
13+ } from '@/styles/Animations' ;
814import Footer from '@/sections/Footer' ;
915import Header from '@/sections/Header' ;
16+ import { motion } from 'framer-motion' ;
1017
1118const Donate : React . FC = ( ) => {
1219 const [ showAllFilings , setShowAllFilings ] = useState ( false ) ;
@@ -24,7 +31,13 @@ const Donate: React.FC = () => {
2431 { /* Hero Section */ }
2532 < div className = "flex flex-col md:flex-row gap-6 md:gap-10 mt-10" >
2633 { /* Left Column with Heading and Buttons */ }
27- < div className = "flex-1 order-2 md:order-1" >
34+ < motion . div
35+ className = "flex-1 order-2 md:order-1"
36+ variants = { slideInLeft }
37+ initial = "hidden"
38+ whileInView = "visible"
39+ viewport = { { once : true , amount : 0.5 } }
40+ >
2841 < h1 className = "text-3xl sm:text-4xl font-bold mb-4 sm:mb-6" >
2942 Make a Lasting < span className = "text-orange-500" > Impact</ span > in
3043 Education
@@ -37,34 +50,51 @@ const Donate: React.FC = () => {
3750 from around the world.
3851 </ p >
3952
40- < div className = "flex flex-wrap gap-4 mb-6 sm:mb-8" >
53+ < motion . div
54+ className = "flex flex-wrap gap-4 mb-6 sm:mb-8"
55+ variants = { buttonAnimation }
56+ whileHover = "hover"
57+ whileTap = "tap"
58+ >
4159 < a href = { donationData . url } target = "_blank" rel = "noreferrer" >
4260 < button className = "bg-green-600 hover:bg-green-700 transition-colors text-white px-6 sm:px-8 py-2 sm:py-3 rounded-full font-medium shadow-md" >
4361 Donate Now
4462 </ button >
4563 </ a >
46- </ div >
64+ </ motion . div >
4765
4866 < div className = "bg-gray-100 p-4 rounded-lg border-l-4 border-blue-500 shadow-sm text-xs sm:text-sm" >
4967 < p className = "text-gray-600" >
5068 Your donation is tax-deductible in the United States as Sugar
5169 Labs is a registered 501(c)(3) nonprofit organization.
5270 </ p >
5371 </ div >
54- </ div >
72+ </ motion . div >
5573
5674 { /* Right Column with Image */ }
57- < div className = "flex-1 order-1 md:order-2 mb-6 md:mb-0" >
75+ < motion . div
76+ className = "flex-1 order-1 md:order-2 mb-6 md:mb-0"
77+ variants = { slideInRight }
78+ initial = "hidden"
79+ whileInView = "visible"
80+ viewport = { { once : true , amount : 0.5 } }
81+ >
5882 < img
5983 src = { Img [ 0 ] }
6084 alt = "Children asking for donations"
6185 className = "w-full rounded-lg shadow-lg object-cover h-64 sm:h-full"
6286 />
63- </ div >
87+ </ motion . div >
6488 </ div >
6589
6690 { /* Impact Statement Section */ }
67- < div className = "my-10 sm:my-16 bg-gradient-to-r from-blue-50 to-green-50 p-5 sm:p-8 rounded-xl shadow-sm" >
91+ < motion . div
92+ className = "my-10 sm:my-16 bg-gradient-to-r from-blue-50 to-green-50 p-5 sm:p-8 rounded-xl shadow-sm"
93+ variants = { slideInBottom }
94+ initial = "hidden"
95+ whileInView = "visible"
96+ viewport = { { once : true , amount : 0.5 } }
97+ >
6898 < h2 className = "text-2xl sm:text-3xl font-bold mb-4 sm:mb-6 text-center" >
6999 Your Donation Directly Assists Our Mission
70100 </ h2 >
@@ -89,10 +119,16 @@ const Donate: React.FC = () => {
89119 to succeed.
90120 </ p >
91121 </ div >
92- </ div >
122+ </ motion . div >
93123
94124 { /* Why Your Support Matters */ }
95- < div className = "my-10 sm:my-16" >
125+ < motion . div
126+ className = "my-10 sm:my-16"
127+ variants = { slideInBottom }
128+ initial = "hidden"
129+ whileInView = "visible"
130+ viewport = { { once : true , amount : 0.5 } }
131+ >
96132 < h2 className = "text-2xl sm:text-3xl font-bold mb-6 sm:mb-8 text-center" >
97133 How Your Donation Makes a Difference
98134 </ h2 >
@@ -115,10 +151,16 @@ const Donate: React.FC = () => {
115151 </ div >
116152 ) ) }
117153 </ div >
118- </ div >
154+ </ motion . div >
119155
120156 { /* Mission Statement */ }
121- < div className = "my-10 sm:my-16" >
157+ < motion . div
158+ className = "my-10 sm:my-16"
159+ variants = { slideInBottom }
160+ initial = "hidden"
161+ whileInView = "visible"
162+ viewport = { { once : true , amount : 0.5 } }
163+ >
122164 < div className = "bg-gray-50 p-5 sm:p-6 rounded-lg shadow-sm border border-gray-100" >
123165 < h2 className = "text-xl sm:text-2xl font-semibold mb-3 sm:mb-4 text-gray-800" >
124166 Our Mission
@@ -147,10 +189,17 @@ const Donate: React.FC = () => {
147189 </ a >
148190 </ div >
149191 </ div >
150- </ div >
192+ </ motion . div >
151193
152194 { /* Financial Transparency Section */ }
153- < div className = "my-10 sm:my-16" id = "financial-transparency" >
195+ < motion . div
196+ className = "my-10 sm:my-16"
197+ id = "financial-transparency"
198+ variants = { slideInBottom }
199+ initial = "hidden"
200+ whileInView = "visible"
201+ viewport = { { once : true , amount : 0.5 } }
202+ >
154203 < h2 className = "text-2xl sm:text-3xl font-bold mb-6 sm:mb-8 text-center" >
155204 Financial Transparency
156205 </ h2 >
@@ -213,12 +262,16 @@ const Donate: React.FC = () => {
213262 </ p >
214263 </ div >
215264 </ div >
216- </ div >
265+ </ motion . div >
217266
218267 { /* Donation Section */ }
219- < div
268+ < motion . div
220269 className = "my-10 sm:my-16 bg-green-50 p-5 sm:p-8 rounded-xl shadow-sm"
221270 id = "donate-section"
271+ variants = { slideInBottom }
272+ initial = "hidden"
273+ whileInView = "visible"
274+ viewport = { { once : true , amount : 0.5 } }
222275 >
223276 < h2 className = "text-2xl sm:text-3xl font-bold mb-4 sm:mb-6 text-center" >
224277 Support Our Mission Today
@@ -243,7 +296,7 @@ const Donate: React.FC = () => {
243296 </ button >
244297 </ a >
245298 </ div >
246- </ div >
299+ </ motion . div >
247300 </ div >
248301 < Footer />
249302 </ >
0 commit comments