diff --git a/client/src/component/FAQ.css b/client/src/component/FAQ.css deleted file mode 100644 index 138eee9..0000000 --- a/client/src/component/FAQ.css +++ /dev/null @@ -1,73 +0,0 @@ -/* component/FAQ.css */ - -.faq-container { - margin-top: 100px; - margin-bottom: 40px; - padding: 20px; - border-radius: 25px; - border: 2px solid #ccc; - background-color: #f9f9f9; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); - } - - h1 { - text-align: center; - margin-bottom: 20px; - font-family: 'Arial', sans-serif; - color: #333; - font-size: 24px; /* Decreased size */ - } - - .faq-item { - position: relative; - margin-bottom: 15px; - padding: 10px; - border: 2px solid #ddd; - border-radius: 20px; - background-color: #fff; - transition: background-color 0.3s, box-shadow 0.3s; - } - - .faq-item:hover { - background-color: #157aac; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); - } - - .faq-question { - font-size: 18px; - color: #333; - cursor: pointer; - margin: 0; - transition: color 0.3s; - } - - .faq-question:hover { - color: #e9e0e0; /* Change color on hover */ - } - - .faq-answer { - font-size: 16px; - color: #ffffff; - margin-top: 10px; - cursor: pointer; - padding: 5px 0; - transition: max-height 0.3s ease, opacity 0.3s ease; - display: flex; /* Use flexbox */ - align-items: center; /* Center vertically */ - justify-content: center; /* Center horizontally */ - height: 40px; /* Set a height to create a consistent layout */ - left: 20px; /* Maintain your left positioning */ - } - - - .num { - position: absolute; - top: 10px; /* Adjusted positioning */ - left: -25px; /* Position for the number bubble */ - border-radius: 50%; - background-color: #0fa2eb; - color: white; - padding: 5px 10px; - font-weight: bold; - } - \ No newline at end of file diff --git a/client/src/component/Faq.jsx b/client/src/component/Faq.jsx index 2797bb9..1053720 100644 --- a/client/src/component/Faq.jsx +++ b/client/src/component/Faq.jsx @@ -1,91 +1,162 @@ import React, { useState } from 'react'; -import '../css/Faq.css'; +import { FaGithub, FaLinkedin, FaXTwitter, FaYoutube } from 'react-icons/fa6'; -const FAQ = () => { - const [openIndex, setOpenIndex] = useState(null); - const [visibleCount, setVisibleCount] = useState(5); // Initially show 5 FAQs +// Sample FAQ data array +const faqData = [ + { + question: "What is BitBox?", + answer: "BitBox is a user-friendly platform that simplifies version control and collaboration for developers.", + }, + { + question: "How does BitBox enhance collaboration?", + answer: "BitBox offers intuitive tools that enable both solo programmers and large teams to manage projects efficiently.", + }, + { + question: "How do I get started with BitBox?", + answer: "You can sign up for an account on BitBox and start managing your projects right away.", + }, + { + question: "Is BitBox compatible with modern development workflows?", + answer: "Yes, BitBox seamlessly integrates with modern development workflows, providing fast and reliable performance.", + }, + { + question: "How can I contact support if I need help?", + answer: "You can reach out to support through the 'Contact Us' page or by emailing support@example.com.", + }, + { + question: "What programming languages does BitBox support?", + answer: "BitBox supports a wide range of programming languages including Python, Java, JavaScript, and more.", + }, + { + question: "Are there any tutorials available for BitBox?", + answer: "Yes, we offer comprehensive tutorials and documentation to help users get the most out of BitBox.", + }, + { + question: "Can I use BitBox for open-source projects?", + answer: "Absolutely! BitBox is designed to support both open-source and private projects.", + }, + { + question: "What are the system requirements for using BitBox?", + answer: "BitBox is a web-based platform, so you only need a modern web browser and an internet connection.", + }, + { + question: "Is there a mobile app for BitBox?", + answer: "Currently, BitBox does not have a dedicated mobile app, but the platform is mobile-friendly and accessible via web browsers.", + }, +]; +function FAQ(props) { + const [activeIndex, setActiveIndex] = useState(null); + const [visibleCount, setVisibleCount] = useState(5); - const toggleAnswer = (index) => { - setOpenIndex(openIndex === index ? null : index); + const toggleFAQ = (index) => { + setActiveIndex(activeIndex === index ? null : index); }; const loadMoreFAQs = () => { - setVisibleCount((prevCount) => prevCount + 2); // Load 2 more FAQs + setVisibleCount((prevCount) => prevCount + 2); }; - const faqs = [ - { - question: "What is BitBox?", - answer: "BitBox is a user-friendly platform that simplifies version control and collaboration for developers.", - }, - { - question: "How does BitBox enhance collaboration?", - answer: "BitBox offers intuitive tools that enable both solo programmers and large teams to manage projects efficiently.", - }, - { - question: "How do I get started with BitBox?", - answer: "You can sign up for an account on BitBox and start managing your projects right away.", - }, - { - question: "Is BitBox compatible with modern development workflows?", - answer: "Yes, BitBox seamlessly integrates with modern development workflows, providing fast and reliable performance.", - }, - { - question: "How can I contact support if I need help?", - answer: "You can reach out to support through the 'Contact Us' page or by emailing support@example.com.", - }, - { - question: "What programming languages does BitBox support?", - answer: "BitBox supports a wide range of programming languages including Python, Java, JavaScript, and more.", - }, - { - question: "Are there any tutorials available for BitBox?", - answer: "Yes, we offer comprehensive tutorials and documentation to help users get the most out of BitBox.", - }, - { - question: "Can I use BitBox for open-source projects?", - answer: "Absolutely! BitBox is designed to support both open-source and private projects.", - }, - { - question: "What are the system requirements for using BitBox?", - answer: "BitBox is a web-based platform, so you only need a modern web browser and an internet connection.", - }, - { - question: "Is there a mobile app for BitBox?", - answer: "Currently, BitBox does not have a dedicated mobile app, but the platform is mobile-friendly and accessible via web browsers.", - }, - ]; + // Dynamic styles based on mode + const bgClass = props.mode === 'dark' ? 'bg-black' : 'bg-gray-100'; + const textPrimary = props.mode === 'dark' ? 'text-gray-200' : 'text-gray-800'; + const textSecondary = props.mode === 'dark' ? 'text-gray-400' : 'text-gray-600'; + const borderClass = props.mode === 'dark' ? 'border-gray-600' : 'border-gray-300'; + const buttonBg = props.mode === 'dark' ? 'bg-blue-600' : 'bg-blue-900'; + const buttonHover = props.mode === 'dark' ? 'bg-blue-500' : 'bg-blue-800'; return ( -
-

Frequently Asked Questions

-
- {faqs.slice(0, visibleCount).map((faq, index) => ( -
-

toggleAnswer(index)} - aria-expanded={openIndex === index} - aria-controls={`faq-answer-${index}`} - tabIndex="0" - > - {faq.question} -

- {openIndex === index && ( -

- {faq.answer} +

+
+ {/* Header Section */} +
+
+
+

FAQs

+

+ Have questions? Here you’ll find the answers most valued by our partners, + along with access to step-by-step instructions and support.

+
+
+
+ FAQ illustration +
+
+ + {/* FAQ List */} +
+ {/* Sidebar Links */} +
+

+ BITBOX +

+

+ Empowering Developers,
+ Where Projects Find Solutions Together +

+
+ {/* Social media icons with links */} + + + + + + + + + + + + +
+
+ + {/* FAQ Section */} +
+

About us

+
+ {faqData.slice(0, visibleCount).map((faq, index) => ( +
+ + {activeIndex === index && ( +
+ {faq.answer} +
+ )} +
+ ))} +
+ {visibleCount < faqData.length && ( + )}
- ))} +
- {visibleCount < faqs.length && ( - - )}
); -}; +} -export default FAQ; +export default FAQ; \ No newline at end of file