Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 224 additions & 0 deletions src/app/cookies/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
export default function CookiesPage() {
const lastUpdated = new Date().toLocaleDateString();

return (
<main className="min-h-screen bg-[var(--bg-secondary)] text-gray-900 dark:text-white px-6 md:px-12 py-16">
<div className="max-w-4xl mx-auto">
{/* Title */}
<h1 className="text-4xl font-bold mb-4">Cookies Policy</h1>

<p className="text-sm text-gray-500 mb-10">
Last updated: {lastUpdated}
</p>

{/* Intro */}
<section className="space-y-6 text-sm leading-relaxed text-gray-700 dark:text-gray-300">
<p>
This Cookies Policy explains how <b>cookies</b> and similar tracking
technologies are used on this website and related services operated
by <b>{`{Your Brand Name}`}</b>. It explains what cookies are, how
we use them, and how you can control them.
</p>

{/* 1 */}
<div>
<h2 className="text-xl font-semibold mb-2">1. What are cookies?</h2>
<p>
Cookies are small text files stored on your device (computer,
tablet, or mobile) when you visit a website. They are widely used
to make websites work efficiently and provide reporting
information.
</p>
</div>

{/* 2 */}
<div>
<h2 className="text-xl font-semibold mb-2">
2. Types of cookies we use
</h2>

<p className="mb-3">
We use different types of cookies for various purposes:
</p>

<ul className="list-disc pl-5 space-y-2">
<li>
<b>Essential Cookies:</b> Required for core functionality such
as authentication, security, and basic navigation.
</li>

<li>
<b>Performance & Analytics Cookies:</b> Help us understand how
users interact with the site (e.g., page views, traffic sources,
user behavior).
</li>

<li>
<b>Functional Cookies:</b> Remember your preferences such as
theme, language, or region settings.
</li>

<li>
<b>Security Cookies:</b> Used to detect fraud, abuse, and
unauthorized access.
</li>

<li>
<b>Advertising Cookies (if enabled):</b> Used to deliver
relevant ads and measure campaign performance.
</li>
</ul>
</div>

{/* 3 */}
<div>
<h2 className="text-xl font-semibold mb-2">
3. How we use cookies
</h2>
<p>We use cookies to:</p>

<ul className="list-disc pl-5 mt-2 space-y-2">
<li>Ensure the website functions correctly</li>
<li>Improve performance and user experience</li>
<li>Remember user preferences and settings</li>
<li>Analyze traffic and usage patterns</li>
<li>Improve content, features, and services</li>
<li>Enhance security and prevent abuse</li>
</ul>
</div>

{/* 4 */}
<div>
<h2 className="text-xl font-semibold mb-2">
4. Third-party cookies
</h2>
<p>
Some cookies may be placed by third-party services that appear on
our pages. These include tools such as:
</p>

<ul className="list-disc pl-5 mt-2 space-y-2">
<li>
Analytics providers (e.g., Google Analytics or alternatives)
</li>
<li>Authentication or login providers</li>
<li>Embedded content providers (e.g., videos, maps, widgets)</li>
<li>Performance monitoring tools</li>
</ul>

<p className="mt-3">
These third parties may collect data in accordance with their own
privacy policies.
</p>
</div>

{/* 5 */}
<div>
<h2 className="text-xl font-semibold mb-2">
5. Why cookies are important
</h2>
<p>
Cookies help us provide a smoother and more personalized
experience. Without cookies, some features may not work properly,
and you may need to re-enter information repeatedly.
</p>
</div>

{/* 6 */}
<div>
<h2 className="text-xl font-semibold mb-2">
6. How you can control cookies
</h2>

<p>
You have full control over cookies and can manage them in several
ways:
</p>

<ul className="list-disc pl-5 mt-2 space-y-2">
<li>Adjust browser settings to block or delete cookies</li>
<li>Set preferences to accept or reject certain cookies</li>
<li>Use “Do Not Track” options if supported by your browser</li>
</ul>

<p className="mt-3">
Please note that disabling cookies may affect website
functionality.
</p>
</div>

{/* 7 */}
<div>
<h2 className="text-xl font-semibold mb-2">7. Cookie retention</h2>
<p>
Cookies may be stored either temporarily (session cookies) or for
longer periods (persistent cookies). Session cookies are deleted
when you close your browser, while persistent cookies remain until
they expire or are deleted manually.
</p>
</div>

{/* 8 */}
<div>
<h2 className="text-xl font-semibold mb-2">
8. Data collected through cookies
</h2>
<p>Cookies may collect information such as:</p>

<ul className="list-disc pl-5 mt-2 space-y-2">
<li>
IP address (anonymized or partial depending on configuration)
</li>
<li>Browser type and device information</li>
<li>Pages visited and time spent on site</li>
<li>Interaction patterns (clicks, navigation flow)</li>
<li>Login/session status (if applicable)</li>
</ul>
</div>

{/* 9 */}
<div>
<h2 className="text-xl font-semibold mb-2">
9. Legal basis for cookies
</h2>
<p>Where applicable, we use cookies based on:</p>

<ul className="list-disc pl-5 mt-2 space-y-2">
<li>Your consent (for non-essential cookies)</li>
<li>
Legitimate interest (for essential functionality and security)
</li>
<li>Contractual necessity (for logged-in services)</li>
</ul>
</div>

{/* 10 */}
<div>
<h2 className="text-xl font-semibold mb-2">
10. Updates to this policy
</h2>
<p>
We may update this Cookies Policy from time to time to reflect
changes in technology, legal requirements, or our services.
Updates will be posted on this page with a revised “Last Updated”
date.
</p>
</div>

{/* 11 */}
<div>
<h2 className="text-xl font-semibold mb-2">11. Contact us</h2>
<p>
If you have any questions about this Cookies Policy, you can
contact us at:
</p>

<p className="mt-2 font-medium">
support@yourdomain.com (replace with your real email)
</p>
</div>
</section>
</div>
</main>
);
}
9 changes: 9 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FloatingParticles } from '@/components/FloatingParticles';
import dynamic from 'next/dynamic';
import BackToTop from '@/components/BackToTop';
import ErrorBoundary from '@/components/ErrorBoundary';
import CookieConsent from '@/components/CookieConsent';

const Sponsors = dynamic(() => import('@/components/home/Sponsors'));
const Mission = dynamic(() => import('@/components/home/Mission'));
Expand All @@ -20,21 +21,29 @@ export default function Home() {
<FloatingParticles />
<Hero />
<SectionDivider />

<ErrorBoundary>
<SectionEntrance>
<Sponsors />
</SectionEntrance>

<SectionEntrance>
<Mission />
</SectionEntrance>

<SectionEntrance>
<CodingNews />
</SectionEntrance>

<SectionEntrance>
<PastCollaborations />
</SectionEntrance>
</ErrorBoundary>

<BackToTop />

{/* COOKIE CONSENT GLOBAL POPUP */}
<CookieConsent />
</main>
</>
);
Expand Down
62 changes: 62 additions & 0 deletions src/components/CookieConsent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
'use client';

import { useEffect, useState } from 'react';

const COOKIE_KEY = 'cookie_consent';

export default function CookieConsent() {
const [visible, setVisible] = useState(false);

useEffect(() => {
const saved = localStorage.getItem(COOKIE_KEY);

if (!saved) {
setVisible(true);
}
}, []);

const handleAccept = () => {
localStorage.setItem(COOKIE_KEY, 'accepted');
setVisible(false);
};

const handleReject = () => {
localStorage.setItem(COOKIE_KEY, 'rejected');
setVisible(false);
};

if (!visible) return null;

return (
<div className="fixed bottom-6 left-1/2 -translate-x-1/2 z-[9999] w-[92%] md:w-[600px] bg-white dark:bg-[#111] border border-gray-200 dark:border-gray-700 shadow-xl rounded-xl p-5">
<div className="flex flex-col gap-3">
<h2 className="text-lg font-semibold">We use cookies</h2>

<p className="text-sm text-gray-600 dark:text-gray-300">
We use cookies to improve your experience, analyze traffic, and
personalize content. You can accept or reject non-essential cookies.
</p>

<div className="flex flex-col sm:flex-row gap-3 mt-2">
<button
onClick={handleAccept}
className="px-4 py-2 rounded-lg bg-cyan-500 text-white hover:bg-cyan-600 transition"
>
Accept all
</button>

<button
onClick={handleReject}
className="px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-800 transition"
>
Reject non-essential
</button>
</div>

<p className="text-xs text-gray-500">
You can change your preferences anytime in Cookies Policy.
</p>
</div>
</div>
);
}
7 changes: 6 additions & 1 deletion src/components/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function Footer() {
</div>
<div className={styles.links}>
<Link href="/wiki" className={styles.link}>
<Book size={16} /> Wiki &amp; Docs
<Book size={16} /> Wiki & Docs
</Link>
<Link href="/flags" className={styles.link}>
<Flag size={16} /> Feature Flags
Expand Down Expand Up @@ -102,6 +102,11 @@ export default function Footer() {
<Link href="/privacy" className={styles.link}>
<Shield size={16} /> Privacy Policy
</Link>

{/* Cookies Policy */}
<Link href="/cookies" className={styles.link}>
<Shield size={16} /> Cookies Policy
</Link>
</div>
</div>

Expand Down
Loading