Skip to content

Commit 26e6cb3

Browse files
committed
Feat : ads file added
1 parent db42873 commit 26e6cb3

File tree

5 files changed

+364
-9
lines changed

5 files changed

+364
-9
lines changed

app/components/PrivacyPolicyModal.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const policySections = [
2525
id : "4",
2626
title : "Contact Information",
2727
data : "For any privacy-related questions, please contact us at",
28-
contact : "support@dsavisualizer.com",
28+
contact : "hello@dsavisualizer.in",
2929
},
3030
];
3131

app/components/cookie.jsx

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
import React, { useEffect } from 'react';
2+
import { FiX } from 'react-icons/fi';
3+
4+
const cookieSections = [
5+
{
6+
id: "1",
7+
title: "What Are Cookies",
8+
data: "Cookies are small text files that are stored on your device when you visit our website. They help us provide you with a better experience by remembering your preferences and understanding how you use our site.",
9+
},
10+
{
11+
id: "2",
12+
title: "Types of Cookies We Use",
13+
points: [
14+
"Essential Cookies: Required for basic site functionality and security",
15+
"Performance Cookies: Help us understand how visitors interact with our website",
16+
"Functionality Cookies: Remember your preferences and settings",
17+
"Analytics Cookies: Collect information about your usage patterns",
18+
],
19+
},
20+
{
21+
id: "3",
22+
title: "How We Use Cookies",
23+
points: [
24+
"To authenticate users and prevent fraudulent use",
25+
"Remember your preferences and settings",
26+
"Analyze site traffic and usage patterns",
27+
"Improve our website performance and user experience",
28+
"Provide personalized content when available",
29+
],
30+
},
31+
{
32+
id: "4",
33+
title: "Third-Party Cookies",
34+
data: "We may also use cookies from trusted third-party services for analytics, performance monitoring, and other functionality. These third parties have their own privacy policies governing cookie usage.",
35+
},
36+
{
37+
id: "5",
38+
title: "Cookie Management",
39+
points: [
40+
"You can control cookie settings through your browser preferences",
41+
"Most browsers allow you to refuse or delete cookies",
42+
"Disabling essential cookies may affect website functionality",
43+
"You can opt-out of analytics cookies using our cookie preferences tool",
44+
],
45+
},
46+
{
47+
id: "6",
48+
title: "Your Choices",
49+
data: "You have the right to accept or reject cookies. Most web browsers automatically accept cookies, but you can usually modify your browser setting to decline cookies if you prefer. However, this may prevent you from taking full advantage of the website.",
50+
},
51+
{
52+
id: "7",
53+
title: "Updates to Cookie Policy",
54+
data: "We may update this Cookie Policy from time to time to reflect changes in technology, legislation, or our operations. We encourage you to periodically review this page for the latest information.",
55+
},
56+
{
57+
id: "8",
58+
title: "Contact Information",
59+
data: "If you have any questions about our use of cookies, please contact us at",
60+
contact: "[email protected]",
61+
},
62+
];
63+
64+
const CookiePolicyModal = ({ isOpen, onClose }) => {
65+
// Prevent body scroll when modal is open
66+
useEffect(() => {
67+
if (isOpen) {
68+
document.body.style.overflow = 'hidden';
69+
} else {
70+
document.body.style.overflow = 'auto';
71+
}
72+
return () => {
73+
document.body.style.overflow = 'auto';
74+
};
75+
}, [isOpen]);
76+
77+
if (!isOpen) return null;
78+
79+
return (
80+
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
81+
{/* Backdrop with fade-in animation */}
82+
<div
83+
className="fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm transition-opacity duration-300"
84+
onClick={onClose}
85+
/>
86+
87+
{/* Modal container with slide-up animation */}
88+
<div className="relative bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200 max-w-3xl w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-300 max-h-[90vh] flex flex-col">
89+
{/* Header with close button */}
90+
<div className="sticky top-0 bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 p-4 flex justify-between items-center z-10">
91+
<h2 className="text-2xl font-bold bg-gradient-to-r from-blue-600 to-blue-400 bg-clip-text text-transparent">
92+
Cookie Policy
93+
</h2>
94+
<button
95+
onClick={onClose}
96+
className="p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors text-gray-500 hover:text-gray-700 dark:hover:text-gray-300"
97+
aria-label="Close"
98+
>
99+
<FiX className="w-6 h-6" />
100+
</button>
101+
</div>
102+
103+
{/* Scrollable content */}
104+
<div className="overflow-y-auto p-6">
105+
<p className="mb-6 text-gray-600 dark:text-gray-300">
106+
This Cookie Policy explains how we use cookies and similar technologies on our website. It describes the types of cookies we use, their purposes, and how you can manage your cookie preferences.
107+
</p>
108+
109+
{/* Cookie policy sections */}
110+
<div className="space-y-6">
111+
<ul>
112+
{cookieSections.map((item, index) => (
113+
<li key={index} className='mb-3'>
114+
<div className="bg-gray-50 dark:bg-gray-800/50 p-4 rounded-lg">
115+
<div className='flex'>
116+
<span className="w-6 h-6 font-poppins font-semibold bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center text-blue-600 dark:text-blue-400 mr-3">{item.id}</span>
117+
<h3 className="text-xl font-semibold mb-2 flex items-center">
118+
{item.title}
119+
</h3>
120+
</div>
121+
{item.points && <ul className="space-y-2 text-gray-600 dark:text-gray-300 pl-9">
122+
{item.points.map((subitem, subindex) => (
123+
<li key={subindex} className='list-disc text-blue-500'>
124+
<span className='text-gray-600 dark:text-gray-300'>{subitem}</span>
125+
</li>
126+
))}
127+
</ul>}
128+
<p className="text-gray-600 dark:text-gray-300 pl-9">{item.data}</p>
129+
{item.contact && (
130+
<span className="font-medium pl-9 text-blue-600 dark:text-blue-400">{item.contact}</span>
131+
)}
132+
</div>
133+
</li>
134+
))}
135+
</ul>
136+
</div>
137+
138+
{/* Additional cookie information */}
139+
<div className="mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800">
140+
<h4 className="font-semibold text-blue-800 dark:text-blue-300 mb-2">
141+
🍪 Cookie Duration
142+
</h4>
143+
<p className="text-sm text-blue-700 dark:text-blue-400">
144+
Session cookies are temporary and expire when you close your browser. Persistent cookies remain on your device for a set period or until you delete them.
145+
</p>
146+
</div>
147+
148+
<div className="mt-8 pt-4 border-t border-gray-200 dark:border-gray-700">
149+
<p className="text-sm text-gray-500 dark:text-gray-400">
150+
Last updated: May 17, 2025
151+
</p>
152+
</div>
153+
</div>
154+
155+
{/* Footer with close button */}
156+
<div className="sticky bottom-0 bg-white dark:bg-gray-900 border-t border-gray-200 dark:border-gray-700 p-4 flex justify-end">
157+
<button
158+
onClick={onClose}
159+
className="px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors duration-300"
160+
>
161+
Accept & Close
162+
</button>
163+
</div>
164+
</div>
165+
</div>
166+
);
167+
};
168+
169+
export default CookiePolicyModal;

app/components/footer.jsx

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import React from "react";
33
import Link from "next/link";
44
import { useState } from "react";
55
import PrivacyPolicyModal from "@/app/components/PrivacyPolicyModal";
6+
import TermsOfServiceModal from "@/app/components/termsOfServicesModal";
7+
import CookiePolicyModal from "@/app/components/cookie";
68
import { GoHomeFill } from "react-icons/go";
79
import { MdAnimation } from "react-icons/md";
810
import { IoMdInformationCircle } from "react-icons/io";
@@ -11,6 +13,8 @@ import { RiQuestionLine } from "react-icons/ri";
1113

1214
const Footer = () => {
1315
const [showPolicyModal, setShowPolicyModal] = useState(false);
16+
const [showTermsModal, setShowTermsModal] = useState(false);
17+
const [showCookieModal, setShowCookieModal] = useState(false);
1418

1519
const quickLinks = [
1620
{ href: "/", text: "Home", icon: GoHomeFill },
@@ -68,9 +72,9 @@ const Footer = () => {
6872
];
6973

7074
const legalLinks = [
71-
{ href: "/privacy", text: "Privacy Policy", type: "modal" },
72-
{ href: "/terms", text: "Terms of Service", type: "link" },
73-
{ href: "/cookies", text: "Cookies", type: "link" },
75+
{ href: "/privacy", text: "Privacy Policy", type: "policyModal" },
76+
{ href: "/terms", text: "Terms of Service", type: "termsModal" },
77+
{ href: "/cookies", text: "Cookies", type: "cookieModal" },
7478
];
7579

7680
return (
@@ -107,14 +111,12 @@ const Footer = () => {
107111
</a>
108112
</span>
109113
</div>
110-
{/*
111114
<div className="flex items-start">
112115
<svg className="w-5 h-5 mt-0.5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
113116
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.5" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
114117
</svg>
115-
<a href="mailto:contact@dsavisualizer.com" className="hover:text-blue-400 transition">contact@dsavisualizer.com</a>
118+
<a href="mailto:hello@dsavisualizer.in" className="hover:text-blue-400 transition">hello@dsavisualizer.in</a>
116119
</div>
117-
*/}
118120
<div className="flex justify-left">
119121
<a
120122
className="border rounded-xl"
@@ -163,14 +165,33 @@ const Footer = () => {
163165
<ul className="space-y-3">
164166
{legalLinks.map((link, index) => (
165167
<li key={index}>
166-
{link.type === "modal" ? (
168+
{link.type === "policyModal" ? (
167169
<button
168170
onClick={() => setShowPolicyModal(true)}
169171
className="text-gray-500 hover:text-blue-400 transition"
170172
>
171173
{link.text}
172174
</button>
173-
) : (
175+
) :
176+
link.type === "termsModal" ? (
177+
<button
178+
onClick={() => setShowTermsModal(true)}
179+
className="text-gray-500 hover:text-blue-400 transition"
180+
>
181+
{link.text}
182+
</button>
183+
)
184+
:
185+
link.type === "cookieModal" ? (
186+
<button
187+
onClick={() => setShowCookieModal(true)}
188+
className="text-gray-500 hover:text-blue-400 transition"
189+
>
190+
{link.text}
191+
</button>
192+
)
193+
:
194+
(
174195
<Link
175196
href={link.href}
176197
className="text-gray-500 hover:text-blue-400 transition"
@@ -189,6 +210,18 @@ const Footer = () => {
189210
onClose={() => setShowPolicyModal(false)}
190211
/>
191212

213+
{/* Render the modal */}
214+
<TermsOfServiceModal
215+
isOpen={showTermsModal}
216+
onClose={() => setShowTermsModal(false)}
217+
/>
218+
219+
{/* Render the modal */}
220+
<CookiePolicyModal
221+
isOpen={showCookieModal}
222+
onClose={() => setShowCookieModal(false)}
223+
/>
224+
192225
<div>
193226
<h3 className="text-sm font-semibold text-white uppercase tracking-wider mb-4">
194227
Connect

0 commit comments

Comments
 (0)