@@ -11,6 +11,7 @@ interface ContributionSection {
1111 icon : string ;
1212 description : string ;
1313 items : string [ ] ;
14+ details ?: string [ ] ;
1415 links : { text : string ; url : string ; } [ ] ;
1516 color : string ;
1617}
@@ -22,13 +23,18 @@ const contributionSections: ContributionSection[] = [
2223 icon : '💻' ,
2324 description : "If you're a developer, you can:" ,
2425 items : [
25- 'Write code 🧑💻' ,
26- 'Fix bugs 🐞' ,
27- 'Add new features 🚀'
26+ 'Access coding standards 🧑💻' ,
27+ 'Find debugging tips 🐞' ,
28+ 'Propose new features 🚀'
29+ ] ,
30+ details : [
31+ 'Access coding standards and setup instructions to streamline your work with the team\'s codebase.' ,
32+ 'Find tips for debugging, troubleshooting common errors, and submitting clear bug reports.' ,
33+ 'Read about how to propose new features, collaborate on pull requests, and review peer code.'
2834 ] ,
2935 links : [
3036 { text : 'GitHub' , url : 'https://github.com/recodehive' } ,
31- { text : 'GitLab' , url : 'https://gitlab.com' }
37+ { text : 'GitLab' , url : 'https://gitlab.com' }
3238 ] ,
3339 color : '#8b5cf6'
3440 } ,
@@ -39,9 +45,14 @@ const contributionSections: ContributionSection[] = [
3945 description : "If you're a writer or educator, you can:" ,
4046 items : [
4147 'Improve documentation 🖋️' ,
42- 'Write tutorials 📚' ,
48+ 'Structure tutorials 📚' ,
4349 'Translate content 🌍'
4450 ] ,
51+ details : [
52+ 'Explore detailed guides for improving existing documentation, including style and terminology tips.' ,
53+ 'Learn how to structure tutorials, add examples, and make learning resources more accessible.' ,
54+ 'See guidelines for translating technical content into different languages or for various backgrounds.'
55+ ] ,
4556 links : [
4657 { text : 'GitHub Docs' , url : 'https://www.recodehive.com/docs' }
4758 ] ,
@@ -53,13 +64,18 @@ const contributionSections: ContributionSection[] = [
5364 icon : '🤝' ,
5465 description : "If you're a community-minded person, you can:" ,
5566 items : [
56- 'Help answer questions' ,
57- 'Support new members 💬' ,
58- 'Share knowledge and insights'
67+ 'Connect with members 👥' ,
68+ 'Support newcomers 💬' ,
69+ 'Share resources 📝'
70+ ] ,
71+ details : [
72+ 'Connect with fellow members by joining active discussions in forums and chats.' ,
73+ 'Offer support to newcomers by guiding them through onboarding and answering beginner questions.' ,
74+ 'Share resources, tutorials, and best practices to help others grow.'
5975 ] ,
6076 links : [
61- { text : 'Discord' , url : 'https://discord.com/invite/w2V2aH6U' } ,
62- { text : 'Whatsapp' , url : 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' }
77+ { text : 'Discord' , url : 'https://discord.com/invite/w2V2aH6U' } ,
78+ { text : 'Whatsapp' , url : 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' }
6379 ] ,
6480 color : '#10b981'
6581 } ,
@@ -69,13 +85,18 @@ const contributionSections: ContributionSection[] = [
6985 icon : '🚀' ,
7086 description : 'To begin your journey with RecodeHive:' ,
7187 items : [
72- 'Join our community on Discord or Slack' ,
73- 'Explore our repositories on GitHub' ,
74- 'Pick a task or area you\'re excited about!'
88+ 'Sign up and introduce yourself 👋' ,
89+ 'Discover key repositories 🔍' ,
90+ 'Browse beginner tasks 📋'
91+ ] ,
92+ details : [
93+ 'Learn how to sign up and introduce yourself in the welcome channels on Discord or Slack.' ,
94+ 'Discover key open source repositories and find out how you can contribute, regardless of experience level.' ,
95+ 'Browse a list of beginner-friendly tasks and guides to help select your first area of involvement.'
7596 ] ,
7697 links : [
77- { text : 'Discord' , url : 'https://discord.com/invite/w2V2aH6U' } ,
78- { text : 'Whatsapp' , url : 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' } ,
98+ { text : 'Discord' , url : 'https://discord.com/invite/w2V2aH6U' } ,
99+ { text : 'Whatsapp' , url : 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' } ,
79100 { text : 'GitHub' , url : 'https://github.com/recodehive' }
80101 ] ,
81102 color : '#6366f1'
@@ -94,6 +115,7 @@ const tableOfContents = [
94115export default function CommunityPage ( ) : React . ReactElement {
95116 const [ activeSections , setActiveSections ] = useState < string [ ] > ( [ 'how-you-can-contribute' ] ) ;
96117 const [ selectedSection , setSelectedSection ] = useState < string | null > ( null ) ;
118+ const [ openDropdowns , setOpenDropdowns ] = useState < string [ ] > ( [ ] ) ;
97119
98120 useEffect ( ( ) => {
99121 const handleScroll = ( ) => {
@@ -148,6 +170,14 @@ export default function CommunityPage(): React.ReactElement {
148170 setSelectedSection ( sectionId ) ;
149171 }
150172 } ;
173+
174+ const toggleDropdown = ( itemId : string ) => {
175+ setOpenDropdowns ( prev =>
176+ prev . includes ( itemId )
177+ ? prev . filter ( id => id !== itemId )
178+ : [ ...prev , itemId ]
179+ ) ;
180+ } ;
151181
152182 const [ isMobile , setIsMobile ] = useState ( false ) ;
153183
@@ -250,16 +280,32 @@ export default function CommunityPage(): React.ReactElement {
250280
251281 < ul className = "section-items" >
252282 { section . items . map ( ( item , itemIndex ) => (
253- < motion . li
254- key = { itemIndex }
255- className = "section-item"
256- initial = { { opacity : 0 , x : - 20 } }
257- animate = { { opacity : 1 , x : 0 } }
258- transition = { { duration : 0.3 , delay : ( 0.1 * index ) + ( 0.05 * itemIndex ) } }
259- >
260- < span className = "item-arrow" > ▶</ span >
261- { item }
262- </ motion . li >
283+ < React . Fragment key = { itemIndex } >
284+ < motion . li
285+ className = "section-item"
286+ initial = { { opacity : 0 , x : - 20 } }
287+ animate = { { opacity : 1 , x : 0 } }
288+ transition = { { duration : 0.3 , delay : ( 0.1 * index ) + ( 0.05 * itemIndex ) } }
289+ onClick = { ( ) => toggleDropdown ( `${ section . id } -${ itemIndex } ` ) }
290+ style = { { cursor : 'pointer' } }
291+ >
292+ < span className = { `item-arrow ${ openDropdowns . includes ( `${ section . id } -${ itemIndex } ` ) ? 'rotate' : '' } ` } >
293+ ▶
294+ </ span >
295+ { item }
296+ </ motion . li >
297+
298+ { section . details && openDropdowns . includes ( `${ section . id } -${ itemIndex } ` ) && (
299+ < motion . div
300+ className = "section-item-details"
301+ initial = { { opacity : 0 , height : 0 } }
302+ animate = { { opacity : 1 , height : 'auto' } }
303+ transition = { { duration : 0.3 } }
304+ >
305+ < p > { section . details [ itemIndex ] } </ p >
306+ </ motion . div >
307+ ) }
308+ </ React . Fragment >
263309 ) ) }
264310 </ ul >
265311
0 commit comments