diff --git a/client/src/pages/LandingPage.jsx b/client/src/pages/LandingPage.jsx index c632492..2c38a09 100644 --- a/client/src/pages/LandingPage.jsx +++ b/client/src/pages/LandingPage.jsx @@ -1,15 +1,367 @@ +// import { Link } from 'react-router-dom' +// import { motion } from 'framer-motion' +// import { +// FiSearch, +// FiUsers, +// FiAward, +// FiTrendingUp, +// FiArrowRight, +// FiCheckCircle +// } from 'react-icons/fi' +// import { useTheme } from '../contexts/ThemeContext' +// const LandingPage = () => { +// const { isDark, toggleTheme } = useTheme() +// const features = [ +// { +// icon: FiSearch, +// title: 'Find Answers Fast', +// description: 'Search through thousands of questions and answers to find exactly what you need.' +// }, +// { +// icon: FiUsers, +// title: 'Community Driven', +// description: 'Join a community of experts and learners sharing knowledge and helping each other.' +// }, +// { +// icon: FiAward, +// title: 'Quality Content', +// description: 'Vote-based system ensures the best answers rise to the top.' +// }, +// { +// icon: FiTrendingUp, +// title: 'Stay Updated', +// description: 'Real-time notifications keep you informed about new answers and comments.' +// } +// ] + +// const sampleQuestions = [ +// { +// title: 'How to implement authentication in React?', +// answers: 12, +// votes: 45, +// tags: ['react', 'authentication', 'javascript'] +// }, +// { +// title: 'Best practices for API design in Node.js', +// answers: 8, +// votes: 32, +// tags: ['nodejs', 'api', 'backend'] +// }, +// { +// title: 'Understanding async/await in JavaScript', +// answers: 15, +// votes: 67, +// tags: ['javascript', 'async', 'promises'] +// } +// ] + +// return ( +//
+// {/* Navigation */} +// {/* */} + +// {/* ✅ REPLACE OLD NAV WITH THIS */} +// + +// {/* ✅ Spacer — kyunki nav fixed hai */} +//
+ + +// {/* ✅ Spacer — kyunki nav fixed hai */} +//
+// {/* Spacer */} +//
+// {/* Hero Section */} +//
+//
+// +//

+// The Professional +// Q&A Platform +//

+//

+// Ask questions, share knowledge, and build your reputation in a community of experts and learners. +//

+//
+// +// Start Asking Questions +// +// +// +// Browse Questions +// +//
+//
+//
+ +// {/* Hero Image */} +// +//
+//
+//
+//
+// {sampleQuestions.map((question, index) => ( +// +//

+// {question.title} +//

+//
+// {question.answers} answers +// {question.votes} votes +//
+//
+// {question.tags.map((tag, tagIndex) => ( +// +// {tag} +// +// ))} +//
+//
+// ))} +//
+//
+//
+//
+//
+ +// {/* Features Section */} +//
+//
+// +//

+// Why Choose StackIt? +//

+//

+// Built for professionals, designed for learning. Join thousands of users who trust StackIt for their Q&A needs. +//

+//
+ +//
+// {features.map((feature, index) => { +// const Icon = feature.icon +// return ( +// +//
+// +//
+//

+// {feature.title} +//

+//

+// {feature.description} +//

+//
+// ) +// })} +//
+//
+//
+ +// {/* CTA Section */} +//
+//
+// +//

+// Ready to Start Learning? +//

+//

+// Join our community today and start asking questions, sharing knowledge, and building your reputation. +//

+//
+// +// Create Free Account +// +// +// +// Explore Questions +// +//
+//
+//
+//
+ +// {/* Footer */} +//
+//
+//
+//
+//

StackIt

+//

+// The professional Q&A platform for collaborative learning and knowledge sharing. +//

+//
+//
+//

Platform

+//
    +//
  • Questions
  • +//
  • Tags
  • +//
  • Users
  • +//
+//
+//
+//

Support

+//
    +//
  • Help Center
  • +//
  • Contact Us
  • +//
  • Feedback
  • +//
+//
+//
+//

Legal

+//
    +//
  • Privacy Policy
  • +//
  • Terms of Service
  • +//
  • Cookie Policy
  • +//
+//
+//
+//
+//

© 2024 StackIt. All rights reserved.

+//
+//
+//
+//
+// ) +// } + +// export default LandingPage + + + + import { Link } from 'react-router-dom' import { motion } from 'framer-motion' -import { - FiSearch, - FiUsers, - FiAward, +import { useState, useEffect } from 'react' +import { + FiSearch, + FiUsers, + FiAward, FiTrendingUp, FiArrowRight, - FiCheckCircle + FiSun, + FiMoon, } from 'react-icons/fi' +import { useTheme } from '../contexts/ThemeContext' // ✅ path check karo const LandingPage = () => { + const { isDark, toggleTheme } = useTheme() + const [scrolled, setScrolled] = useState(false) + + useEffect(() => { + const onScroll = () => setScrolled(window.scrollY > 10) + window.addEventListener('scroll', onScroll) + return () => window.removeEventListener('scroll', onScroll) + }, []) + const features = [ { icon: FiSearch, @@ -54,25 +406,201 @@ const LandingPage = () => { } ] + const navLinks = [ + ['Home', '/'], + ['Questions', '/questions'], + ['Tags', '/tags'], + ['Users', '/users'], + ] + return (
- {/* Navigation */} -