Skip to content

Commit fe42d44

Browse files
added faq page
updated navbar added footer added contact sectiom Signed-off-by: JAYANTJOSHI001 <jayantjoshi909@gmail.com>
1 parent 4337cb1 commit fe42d44

File tree

9 files changed

+380
-152
lines changed

9 files changed

+380
-152
lines changed

app/FAQ/component/contact-section.tsx

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Button } from "@/components/ui/button"
2+
import { Mail, Phone } from 'lucide-react'
3+
4+
export default function ContactSection() {
5+
return (
6+
<div className="mt-16 bg-purple-100 rounded-lg p-8 text-center">
7+
<h2 className="text-2xl font-bold text-purple-800 mb-4">Still have questions?</h2>
8+
<p className="text-purple-600 mb-6">Our support team is here to help you</p>
9+
<div className="flex justify-center space-x-4">
10+
<Button
11+
variant="outline"
12+
className="flex items-center space-x-2 bg-white hover:bg-purple-300 text-black hover:text-black"
13+
>
14+
<Mail size={20} />
15+
<span>Email Us</span>
16+
</Button>
17+
<Button
18+
variant="outline"
19+
className="flex items-center space-x-2 bg-white hover:bg-purple-300 text-black hover:text-black"
20+
>
21+
<Phone size={20} />
22+
<span>Call Us</span>
23+
</Button>
24+
</div>
25+
</div>
26+
)
27+
}
28+

app/FAQ/component/faq-component.tsx

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
'use client'
2+
3+
import { useState } from 'react'
4+
import { Input } from "@/components/ui/input"
5+
import {
6+
Accordion,
7+
AccordionContent,
8+
AccordionItem,
9+
AccordionTrigger,
10+
} from "@/components/ui/accordion"
11+
import { Search } from 'lucide-react'
12+
13+
const faqs = [
14+
{
15+
question: "What is Leetcode Journal, and how can it help me?",
16+
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."
17+
},
18+
{
19+
question: "Can I import my existing Leetcode solutions into the platform?",
20+
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."
21+
},
22+
{
23+
question: "How does the progress monitoring feature work?",
24+
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."
25+
},
26+
{
27+
question: "Is my data secure on Leetcode Journal?",
28+
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."
29+
},
30+
{
31+
question: "Can I share my Leetcode Journal with others?",
32+
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."
33+
},
34+
{
35+
question: "Does Leetcode Journal support team collaboration?",
36+
answer: "Currently, Leetcode Journal is focused on individual users. However, we are exploring features for team collaboration and knowledge sharing in future updates."
37+
}
38+
]
39+
40+
export default function FAQComponent() {
41+
const [searchTerm, setSearchTerm] = useState('')
42+
43+
const filteredFaqs = faqs.filter(faq =>
44+
faq.question.toLowerCase().includes(searchTerm.toLowerCase()) ||
45+
faq.answer.toLowerCase().includes(searchTerm.toLowerCase())
46+
)
47+
48+
return (
49+
<div className="max-w-3xl mx-auto">
50+
<div className="mb-8 relative">
51+
<Input
52+
type="text"
53+
placeholder="Search FAQs..."
54+
value={searchTerm}
55+
onChange={(e) => setSearchTerm(e.target.value)}
56+
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"
57+
/>
58+
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-purple-400" size={20} />
59+
</div>
60+
<Accordion type="single" collapsible className="w-full space-y-4">
61+
{filteredFaqs.map((faq, index) => (
62+
<AccordionItem
63+
value={`item-${index}`}
64+
key={index}
65+
className="border-2 border-purple-400 rounded-lg overflow-hidden shadow-sm hover:shadow-md transition duration-300"
66+
>
67+
<AccordionTrigger className="text-left px-6 py-4 light:bg-purple-200 dark:bg-white hover:bg-purple-50 transition duration-300">
68+
<span className="text-lg font-medium text-purple-800">{faq.question}</span>
69+
</AccordionTrigger>
70+
<AccordionContent className="px-6 py-4 bg-purple-200">
71+
<p className="text-purple-700 text-left">
72+
{faq.answer}
73+
</p>
74+
</AccordionContent>
75+
</AccordionItem>
76+
))}
77+
</Accordion>
78+
{filteredFaqs.length === 0 && (
79+
<div className="text-center text-purple-600 mt-8 p-6 bg-purple-100 rounded-lg">
80+
<p className="text-xl font-semibold mb-2">No matching questions found.</p>
81+
<p>Try adjusting your search terms or browse all FAQs above.</p>
82+
</div>
83+
)}
84+
</div>
85+
)
86+
}

app/FAQ/component/layout.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default function FAQLayout({
2+
children,
3+
}: {
4+
children: React.ReactNode
5+
}) {
6+
return (
7+
<div className="min-h-screen bg-gradient-to-br from-purple-100 via-purple-50 to-white">
8+
<main className="pt-16 pb-20">
9+
{children}
10+
</main>
11+
</div>
12+
)
13+
}
14+
15+

app/FAQ/page.tsx

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { Metadata } from 'next'
2+
import FAQComponent from './component/faq-component'
3+
import ContactSection from './component/contact-section'
4+
import Navbar from '@/components/header'
5+
import Navbar1 from '@/components/navbar'
6+
import Footer from '@/components/footer'
7+
8+
export const metadata: Metadata = {
9+
title: 'FAQ - Your Company Name',
10+
description: 'Frequently Asked Questions about our products and services',
11+
}
12+
13+
export default function FAQPage() {
14+
return (
15+
<div className="min-h-screen space-y-12">
16+
<Navbar1 />
17+
<div className="text-center mb-12">
18+
<div className="text-center mb-12">
19+
<h1 className="text-4xl font-bold mb-4 text-purple-500" >Frequently Asked Questions</h1>
20+
<p className="text-xl text-purple-600">Find answers to common questions about our products and services</p>
21+
</div>
22+
<FAQComponent />
23+
<ContactSection />
24+
</div>
25+
<Footer />
26+
</div>
27+
)
28+
}
29+

app/page.tsx

+3-152
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ import {
2424
} from "@/components/ui/carousel";
2525
import { ThemeToggle } from "@/components/theme-toggle";
2626
import { BookOpen, CheckCircle, Github } from "lucide-react";
27-
import { SocialLinks } from "@/components/socials";
27+
import { SocialLinks } from "@/components/SocialLinks";
2828
import { Highlight } from "@/components/ui/hero-hihglight";
2929
import Navbar from "@/components/header";
3030
import PricingCard from "@/components/LandingComponents/PriceCard";
31+
import Footer from "@/components/footer";
3132

3233
export default function LandingPage() {
3334
return (
@@ -236,157 +237,7 @@ export default function LandingPage() {
236237
</div>
237238
</section>
238239
</main>
239-
<footer className="w-full py-12 px-4 md:px-6 border-t bg-secondary">
240-
<div className="container mx-auto">
241-
<div className="flex flex-col md:flex-row justify-between items-center mb-8">
242-
<div className="flex items-center space-x-4 mb-4 md:mb-0">
243-
<BookOpen className="h-6 w-6 text-primary" />
244-
<span className="font-bold text-lg">LeetCode Journal</span>
245-
</div>
246-
<div className="flex items-center space-x-4 -ml-2">
247-
<Button
248-
variant="outline"
249-
size="sm"
250-
className="hidden md:flex"
251-
asChild
252-
>
253-
<a
254-
href="https://github.com/yashksaini-coder/leetcode-journal"
255-
target="_blank"
256-
rel="noopener noreferrer"
257-
>
258-
<Github className="mr-2 h-4 w-4" />
259-
Star on GitHub
260-
</a>
261-
</Button>
262-
<SocialLinks />
263-
</div>
264-
</div>
265-
<div className="grid grid-cols-2 md:grid-cols-4 gap-8 mb-8">
266-
<div>
267-
<h3 className="font-semibold mb-3 text-lg">Product</h3>
268-
<ul className="space-y-2">
269-
<li>
270-
<Link
271-
href="#features"
272-
className="text-sm hover:text-primary transition-colors"
273-
>
274-
Features
275-
</Link>
276-
</li>
277-
<li>
278-
<Link
279-
href="#pricing"
280-
className="text-sm hover:text-primary transition-colors"
281-
>
282-
Pricing
283-
</Link>
284-
</li>
285-
<li>
286-
<Link
287-
href="#"
288-
className="text-sm hover:text-primary transition-colors"
289-
>
290-
FAQ
291-
</Link>
292-
</li>
293-
</ul>
294-
</div>
295-
<div>
296-
<h3 className="font-semibold mb-3 text-lg">Company</h3>
297-
<ul className="space-y-2">
298-
<li>
299-
<Link
300-
href="#"
301-
className="text-sm hover:text-primary transition-colors"
302-
>
303-
About
304-
</Link>
305-
</li>
306-
<li>
307-
<Link
308-
href="#"
309-
className="text-sm hover:text-primary transition-colors"
310-
>
311-
Blog
312-
</Link>
313-
</li>
314-
<li>
315-
<Link
316-
href="#"
317-
className="text-sm hover:text-primary transition-colors"
318-
>
319-
Careers
320-
</Link>
321-
</li>
322-
</ul>
323-
</div>
324-
<div>
325-
<h3 className="font-semibold mb-3 text-lg">Resources</h3>
326-
<ul className="space-y-2">
327-
<li>
328-
<Link
329-
href="#"
330-
className="text-sm hover:text-primary transition-colors"
331-
>
332-
Documentation
333-
</Link>
334-
</li>
335-
<li>
336-
<Link
337-
href="#"
338-
className="text-sm hover:text-primary transition-colors"
339-
>
340-
Community
341-
</Link>
342-
</li>
343-
<li>
344-
<Link
345-
href="#"
346-
className="text-sm hover:text-primary transition-colors"
347-
>
348-
Support
349-
</Link>
350-
</li>
351-
</ul>
352-
</div>
353-
<div>
354-
<h3 className="font-semibold mb-3 text-lg">Legal</h3>
355-
<ul className="space-y-2">
356-
<li>
357-
<Link
358-
href="#"
359-
className="text-sm hover:text-primary transition-colors"
360-
>
361-
Privacy Policy
362-
</Link>
363-
</li>
364-
<li>
365-
<Link
366-
href="#"
367-
className="text-sm hover:text-primary transition-colors"
368-
>
369-
Terms of Service
370-
</Link>
371-
</li>
372-
<li>
373-
<Link
374-
href="#"
375-
className="text-sm hover:text-primary transition-colors"
376-
>
377-
Cookie Policy
378-
</Link>
379-
</li>
380-
</ul>
381-
</div>
382-
</div>
383-
<div className="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border">
384-
<p className="text-sm text-muted-foreground mb-4 md:mb-0">
385-
© 2023 LeetCode Journal. All rights reserved.
386-
</p>
387-
</div>
388-
</div>
389-
</footer>
240+
<Footer />
390241
</div>
391242
);
392243
}
File renamed without changes.

0 commit comments

Comments
 (0)