From 0b5308833f50dce7a94fc618f1123dcd714a011b Mon Sep 17 00:00:00 2001 From: Pheonix Date: Mon, 22 Jun 2026 23:44:03 +0530 Subject: [PATCH] added cookies page --- frontend/src/LandingPage.jsx | 290 ++++++++++++------ frontend/src/pages/Cookies/Cookies.jsx | 392 +++++++++++++++++++++++++ 2 files changed, 598 insertions(+), 84 deletions(-) create mode 100644 frontend/src/pages/Cookies/Cookies.jsx diff --git a/frontend/src/LandingPage.jsx b/frontend/src/LandingPage.jsx index 3f90794..7bed793 100644 --- a/frontend/src/LandingPage.jsx +++ b/frontend/src/LandingPage.jsx @@ -19,7 +19,6 @@ import { motion, AnimatePresence } from "framer-motion"; import ServicesMarquee from "./components/ServicesMarquee"; import { Star } from "lucide-react"; // Import Star icon for testimonials - /* ───────────────────────────────────────────── Reusable animated section wrapper ───────────────────────────────────────────── */ @@ -128,7 +127,8 @@ const TESTIMONIALS = [ name: "Sarah Chen", role: "Software Engineer, Google", rating: 5, - review: "PrepPilot AI was a game-changer for my Google interviews. The AI-generated questions were spot on, and the detailed explanations helped me understand complex topics deeply. Highly recommend!", + review: + "PrepPilot AI was a game-changer for my Google interviews. The AI-generated questions were spot on, and the detailed explanations helped me understand complex topics deeply. Highly recommend!", tags: ["DSA", "System Design", "Google"], avatar: "https://randomuser.me/api/portraits/women/1.jpg", }, @@ -137,7 +137,8 @@ const TESTIMONIALS = [ name: "David Lee", role: "Frontend Developer, Meta", rating: 5, - review: "The UI design questions and React deep-dives were incredibly helpful for my Meta interview. The platform's ability to simulate real interview scenarios is unmatched.", + review: + "The UI design questions and React deep-dives were incredibly helpful for my Meta interview. The platform's ability to simulate real interview scenarios is unmatched.", tags: ["Frontend", "React", "Meta"], avatar: "https://randomuser.me/api/portraits/men/2.jpg", }, @@ -146,7 +147,8 @@ const TESTIMONIALS = [ name: "Priya Sharma", role: "SDE-2, Amazon", rating: 4, - review: "Amazon's LP questions are tricky, but PrepPilot's behavioral prep helped me structure my STAR stories perfectly. Landed the offer!", + review: + "Amazon's LP questions are tricky, but PrepPilot's behavioral prep helped me structure my STAR stories perfectly. Landed the offer!", tags: ["Behavioral", "Leadership Principles", "Amazon"], avatar: "https://randomuser.me/api/portraits/women/3.jpg", }, @@ -155,7 +157,8 @@ const TESTIMONIALS = [ name: "Michael Brown", role: "Backend Engineer, Microsoft", rating: 5, - review: "The OOP design questions and system design challenges were excellent. PrepPilot helped me refine my approach and articulate my solutions clearly.", + review: + "The OOP design questions and system design challenges were excellent. PrepPilot helped me refine my approach and articulate my solutions clearly.", tags: ["OOP Design", "System Design", "Microsoft"], avatar: "https://randomuser.me/api/portraits/men/4.jpg", }, @@ -164,7 +167,8 @@ const TESTIMONIALS = [ name: "Jessica Wong", role: "Junior Developer", rating: 4, - review: "As a fresher, I found the 'Easy' and 'Medium' DSA sheets invaluable. PrepPilot made learning fun and boosted my confidence for my first job.", + review: + "As a fresher, I found the 'Easy' and 'Medium' DSA sheets invaluable. PrepPilot made learning fun and boosted my confidence for my first job.", tags: ["DSA", "Entry Level", "Fresher"], avatar: "https://randomuser.me/api/portraits/women/5.jpg", }, @@ -173,7 +177,8 @@ const TESTIMONIALS = [ name: "Omar Khan", role: "DevOps Engineer", rating: 5, - review: "The project ideas section gave me inspiration for my portfolio, and the compiler helped me practice coding challenges efficiently. Great tool!", + review: + "The project ideas section gave me inspiration for my portfolio, and the compiler helped me practice coding challenges efficiently. Great tool!", tags: ["DevOps", "Projects", "Coding"], avatar: "https://randomuser.me/api/portraits/men/6.jpg", }, @@ -182,7 +187,8 @@ const TESTIMONIALS = [ name: "Emily White", role: "Data Scientist", rating: 4, - review: "Even for data science roles, the system design and problem-solving sections were beneficial. The AI explanations are a lifesaver!", + review: + "Even for data science roles, the system design and problem-solving sections were beneficial. The AI explanations are a lifesaver!", tags: ["Problem Solving", "AI", "Data Science"], avatar: "https://randomuser.me/api/portraits/women/7.jpg", }, @@ -197,7 +203,9 @@ const StarRating = ({ count }) => ( ))} @@ -212,15 +220,24 @@ const TestimonialCard = ({ testimonial }) => (
{testimonial.tags.map((tag) => ( - + {tag} ))}
-

"{testimonial.review}"

+

+ "{testimonial.review}" +

- {testimonial.name} + {testimonial.name}

{testimonial.name}

{testimonial.role}

@@ -341,7 +358,6 @@ const LandingPage = () => { {/* Right buttons */}
- {user ? ( ) : ( @@ -948,9 +964,14 @@ const LandingPage = () => {
{/* Duplicate testimonials for seamless loop */} - {[...TESTIMONIALS, ...TESTIMONIALS].map((testimonial, index) => ( - - ))} + {[...TESTIMONIALS, ...TESTIMONIALS].map( + (testimonial, index) => ( + + ), + )}
@@ -989,74 +1010,176 @@ const LandingPage = () => { FOOTER ───────────────────────────────── */} + {/* Bottom Bar Container */} +
+

+ © {new Date().getFullYear()} PrepPilot AI. All rights reserved. +

+ +
+
+ {/* Premium Back To Top Button */} @@ -1110,8 +1233,7 @@ const LandingPage = () => { backdrop-blur-xl " style={{ - background: - "linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%)", + background: "linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%)", boxShadow: "0 15px 35px rgba(124,58,237,0.45), 0 0 20px rgba(124,58,237,0.35)", }} @@ -1138,7 +1260,7 @@ const LandingPage = () => { setCurrentPage={setCurrentPage} onLoginSuccess={() => { setOpenAuthModal(false); - + if (pendingRoute) { navigate(pendingRoute); setPendingRoute(null); @@ -1148,7 +1270,7 @@ const LandingPage = () => { }} /> - +
diff --git a/frontend/src/pages/Cookies/Cookies.jsx b/frontend/src/pages/Cookies/Cookies.jsx new file mode 100644 index 0000000..7adf8f4 --- /dev/null +++ b/frontend/src/pages/Cookies/Cookies.jsx @@ -0,0 +1,392 @@ +import React, { useState, useEffect } from "react"; +import { motion } from "framer-motion"; +import { + LuChevronDown, + LuFileText, + LuCookie, + LuShield, + LuGlobe, + LuSettings, + LuAlertTriangle, + LuArrowLeft, + LuList, +} from "react-icons/lu"; +import { useNavigate } from "react-router-dom"; + +const CookiesPolicy = () => { + const navigate = useNavigate(); + const [openSections, setOpenSections] = useState(new Set(["intro"])); + const [activeSection, setActiveSection] = useState("intro"); + + const toggleSection = (id) => { + const newSet = new Set(openSections); + if (newSet.has(id)) newSet.delete(id); + else newSet.add(id); + setOpenSections(newSet); + }; + + const scrollToSection = (id) => { + const element = document.getElementById(id); + if (element) { + const offset = 100; + const elementPosition = + element.getBoundingClientRect().top + window.scrollY; + window.scrollTo({ top: elementPosition - offset, behavior: "smooth" }); + setActiveSection(id); + } + }; + + // Scroll Spy + useEffect(() => { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + setActiveSection(entry.target.id); + } + }); + }, + { threshold: 0.4, rootMargin: "-80px 0px -20% 0px" }, + ); + const sections = document.querySelectorAll(".policy-section"); + sections.forEach((section) => observer.observe(section)); + return () => observer.disconnect(); + }, []); + + const sectionsData = [ + { + id: "intro", + title: "Introduction", + icon: , + }, + { + id: "what-are-cookies", + title: "What Are Cookies", + icon: , + }, + { + id: "why-we-use", + title: "Why We Use Cookies", + icon: , + }, + { + id: "types-of-cookies", + title: "Types of Cookies We Use", + icon: , + }, + { + id: "third-party", + title: "Third-Party Cookies", + icon: , + }, + { + id: "managing-cookies", + title: "Managing Cookies", + icon: , + }, + { + id: "changes", + title: "Changes to This Policy", + icon: , + }, + { + id: "contact", + title: "Contact Us", + icon: , + }, + ]; + + return ( +
+ {/* Navbar */} +
+
+
navigate("/")} + > + Logo + + PrepPilot AI + +
+ navigate("/")} + className="flex items-center gap-2 text-sm px-6 py-2.5 rounded-full border border-white/20 hover:bg-white/10 transition-all" + > + + Back to Home + +
+
+ +
+ {/* LEFT SIDEBAR */} +
+
+
+

+ + Table of Contents +

+
+ +
+ Last Updated: June 22, 2026 +
+
+
+ + {/* MAIN CONTENT */} +
+
+
+ + + LEGAL + +
+

+ Cookies Policy +

+

+ Last Updated: June 22, 2026 +

+
+ +
+ {sectionsData.map((sec) => ( +
+ + + {openSections.has(sec.id) && ( +
+ {getSectionContent(sec.id)} +
+ )} +
+ ))} +
+ + {/* Final Note */} +
+

Have Questions?

+

+ If you have any questions about our Cookies Policy, feel free to + reach out. +

+ + Contact Legal Team + +
+
+
+ + {/* Footer */} +
+

© {new Date().getFullYear()} PrepPilot AI. All rights reserved.

+
+
+ ); +}; + +// Comprehensive Section Content +const getSectionContent = (id) => { + switch (id) { + case "intro": + return ( +
+

+ This Cookies Policy explains how PrepPilot AI ("we", "us", or "our") + uses cookies and similar tracking technologies when you visit our + website and use our services. +

+

+ By using PrepPilot AI, you consent to the use of cookies as + described in this policy. If you do not agree, you should adjust + your browser settings accordingly. +

+
+ ); + + case "what-are-cookies": + return ( +

+ Cookies are small text files that are placed on your device (computer, + smartphone, or tablet) when you visit a website. They help websites + remember your preferences, improve user experience, and provide + analytical information. +

+ ); + + case "why-we-use": + return ( +
    +
  • To enable essential functionality of the platform
  • +
  • To remember your preferences and login sessions
  • +
  • To analyze website usage and improve our services
  • +
  • To personalize your learning experience
  • +
  • To ensure security and prevent fraudulent activity
  • +
+ ); + + case "types-of-cookies": + return ( +
+
+

+ 1. Essential Cookies +

+

+ These cookies are necessary for the website to function properly. + They cannot be disabled. +

+
+
+

+ 2. Performance / Analytics Cookies +

+

+ Help us understand how visitors interact with our platform using + tools like Google Analytics. +

+
+
+

+ 3. Functional Cookies +

+

+ Allow us to remember your preferences such as theme, language, or + saved progress. +

+
+
+

+ 4. Targeting / Advertising Cookies +

+

+ May be used to deliver more relevant content and advertisements + (if applicable). +

+
+
+ ); + + case "third-party": + return ( +
+

+ We may work with third-party service providers who set cookies on + our site for analytics, security, and performance purposes. These + include: +

+
    +
  • Google Analytics
  • +
  • Payment processors (if applicable)
  • +
  • Authentication providers
  • +
+

+ These third parties have their own privacy and cookie policies. +

+
+ ); + + case "managing-cookies": + return ( +
+

+ You can control and manage cookies through your browser settings. + Most browsers allow you to: +

+
    +
  • View what cookies are set on your device
  • +
  • Delete existing cookies
  • +
  • Block future cookies
  • +
  • Receive notifications when cookies are being set
  • +
+

+ Please note that disabling essential cookies may affect the + functionality of PrepPilot AI. +

+
+ ); + + case "changes": + return ( +

+ We may update this Cookies Policy from time to time to reflect changes + in our practices or for legal reasons. The updated policy will be + posted on this page with a revised "Last Updated" date. We encourage + you to review this page periodically. +

+ ); + + case "contact": + return ( +

+ If you have any questions about our Cookies Policy, please contact us + at:{" "} + + legal@preppilot.ai + +

+ ); + + default: + return

Content coming soon.

; + } +}; + +export default CookiesPolicy;