forked from Nsanjayboruds/RIVETO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFooter.jsx
More file actions
237 lines (215 loc) · 10.2 KB
/
Footer.jsx
File metadata and controls
237 lines (215 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
import React, { useEffect, useRef, useState } from 'react';
import { Link } from 'react-router-dom';
import { FaFacebookF, FaTwitter, FaInstagram, FaLinkedinIn, FaPhone, FaEnvelope, FaMapMarkerAlt, FaHeart, FaCheckCircle, FaTimes } from 'react-icons/fa';
import { RiCustomerService2Fill } from "react-icons/ri";
import { BiSupport } from "react-icons/bi";
import gsap from 'gsap';
import { ScrollTrigger } from 'gsap/ScrollTrigger';
import { toast } from 'react-toastify';
gsap.registerPlugin(ScrollTrigger);
function Footer() {
const footerRef = useRef(null);
const currentYear = new Date().getFullYear();
const [email, setEmail] = useState('');
const [isSubscribed, setIsSubscribed] = useState(false);
useEffect(() => {
// Animate footer elements on scroll
gsap.fromTo(".footer-section",
{ opacity: 0, y: 30 },
{
opacity: 1,
y: 0,
duration: 0.8,
stagger: 0.2,
ease: "power2.out",
scrollTrigger: {
trigger: footerRef.current,
start: "top 90%",
toggleActions: "play none none none"
}
}
);
}, []);
// Handle subscribe button click
const handleSubscribe = () => {
if (!email) {
toast.error('Please enter your email address');
return;
}
// Simulate API call
setTimeout(() => {
setIsSubscribed(true);
toast.success('🎁 You’ve successfully subscribed to Riveto! Enjoy exclusive offers.');
// Reset after 5 seconds
setTimeout(() => {
setIsSubscribed(false);
setEmail('');
}, 5000);
}, 1000);
};
return (
<footer ref={footerRef} className="w-full bg-gradient-to-b from-gray-900 to-gray-950 text-gray-300 border-t border-gray-800 relative overflow-hidden">
{/* Background Pattern */}
<div className="absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+CiAgPHBhdGggZD0iTTAgMGg2MHY2MEgweiIgZmlsbD0ibm9uZSIvPgogIDxwYXRoIGQ9Ik0zMCAzMG0tMjggMGEyOCwyOCAwIDEsMSA1NiwwYTI4LDI4IDAgMSwxIC01NiwwIiBzdHJva2U9InJnYmEoMjU1LDI1NSwyNTUsMC4wMykiIHN0cm9rZS13aWR0aD0iMC41IiBmaWxsPSJub25lIi8+Cjwvc3ZnPg==')] opacity-20"></div>
{/* Decorative Elements */}
<div className="absolute -top-20 -right-20 w-40 h-40 bg-cyan-500/10 rounded-full blur-3xl"></div>
<div className="absolute -bottom-20 -left-20 w-40 h-40 bg-blue-500/10 rounded-full blur-3xl"></div>
{/* Main Footer Content */}
<div className="max-w-7xl mx-auto py-16 px-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-10 relative z-10">
{/* Brand Info */}
<div className="footer-section">
<div className="flex items-center gap-3 mb-6">
<div className="w-10 h-10 bg-gradient-to-r from-cyan-500 to-blue-600 rounded-lg flex items-center justify-center">
<span className="text-white font-bold text-lg">R</span>
</div>
<h2 className="text-2xl font-bold tracking-wide bg-gradient-to-r from-cyan-400 to-blue-500 bg-clip-text text-transparent">
RIVETO
</h2>
</div>
<p className="text-sm leading-relaxed text-gray-400 mb-6">
RIVETO is a premium e-commerce platform built for the modern shopper. Experience seamless shopping with cutting-edge technology and exceptional service.
</p>
{/* Social Media */}
<div className="flex gap-3">
{[
{ icon: <FaFacebookF className="w-4 h-4" />, color: "hover:bg-blue-600" },
{ icon: <FaTwitter className="w-4 h-4" />, color: "hover:bg-cyan-500" },
{ icon: <FaInstagram className="w-4 h-4" />, color: "hover:bg-pink-600" },
{ icon: <FaLinkedinIn className="w-4 h-4" />, color: "hover:bg-blue-700" }
].map((social, index) => (
<a
key={index}
href="#"
className={`w-10 h-10 bg-gray-800 rounded-lg flex items-center justify-center transition-all duration-300 hover:scale-110 ${social.color}`}
aria-label={`Follow us on ${social.icon.type.displayName}`}
>
{social.icon}
</a>
))}
</div>
</div>
{/* Quick Links */}
<div className="footer-section">
<h3 className="text-lg font-semibold text-white mb-6 flex items-center gap-2">
<RiCustomerService2Fill className="text-cyan-400" />
Quick Links
</h3>
<ul className="space-y-3">
{['Home', 'About Us', 'Products', 'Collections', 'New Arrivals', 'Best Sellers'].map((item, index) => (
<li key={index}>
<a href="#" className="text-sm text-gray-400 hover:text-cyan-400 transition-colors duration-300 flex items-center gap-2 group">
<span className="w-1 h-1 bg-cyan-500 rounded-full opacity-0 group-hover:opacity-100 transition-opacity"></span>
{item}
</a>
</li>
))}
</ul>
</div>
{/* Support */}
<div className="footer-section">
<h3 className="text-lg font-semibold text-white mb-6 flex items-center gap-2">
<BiSupport className="text-cyan-400" />
Support
</h3>
<ul className="space-y-3">
{[
{ name: 'Contact Us', to: '/contact' },
{ name: 'Size Guide', to: '/size-guide' },
{ name: 'FAQs', to: '/faq' },
{ name: 'Privacy Policy', to: '/privicypolicy' },
{ name: 'Terms of Service', to: '/termsandservices' },
].map((item, index) => (
<li key={index}>
<Link to={item.to} className="text-sm text-gray-400 hover:text-cyan-400 transition-colors duration-300 flex items-center gap-2 group">
<span className="w-1 h-1 bg-cyan-500 rounded-full opacity-0 group-hover:opacity-100 transition-opacity"></span>
{item.name}
</Link>
</li>
))}
</ul>
</div>
{/* Contact Info */}
<div className="footer-section">
<h3 className="text-lg font-semibold text-white mb-6">Get in Touch</h3>
<ul className="space-y-4">
<li className="flex items-start gap-3">
<div className="w-8 h-8 bg-cyan-500/10 rounded-lg flex items-center justify-center flex-shrink-0 mt-1">
<FaPhone className="w-3 h-3 text-cyan-400" />
</div>
<div>
<p className="text-sm font-medium text-white">Phone</p>
<p className="text-sm text-gray-400">+91 93073 42318</p>
<p className="text-sm text-gray-400">+1 123 456 7890</p>
</div>
</li>
<li className="flex items-start gap-3">
<div className="w-8 h-8 bg-cyan-500/10 rounded-lg flex items-center justify-center flex-shrink-0 mt-1">
<FaEnvelope className="w-3 h-3 text-cyan-400" />
</div>
<div>
<p className="text-sm font-medium text-white">Email</p>
<p className="text-sm text-gray-400">contact@riveto.com</p>
<p className="text-sm text-gray-400">support@riveto.com</p>
</div>
</li>
<li className="flex items-start gap-3">
<div className="w-8 h-8 bg-cyan-500/10 rounded-lg flex items-center justify-center flex-shrink-0 mt-1">
<FaMapMarkerAlt className="w-3 h-3 text-cyan-400" />
</div>
<div>
<p className="text-sm font-medium text-white">Address</p>
<p className="text-sm text-gray-400">123 lorem ipsum Street</p>
<p className="text-sm text-gray-400">lorem2, ipsum3, 10001</p>
</div>
</li>
</ul>
</div>
</div>
{/* Newsletter Subscription */}
<div className="border-t border-gray-800 py-8">
<div className="max-w-7xl mx-auto px-6">
<div className="flex flex-col lg:flex-row items-center justify-between gap-6">
<div>
<h4 className="text-white font-semibold mb-2">Stay Updated</h4>
<p className="text-sm text-gray-400">Subscribe to our newsletter for exclusive offers and updates</p>
</div>
<div className="flex flex-col sm:flex-row gap-3 relative z-10 w-full lg:w-auto">
<input
type="email"
placeholder="Enter your email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="px-4 py-2 bg-gray-800 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-transparent w-full sm:w-64"
/>
<button
onClick={handleSubscribe}
className="px-6 py-2 bg-gradient-to-r from-cyan-500 to-blue-600 text-white rounded-lg hover:shadow-lg transition-all duration-300 whitespace-nowrap"
>
Subscribe
</button>
</div>
</div>
</div>
</div>
{/* Bottom bar */}
<div className="bg-gradient-to-r from-gray-900 to-gray-950 py-6 border-t border-gray-800">
<div className="max-w-7xl mx-auto px-6 flex flex-col md:flex-row items-center justify-between gap-4">
<p className="text-xs text-gray-500 text-center md:text-left">
© {currentYear} <span className="text-cyan-400 font-medium">RIVETO</span> — All rights reserved.
</p>
<div className="flex items-center gap-6 text-xs text-gray-500">
<span>Terms of Service</span>
<span>Privacy Policy</span>
<span>Cookie Policy</span>
</div>
<div className="flex items-center gap-2 text-xs text-gray-500">
<span>Made with</span>
<FaHeart className="text-rose-500 animate-pulse" />
<span>for our customers</span>
</div>
</div>
</div>
</footer>
);
}
export default Footer;