Skip to content

Commit 1a921d9

Browse files
authored
feat: add FAQ section to landing page (#104)
Adding FAQ section contributed by @abhishek0wb
1 parent 4f95e78 commit 1a921d9

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

apps/web/src/app/(main)/(landing)/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Navbar from '@/components/landing-sections/navbar'
99
import Testimonials from '@/components/landing-sections/testimonials'
1010
import Video from '@/components/landing-sections/video'
1111
import React from 'react'
12+
import { FaqSection } from '@/components/faq/FaqSection'
1213

1314

1415
const Landing = () => {
@@ -20,6 +21,7 @@ const Landing = () => {
2021
<Bento />
2122
<Video />
2223
<HowItWorks />
24+
<FaqSection />
2325
<Brands />
2426
<Testimonials />
2527
</div>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
Accordion,
3+
AccordionContent,
4+
AccordionItem,
5+
AccordionTrigger,
6+
} from "@/components/ui/accordion";
7+
import Header from "../ui/header";
8+
import { faqs } from "./faqData";
9+
10+
export function FaqSection() {
11+
return (
12+
<div className="flex flex-col border-b border-[#252525]">
13+
<Header title="Frequently Asked Questions" />
14+
<div className="w-full px-[30px] lg:px-[50px] py-8 lg:py-12 relative">
15+
<div
16+
style={{
17+
height: "100%",
18+
"--pattern-fg": "#252525",
19+
borderRight: "1px solid #252525",
20+
backgroundImage:
21+
"repeating-linear-gradient(315deg, #252525 0, #252525 1px, transparent 0, transparent 50%)",
22+
backgroundSize: "10px 10px",
23+
backgroundAttachment: "fixed",
24+
} as React.CSSProperties}
25+
className="w-[30px] lg:w-[50px] absolute left-0 top-0"
26+
/>
27+
28+
<div
29+
style={{
30+
height: "100%",
31+
"--pattern-fg": "#252525",
32+
borderLeft: "1px solid #252525",
33+
backgroundImage:
34+
"repeating-linear-gradient(315deg, #252525 0, #252525 1px, transparent 0, transparent 50%)",
35+
backgroundSize: "10px 10px",
36+
backgroundAttachment: "fixed",
37+
} as React.CSSProperties}
38+
className="w-[30px] lg:w-[50px] absolute right-0 top-0"
39+
/>
40+
41+
<div className="max-w-4xl mx-auto">
42+
<Accordion type="single" collapsible className="w-full space-y-4">
43+
{faqs.map((faq, index) => (
44+
<AccordionItem
45+
value={`item-${index}`}
46+
key={index}
47+
className="border border-[#252525] rounded-lg bg-[#151515]/20 backdrop-blur-xl overflow-hidden"
48+
>
49+
<AccordionTrigger className="px-6 py-4 text-left text-base lg:text-lg font-medium hover:bg-[#252525]/30 transition-colors [&[data-state=open]]:bg-[#252525]/50">
50+
{faq.question}
51+
</AccordionTrigger>
52+
<AccordionContent className="px-6 pb-4 text-[#d1d1d1] text-sm lg:text-base leading-relaxed">
53+
{faq.answer}
54+
</AccordionContent>
55+
</AccordionItem>
56+
))}
57+
</Accordion>
58+
</div>
59+
</div>
60+
</div>
61+
);
62+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export interface FAQ {
2+
question: string;
3+
answer: string;
4+
}
5+
6+
export const faqs: FAQ[] = [
7+
{
8+
question: "What is OpenSox?",
9+
answer:
10+
"OpenSox is a platform to help developers find and contribute to open-source projects that match their skills and interests.",
11+
},
12+
{
13+
question: "How can I find a project to contribute to?",
14+
answer:
15+
"You can browse the list of projects on our main page. We provide filters to help you narrow down the projects based on language, popularity, and activity.",
16+
},
17+
{
18+
question: "Is OpenSox free to use?",
19+
answer: "Yes, OpenSox is completely free for both developers and project maintainers.",
20+
},
21+
{
22+
question: "How are projects ranked?",
23+
answer:
24+
"Projects are ranked based on a combination of factors including recent activity, number of open issues, and community engagement.",
25+
},
26+
{
27+
question: "How do I get started contributing?",
28+
answer:
29+
"Simply create an account, set your preferences, and start browsing projects. Our platform will help match you with projects that fit your skill level.",
30+
},
31+
{
32+
question: "Can I suggest new features?",
33+
answer:
34+
"Absolutely! We welcome feedback and feature suggestions. You can reach out to us through our contact form or GitHub repository.",
35+
},
36+
];

0 commit comments

Comments
 (0)