11import React , { useState } from "react" ;
22import Layout from "@theme/Layout" ;
3+ import styles from "./index.module.css" ; // Created a Modular CSS file
34
45interface SectionProps {
56 id : string ;
@@ -8,17 +9,47 @@ interface SectionProps {
89}
910
1011const Section : React . FC < SectionProps > = ( { id, title, children } ) => {
11- const [ open , setOpen ] = useState ( true ) ;
12+ const [ open , setOpen ] = useState ( id === "acceptance" ) ;
13+
14+ // Helper to dynamically build class names
15+ const getButtonClasses = ( ) =>
16+ `${ styles . sectionButton } ${ open ? styles . open : "" } ` ;
17+
18+ const getContentClasses = ( ) =>
19+ `${ styles . sectionContent } ${ open ? styles . open : "" } ` ;
20+
1221 return (
13- < div id = { id } className = "mb-6 border-b border-gray-200 pb-4" >
22+ < div id = { id } className = { styles . section } >
1423 < button
15- className = "w-full text-left text-xl font-bold mb-2 flex justify-between items-center"
24+ className = { getButtonClasses ( ) }
1625 onClick = { ( ) => setOpen ( ! open ) }
26+ aria-expanded = { open }
1727 >
18- { title }
19- < span className = "text-gray-500" > { open ? "▲" : "▼" } </ span >
28+ { /* The title is now wrapped in a span to allow styling */ }
29+ < span className = { styles . sectionTitle } > { title } </ span >
30+
31+ { /* New Icon Container */ }
32+ < div className = { styles . iconContainer } >
33+ < span
34+ className = { `${ styles . icon } ${ styles . iconPlus } ${
35+ ! open ? styles . iconVisible : ""
36+ } `}
37+ >
38+ +
39+ </ span >
40+ < span
41+ className = { `${ styles . icon } ${ styles . iconMinus } ${
42+ open ? styles . iconVisible : ""
43+ } `}
44+ >
45+ −
46+ </ span >
47+ </ div >
2048 </ button >
21- { open && < div className = "pl-2 text-justify" > { children } </ div > }
49+
50+ < div className = { getContentClasses ( ) } >
51+ < div className = { styles . contentInner } > { children } </ div >
52+ </ div >
2253 </ div >
2354 ) ;
2455} ;
@@ -28,58 +59,67 @@ const TermsOfService: React.FC = () => {
2859 < Layout
2960 title = "Terms and Conditions of RecodeHive"
3061 description = "Terms of Service Page for RecodeHive learners and users"
62+ wrapperClassName = { styles . pageWrapper }
3163 >
32- < div className = "mx-auto mt-8 mb-8 max-w-3xl rounded-lg p-6 font-sans text-base leading-relaxed shadow-lg bg-white dark:bg-gray-100" >
33- < h1 className = "mb-6 text-center text-3xl font-bold" > Terms of Service</ h1 >
34- < p className = "mb-6" >
35- Welcome to < b > RecodeHive</ b > , operated by < strong > Sanjay Viswanathan</ strong > .
36- These Terms of Service govern your use of www.recodehive.com. Please read
37- carefully. If you have any questions, contact us at{ " " }
38- < a href = "mailto:[email protected] " className = "text-blue-600 underline" > 64+ < div className = { styles . pageContainer } >
65+ < h1 className = { styles . mainTitle } > Terms of Service</ h1 >
66+ < p className = { styles . introText } >
67+ Welcome to < b > RecodeHive</ b > , operated by{ " " }
68+ < strong > Sanjay Viswanathan</ strong > . These Terms of Service govern
69+ your use of www.recodehive.com. Please read carefully. If you have any
70+ questions, contact us at{ " " }
71+ < a href = "mailto:[email protected] " className = { styles . link } > 397240- </ a > .
73+ </ a >
74+ .
4175 </ p >
4276
77+ { /* Grammatical mistakes are corrected */ }
4378 < Section id = "acceptance" title = "Acceptance of Terms" >
4479 By accessing or using RecodeHive, you agree to comply with these Terms
4580 and any other guidelines provided by us. If you do not agree, please
4681 refrain from using the Service.
4782 </ Section >
4883
4984 < Section id = "use-of-service" title = "Use of the Service" >
50- < ol className = "list-decimal pl-6" >
51- < li className = "mb-4" >
52- < strong > Usage Instructions:</ strong > Do not use the website in any way
53- that could impair its performance, corrupt content, or reduce overall functionality.
85+ < ol className = { styles . list } >
86+ < li >
87+ < strong > Usage Instructions:</ strong > Do not use the website in any
88+ way that could impair its performance, corrupt content, or reduce
89+ overall functionality.
5490 </ li >
55- < li className = "mb-4" >
56- < strong > License:</ strong > We grant a limited, non-exclusive, non-transferable,
57- revocable license for personal or internal business use only. Commercial use
58- is prohibited without prior consent.
91+ < li >
92+ < strong > License:</ strong > We grant a limited, non-exclusive,
93+ non-transferable, revocable license for personal or internal
94+ business use only. Commercial use is prohibited without prior
95+ consent.
5996 </ li >
60- < li className = "mb-4" >
97+ < li >
6198 < strong > User Conduct:</ strong > Do not compromise website security,
62- attempt unauthorized access, or access sensitive information you are
63- not permitted to view.
99+ attempt unauthorized access, or access sensitive information you
100+ are not permitted to view.
64101 </ li >
65102 </ ol >
66103 </ Section >
67104
68105 < Section id = "content" title = "Content" >
69- < ol className = " list-decimal pl-6" >
70- < li className = "mb-4" >
106+ < ol className = { styles . list } >
107+ < li >
71108 < strong > User Content:</ strong > You retain ownership of content you
72- submit. By submitting, you grant RecodeHive a worldwide, royalty-free,
73- non-exclusive license to use, reproduce, modify, distribute, and display it.
109+ submit. By submitting, you grant RecodeHive a worldwide,
110+ royalty-free, non-exclusive license to use, reproduce, modify,
111+ distribute, and display it.
74112 </ li >
75- < li className = "mb-4" >
76- < strong > Intellectual Property:</ strong > All trademarks, logos, and other
77- intellectual property remain the property of Sanjay Viswanathan or its licensors.
78- Usage requires prior written consent.
113+ < li >
114+ < strong > Intellectual Property:</ strong > All trademarks, logos, and
115+ other intellectual property remain the property of Sanjay
116+ Viswanathan or its licensors. Usage requires prior written
117+ consent.
79118 </ li >
80- < li className = "mb-4" >
81- < strong > Compensation:</ strong > You are responsible for any claims, expenses,
82- or legal fees arising from violations of these Terms.
119+ < li >
120+ < strong > Indemnification:</ strong > You are responsible for any
121+ claims, expenses, or legal fees arising from violations of these
122+ Terms.
83123 </ li >
84124 </ ol >
85125 </ Section >
@@ -90,33 +130,36 @@ const TermsOfService: React.FC = () => {
90130 href = "/privacy-policy/"
91131 target = "_blank"
92132 rel = "noopener noreferrer"
93- className = "text-blue-600 underline"
133+ className = { styles . link }
94134 >
95135 Privacy Policy
96136 </ a > { " " }
97137 to understand how your personal information is collected and used.
98138 </ Section >
99139
100140 < Section id = "termination" title = "Termination" >
101- We reserve the right to suspend or terminate access to the Service at any time,
102- with or without cause, and without prior notice or liability.
141+ We reserve the right to suspend or terminate access to the Service at
142+ any time, with or without cause, and without prior notice or
143+ liability.
103144 </ Section >
104145
105146 < Section id = "governing-law" title = "Governing Law" >
106- These Terms are governed by the laws of India, without regard to conflicts of law.
147+ These Terms are governed by the laws of India, without regard to
148+ conflicts of law.
107149 </ Section >
108150
109151 < Section id = "changes-to-terms" title = "Changes to the Terms" >
110- RecodeHive may update or modify these Terms at any time. Continued use of the
111- Service constitutes acceptance of the updated Terms. Users are responsible for
112- reviewing changes regularly.
152+ RecodeHive may update or modify these Terms at any time. Continued use
153+ of the Service constitutes acceptance of the updated Terms. Users are
154+ responsible for reviewing changes regularly.
113155 </ Section >
114156
115157 < Section id = "contact" title = "Contact Us" >
116158 If you have any questions regarding these Terms, contact us at{ " " }
117- < a href = "mailto:[email protected] " className = "text-blue-600 underline" > 159+ < a href = "mailto:[email protected] " className = { styles . link } > 118160119- </ a > .
161+ </ a >
162+ .
120163 </ Section >
121164 </ div >
122165 </ Layout >
0 commit comments