Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Faq page. resolved issue #29 https://github.com/yashksaini-coder/Leetcode-Journal/issues/29 #32

Merged
merged 4 commits into from
Jan 8, 2025
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
28 changes: 28 additions & 0 deletions app/FAQ/component/contact-section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Button } from "@/components/ui/button"
import { Mail, Phone } from 'lucide-react'

export default function ContactSection() {
yashksaini-coder marked this conversation as resolved.
Show resolved Hide resolved
return (
<div className="mt-16 bg-white rounded-lg p-8 text-center">
<h2 className="text-2xl font-bold text-purple-800 mb-4">Still have questions?</h2>
<p className="text-purple-600 mb-6">Our support team is here to help you</p>
<div className="flex justify-center space-x-4">
<Button
variant="outline"
className="flex items-center space-x-2 bg-white hover:bg-purple-300 text-black hover:text-black"
>
<Mail size={20} />
<span>Email Us</span>
</Button>
<Button
variant="outline"
className="flex items-center space-x-2 bg-white hover:bg-purple-300 text-black hover:text-black"
>
<Phone size={20} />
<span>Call Us</span>
</Button>
</div>
</div>
)
}

86 changes: 86 additions & 0 deletions app/FAQ/component/faq-component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
'use client'

import { useState } from 'react'
import { Input } from "@/components/ui/input"
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"
import { Search } from 'lucide-react'

const faqs = [
{
question: "What is Leetcode Journal, and how can it help me?",
answer: "Leetcode Journal is a tool designed to help developers track, organize, and review their Leetcode solutions. It provides an intuitive interface to save solutions, categorize problems, monitor progress, and analyze performance. It's great for personal learning and showcasing problem-solving skills."
},
{
question: "Can I import my existing Leetcode solutions into the platform?",
answer: "Yes, Leetcode Journal supports solution imports. You can upload your solutions as files or manually enter them to categorize and analyze them within the platform."
},
{
question: "How does the progress monitoring feature work?",
answer: "The progress monitoring feature provides detailed statistics on your problem-solving journey, including the number of problems solved by difficulty, topic, and monthly trends. It also shows your streaks and acceptance rates to keep you motivated."
},
{
question: "Is my data secure on Leetcode Journal?",
answer: "We take data security seriously. All your solutions and progress data are encrypted and securely stored on our servers. You have complete control over your data, and it is never shared without your consent."
},
{
question: "Can I share my Leetcode Journal with others?",
answer: "Yes, you can create a shareable portfolio of your solutions to showcase your problem-solving skills to potential employers or peers. You can customize what information is shared."
},
{
question: "Does Leetcode Journal support team collaboration?",
answer: "Currently, Leetcode Journal is focused on individual users. However, we are exploring features for team collaboration and knowledge sharing in future updates."
}
]

export default function FAQComponent() {
const [searchTerm, setSearchTerm] = useState('')

const filteredFaqs = faqs.filter(faq =>
faq.question.toLowerCase().includes(searchTerm.toLowerCase()) ||
faq.answer.toLowerCase().includes(searchTerm.toLowerCase())
)

return (
<div className="max-w-3xl mx-auto">
<div className="mb-8 relative">
<Input
type="text"
placeholder="Search FAQs..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full pl-10 pr-4 py-2 rounded-full border-2 border-purple-300 focus:border-purple-500 focus:ring focus:ring-purple-200 focus:ring-opacity-50 transition duration-300"
/>
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-purple-400" size={20} />
</div>
<Accordion type="single" collapsible className="w-full space-y-4">
{filteredFaqs.map((faq, index) => (
<AccordionItem
value={`item-${index}`}
key={index}
className="border-2 border-purple-400 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition duration-300"
>
<AccordionTrigger className="text-left px-6 py-4 light:bg-purple-200 dark:bg-white hover:bg-purple-50 transition duration-300">
<span className="text-lg font-medium text-purple-800">{faq.question}</span>
</AccordionTrigger>
<AccordionContent className="px-6 py-4 bg-purple-200">
<p className="text-purple-700 text-left">
{faq.answer}
</p>
</AccordionContent>
</AccordionItem>
))}
</Accordion>
{filteredFaqs.length === 0 && (
<div className="text-center text-purple-600 mt-8 p-6 bg-purple-100 rounded-lg">
<p className="text-xl font-semibold mb-2">No matching questions found.</p>
<p>Try adjusting your search terms or browse all FAQs above.</p>
</div>
)}
</div>
)
}
15 changes: 15 additions & 0 deletions app/FAQ/component/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default function FAQLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<div className="min-h-screen bg-gradient-to-br from-purple-100 via-purple-50 to-white">
<main className="pt-16 pb-20">
{children}
</main>
</div>
)
}


183 changes: 183 additions & 0 deletions app/FAQ/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
import { Metadata } from 'next'
import FAQComponent from './component/faq-component'
import ContactSection from './component/contact-section'
import Navbar1 from '@/components/navbar'
import { Github, BookOpen } from 'lucide-react'
import {Button} from '@/components/ui/button'
import { SocialLinks } from '@/components/SocialLinks'
import Link from 'next/link'

export const metadata: Metadata = {
title: 'FAQ - Your Company Name',
description: 'Frequently Asked Questions about our products and services',
}

export default function FAQPage() {
return (
<div className="min-h-screen space-y-12">
<Navbar1 />
<div className="text-center mb-12">
<div className="text-center mb-12">
<h1 className="text-4xl font-bold mb-4 text-purple-500" >Frequently Asked Questions</h1>
<p className="text-xl text-purple-600">Find answers to common questions about our products and services</p>
</div>
<FAQComponent />
<div className="rounded-lg text-center w-[50%] mx-auto">
<ContactSection />
</div>
</div>
<footer className="w-full py-12 px-4 md:px-6 border-t bg-secondary">
<div className="container mx-auto">
<div className="flex flex-col md:flex-row justify-between items-center mb-8">
<div className="flex items-center space-x-4 mb-4 md:mb-0">
<BookOpen className="h-6 w-6 text-primary" />
<span className="font-bold text-lg">LeetCode Journal</span>
</div>
<div className="flex items-center space-x-4 -ml-2">
<Button
variant="outline"
size="sm"
className="hidden md:flex"
asChild
>
<a
href="https://github.com/yashksaini-coder/leetcode-journal"
target="_blank"
rel="noopener noreferrer"
>
<Github className="mr-2 h-4 w-4" />
Star on GitHub
</a>
</Button>
<SocialLinks />
</div>
</div>
<div className="grid grid-cols-2 md:grid-cols-4 gap-8 mb-8">
<div>
<h3 className="font-semibold mb-3 text-lg">Product</h3>
<ul className="space-y-2">
<li>
<Link
href="#features"
className="text-sm hover:text-primary transition-colors"
>
Features
</Link>
</li>
<li>
<Link
href="#pricing"
className="text-sm hover:text-primary transition-colors"
>
Pricing
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
FAQ
</Link>
</li>
</ul>
</div>
<div>
<h3 className="font-semibold mb-3 text-lg">Company</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
About
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Blog
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Careers
</Link>
</li>
</ul>
</div>
<div>
<h3 className="font-semibold mb-3 text-lg">Resources</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Documentation
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Community
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Support
</Link>
</li>
</ul>
</div>
<div>
<h3 className="font-semibold mb-3 text-lg">Legal</h3>
<ul className="space-y-2">
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Privacy Policy
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Terms of Service
</Link>
</li>
<li>
<Link
href="#"
className="text-sm hover:text-primary transition-colors"
>
Cookie Policy
</Link>
</li>
</ul>
</div>
</div>
<div className="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border">
<p className="text-sm text-muted-foreground mb-4 md:mb-0">
© 2023 LeetCode Journal. All rights reserved.
</p>
</div>
</div>
</footer>
</div>
)
}

22 changes: 4 additions & 18 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,16 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNext,
CarouselPrevious,
} from "@/components/ui/carousel";
import { ThemeToggle } from "@/components/theme-toggle";
import { BookOpen, CheckCircle, Github } from "lucide-react";
import { SocialLinks } from "@/components/socials";
import { BookOpen, Github } from "lucide-react";
import { SocialLinks } from "@/components/SocialLinks";
import { Highlight } from "@/components/ui/hero-hihglight";
import Navbar from "@/components/header";
import PricingCard from "@/components/LandingComponents/PriceCard";
import Navbar1 from "@/components/navbar";

export default function LandingPage() {
return (
<div className="flex flex-col min-h-screen bg-background">
<Navbar />
<Navbar1 />
<main className="flex-1">
<section className="w-full py-12 md:py-24 lg:py-32 bg-secondary overflow-hidden">
<div className="container mx-auto px-4 md:px-6 relative z-10">
Expand Down
File renamed without changes.
Loading
Loading