Skip to content

Commit 6ace2b5

Browse files
committed
Adding FAQs section
1 parent 0e93cf4 commit 6ace2b5

File tree

4 files changed

+122
-17
lines changed

4 files changed

+122
-17
lines changed

public/assets/Images/faq.png

479 KB
Loading

src/constants/Stats.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import mentorsTeaching from '/assets/Stats/MentorsHelping.svg';
77
import apostrophie from '/assets/Stats/quote-icon.svg';
88
import leftHeart from '/assets/Stats/HeartLeft.svg';
99
import rightHeart from '/assets/Stats/HeartRight.svg';
10+
import faq from '/assets/Images/faq.png';
1011

1112
export const stats = {
1213
kidlaptop,
@@ -18,6 +19,7 @@ export const stats = {
1819
apostrophie,
1920
leftHeart,
2021
rightHeart,
22+
faq,
2123
};
2224

2325
export const statisticsData = [

src/constants/aboutUs/faqs.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const faqs = [
2+
{
3+
question: 'What is Sugar Labs?',
4+
answer:
5+
'Sugar Labs, a 501(c)(3) non-profit foundation, serves as a support base and gathering place for the community of educators and software developers who want to extend the Sugar platform and who have been creating Sugar-compatible applications.',
6+
},
7+
{
8+
question: 'What is the mission of Sugar Labs?',
9+
answer:
10+
'The overarching mission of Sugar Labs is to support the Sugar platform through software development, and community outreach and support. The purpose of the Sugar platform is provide a software and content environment that enhances learning.',
11+
},
12+
{
13+
question: 'What are the principles that guide Sugar Labs?',
14+
answer:
15+
'Sugar Labs subscribes to principle that learning thrives within a culture of freedom of expression, hence it has a natural affinity with the free software movement.',
16+
},
17+
{
18+
question:
19+
'What makes Sugar different from other educational software platforms?',
20+
answer:
21+
'The Sugar interface, in its departure from the desktop metaphor for computing, is the first serious attempt to create a user interface that is based on both cognitive and social constructivism.',
22+
},
23+
{
24+
question: 'Who can use Sugar and how do they benefit?',
25+
answer:
26+
'Sugar is a free software project, freely available to anyone who wants to use it or improve upon it. The Sugar platform was designed for young children (K–6), but it is finding applicability in a number of different venues.',
27+
},
28+
{
29+
question: 'Are there any platforms where Sugar runs on?',
30+
answer:
31+
'The Sugar Learning Platform is a leading learning platform that began in the famous One Laptop Per Child project. It is used every day by nearly 3 million children around the world.',
32+
},
33+
];
34+
35+
export default faqs;

src/pages/About/FAQs.tsx

Lines changed: 85 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,96 @@
11
import Header from '@/sections/Header';
22
import Footer from '@/sections/Footer';
3+
import { useState } from 'react';
4+
import { stats } from '@/constants/Stats';
5+
import faqs from '@/constants/aboutUs/faqs.ts';
36

47
const FAQs = () => {
8+
const [openIndex, setOpenIndex] = useState<number | null>(null);
9+
10+
const toggleFAQ = (index: number) => {
11+
setOpenIndex(openIndex === index ? null : index);
12+
};
13+
514
return (
6-
<div>
15+
<div className="min-h-screen bg-white text-gray-900">
716
<Header />
817
<main className="container mx-auto p-4">
9-
<h1 className="text-4xl font-bold text-center my-8">FAQs</h1>
10-
<div className="mt-6 space-y-4">
11-
<div className="bg-gray-100 p-4 rounded-lg">
12-
<h2 className="text-xl font-semibold">What is SugarLabs?</h2>
13-
<p className="mt-2 text-gray-700">
14-
SugarLabs is a non-profit organization that develops free and
15-
open-source educational software for children.
16-
</p>
17-
</div>
18-
<div className="bg-gray-100 p-4 rounded-lg">
19-
<h2 className="text-xl font-semibold">How can I get involved?</h2>
20-
<p className="mt-2 text-gray-700">
21-
You can join our community as a developer, volunteer, or donor.
22-
Visit the "Join Development" or "Volunteer" pages for more
23-
information.
24-
</p>
18+
{/* Top FAQs Section */}
19+
<section className="my-8 flex justify-center">
20+
<div className="max-w-4xl w-4/5 flex flex-col md:flex-row justify-between items-center">
21+
{/* Left Side - Text */}
22+
<div className="md:w-1/2 text-left md:pr-8">
23+
<h1 className="text-4xl font-bold">FAQs</h1>
24+
<p className="text-gray-600 mt-2 text-lg">
25+
Have questions? Here you’ll find the answers most valued by our
26+
partners, along with access to step-by-step instructions and
27+
support.
28+
</p>
29+
</div>
30+
31+
{/* Right Side - Enlarged Image */}
32+
<div className="md:w-1/2 flex justify-end">
33+
<img
34+
src={stats.faq}
35+
alt="FAQs Illustration"
36+
className="w-80 md:w-[400px] lg:w-[500px]"
37+
/>
38+
</div>
2539
</div>
40+
</section>
41+
42+
{/* FAQ Sections Container */}
43+
<div className="w-4/5 max-w-5xl mx-auto">
44+
{/* Quick Answers */}
45+
<section className="my-10">
46+
<h2 className="text-3xl font-bold mb-6">Quick Answers</h2>
47+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mt-6">
48+
{Array(6)
49+
.fill(0)
50+
.map((_, index) => (
51+
<div
52+
key={index}
53+
className="bg-white shadow-lg rounded-2xl p-6 flex flex-col items-center border border-gray-200"
54+
>
55+
<div className="w-12 h-12 bg-gray-100 flex items-center justify-center rounded-lg mb-4">
56+
<img
57+
src="/faq-icon.svg"
58+
alt="FAQ Icon"
59+
className="w-6 h-6"
60+
/>
61+
</div>
62+
<h3 className="font-semibold text-center">
63+
Is Music Blocks Free?
64+
</h3>
65+
<p className="text-gray-600 text-sm text-center mt-2">
66+
Yes! It is absolutely free to use, just visit the Music
67+
Blocks webpage to access it for free.
68+
</p>
69+
</div>
70+
))}
71+
</div>
72+
</section>
73+
74+
{/* General FAQs */}
75+
<section className="my-10">
76+
<h2 className="text-3xl font-bold mb-6">General FAQs</h2>
77+
<div className="bg-white shadow-lg rounded-lg p-6">
78+
{faqs.map((faq, index) => (
79+
<div key={index} className="border-b">
80+
<button
81+
className="w-full text-left py-4 text-lg font-medium flex justify-between items-center"
82+
onClick={() => toggleFAQ(index)}
83+
>
84+
{faq.question}
85+
<span>{openIndex === index ? '-' : '+'}</span>
86+
</button>
87+
{openIndex === index && (
88+
<p className="p-4 text-gray-700">{faq.answer}</p>
89+
)}
90+
</div>
91+
))}
92+
</div>
93+
</section>
2694
</div>
2795
</main>
2896
<Footer />

0 commit comments

Comments
 (0)