Skip to content

Commit c16857f

Browse files
committed
add Contributors page to Header
1 parent 32707b5 commit c16857f

4 files changed

Lines changed: 57 additions & 165 deletions

File tree

components/data/communityList.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/data/roadmapList.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
export const roadmapList = [
2-
{ name: "How To Contribute", link: "/roadmaps/how-to-contribute" },
2+
{ name: 'How To Contribute', link: '/roadmaps/how-to-contribute' },
33
{
4-
name: "Contribution Management",
5-
link: "/roadmaps/contribution-management",
4+
name: 'Contribution Management',
5+
link: '/roadmaps/contribution-management'
66
},
7-
{ name: "Open Source Philosophy", link: "/roadmaps/open-source-philosophy" },
8-
{ name: "Open Souce Licenses", link: "/roadmaps/open-source-licenses" },
7+
{ name: 'Open Source Philosophy', link: '/roadmaps/open-source-philosophy' },
8+
{ name: 'Open Souce Licenses', link: '/roadmaps/open-source-licenses' },
99
{
10-
name: "Overview of Documentation",
11-
link: "/roadmaps/overview-of-documentation",
10+
name: 'Overview of Documentation',
11+
link: '/roadmaps/overview-of-documentation'
1212
},
1313
{
14-
name: "Legal And Ethical Considerations",
15-
link: "/roadmaps/legal-and-ethical-considerations",
14+
name: 'Legal And Ethical Considerations',
15+
link: '/roadmaps/legal-and-ethical-considerations'
1616
},
1717
{
18-
name: "Open Source Terminology",
19-
link: "/roadmaps/open-source-terminology",
18+
name: 'Open Source Terminology',
19+
link: '/roadmaps/open-source-terminology'
2020
},
21-
];
21+
{ name: 'Discussions', link: '/community/discussions' },
22+
{ name: 'Events', link: '/community/events' }
23+
]

components/layout/Header.tsx

Lines changed: 14 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { languageList } from '../data/languageList'
1313
import { frameworkList } from '../data/frameworkList'
1414
import { gitList } from '../data/gitList'
1515
import { roadmapList } from '../data/roadmapList'
16-
import { communityList } from '../data/communityList'
1716
import { UserButton, useUser } from '@clerk/nextjs'
1817
import ThemeSelector from '../ThemeSelector'
1918

@@ -24,12 +23,10 @@ const Header = () => {
2423
const [isGitSelectionDropdownOpen, setGitSelectionDropdownOpen] =
2524
useState(false)
2625
const [isRoadmapDropdownOpen, setRoadmapDropdownOpen] = useState(false)
27-
const [isCommunityDropdownOpen, setCommunityDropdownOpen] = useState(false)
2826
const node = useRef<HTMLLIElement | null>(null)
2927
const frameworkNode = useRef<HTMLLIElement | null>(null)
3028
const gitSelectionNode = useRef<HTMLLIElement | null>(null)
3129
const roadmapNode = useRef<HTMLLIElement | null>(null)
32-
const communityNode = useRef<HTMLLIElement | null>(null)
3330
const router = useRouter()
3431
const [starCount, setStarCount] = useState<number | null>(null)
3532
const { user, isLoaded } = useUser()
@@ -69,11 +66,6 @@ const Header = () => {
6966
setRoadmapDropdownOpen(false)
7067
}
7168

72-
const navigateToCommunity = (link: string) => {
73-
router.push(link)
74-
setCommunityDropdownOpen(false)
75-
}
76-
7769
const toggleLanguageDropdown = () => {
7870
setLanguageDropdownOpen(!isLanguageDropdownOpen)
7971
if (!isLanguageDropdownOpen) {
@@ -82,7 +74,6 @@ const Header = () => {
8274
setFrameworkDropdownOpen(false)
8375
setGitSelectionDropdownOpen(false)
8476
setRoadmapDropdownOpen(false)
85-
setCommunityDropdownOpen(false)
8677
}
8778

8879
const toggleFrameworkDropdown = () => {
@@ -93,7 +84,6 @@ const Header = () => {
9384
setLanguageDropdownOpen(false)
9485
setGitSelectionDropdownOpen(false)
9586
setRoadmapDropdownOpen(false)
96-
setCommunityDropdownOpen(false)
9787
}
9888

9989
const toggleGitSelectionDropdown = () => {
@@ -104,7 +94,6 @@ const Header = () => {
10494
setLanguageDropdownOpen(false)
10595
setFrameworkDropdownOpen(false)
10696
setRoadmapDropdownOpen(false)
107-
setCommunityDropdownOpen(false)
10897
}
10998

11099
const toggleRoadmapDropdown = () => {
@@ -115,18 +104,6 @@ const Header = () => {
115104
setLanguageDropdownOpen(false)
116105
setFrameworkDropdownOpen(false)
117106
setGitSelectionDropdownOpen(false)
118-
setCommunityDropdownOpen(false)
119-
}
120-
121-
const toggleCommunityDropdown = () => {
122-
setCommunityDropdownOpen(!isCommunityDropdownOpen)
123-
if (!isCommunityDropdownOpen) {
124-
window.dispatchEvent(new Event('dropdownOpened'))
125-
}
126-
setLanguageDropdownOpen(false)
127-
setFrameworkDropdownOpen(false)
128-
setGitSelectionDropdownOpen(false)
129-
setRoadmapDropdownOpen(false)
130107
}
131108

132109
return (
@@ -339,55 +316,6 @@ const Header = () => {
339316
</div>
340317
)}
341318
</div>
342-
343-
<div
344-
className='relative'
345-
ref={communityNode as React.RefObject<HTMLDivElement>}
346-
>
347-
<button
348-
onClick={toggleCommunityDropdown}
349-
className='flex items-center transition-colors hover:text-modern-purple'
350-
style={{ color: 'var(--fc-primary)' }}
351-
>
352-
<span className='font-medium'>Community</span>
353-
<svg
354-
className={`ml-1 h-4 w-4 transition-transform ${isCommunityDropdownOpen ? 'rotate-180' : ''}`}
355-
fill='none'
356-
viewBox='0 0 24 24'
357-
stroke='currentColor'
358-
>
359-
<path
360-
strokeLinecap='round'
361-
strokeLinejoin='round'
362-
strokeWidth={2}
363-
d='M19 9l-7 7-7-7'
364-
/>
365-
</svg>
366-
</button>
367-
{isCommunityDropdownOpen && (
368-
<div
369-
className='scrollable-dropdown absolute z-50 mt-2 w-60 rounded-md py-1 shadow-lg'
370-
style={{
371-
backgroundColor: 'var(--bg-secondary)',
372-
color: 'var(--fc-primary)'
373-
}}
374-
>
375-
{communityList.map(community => (
376-
<button
377-
key={community.name}
378-
onClick={() => navigateToCommunity(community.link)}
379-
className='block w-full px-4 py-2 text-left text-sm transition-colors hover:bg-[var(--bg-hover)]'
380-
style={{
381-
color: 'var(--fc-primary)',
382-
backgroundColor: 'var(--bg-secondary)'
383-
}}
384-
>
385-
{community.name}
386-
</button>
387-
))}
388-
</div>
389-
)}
390-
</div>
391319
</div>
392320
</div>
393321
</div>
@@ -400,6 +328,12 @@ const Header = () => {
400328
>
401329
Resources
402330
</Link>
331+
<Link
332+
href='/contributors'
333+
className='mx-2 font-medium text-gray-700 transition-colors hover:text-modern-purple'
334+
>
335+
Contributors
336+
</Link>
403337
<Link
404338
href='/ai'
405339
className='mx-2 font-medium text-gray-700 transition-colors hover:text-modern-purple'
@@ -572,6 +506,14 @@ const Header = () => {
572506
Resources
573507
</Link>
574508

509+
<Link
510+
href='/contributors'
511+
onClick={() => setIsOpen(false)}
512+
className='block px-3 py-2 text-base font-medium text-gray-700 hover:text-modern-purple'
513+
>
514+
Contributors
515+
</Link>
516+
575517
<Link
576518
href='/ai'
577519
onClick={() => setIsOpen(false)}

pages/index.tsx

Lines changed: 29 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ export default function Home() {
7575
<Features />
7676
</motion.div>
7777

78-
{/* About Section */}
78+
{/* Project Description Section */}
7979
<motion.section
80-
className='bg-gray-50 pb-16'
80+
className='bg-white py-16'
8181
variants={container}
8282
initial='hidden'
8383
animate='show'
@@ -87,52 +87,12 @@ export default function Home() {
8787
className='mx-auto max-w-7xl px-4 sm:px-6 lg:px-8'
8888
>
8989
<div className='px-20 text-center'>
90-
<h2 className='text-2xl font-semibold leading-7 text-modern-purple'>
90+
<h2 className='text-3xl font-semibold leading-7 text-modern-purple'>
9191
Become a part of our community of over 700 inspiring developers
9292
who have already contributed to this project!
9393
</h2>
9494
</div>
9595

96-
<motion.div
97-
variants={item}
98-
className='prose prose-lg mx-auto mt-12 px-20 text-center'
99-
>
100-
<p>
101-
Fork, Commit, Merge is your one-stop resource hub for mastering
102-
GitHub contributions! Whether you're a novice coder or an
103-
experienced developer, our comprehensive guides are designed to
104-
streamline your GitHub journey. We delve into everything from
105-
basic Git commands to intricate pull request processes, making
106-
collaboration seamless and efficient.
107-
</p>
108-
<p>
109-
Learn the ins and outs of forking, committing, and merging with
110-
our easy-to-follow tutorials and expert advice. At Fork Commit
111-
Merge, we're passionate about empowering you to contribute
112-
confidently and effectively to the open-source world.
113-
</p>
114-
<p>Let's code, collaborate, and create together!</p>
115-
</motion.div>
116-
</motion.div>
117-
</motion.section>
118-
119-
{/* Project Description Section */}
120-
<motion.section
121-
className='bg-white py-16'
122-
variants={container}
123-
initial='hidden'
124-
animate='show'
125-
>
126-
<motion.div
127-
variants={item}
128-
className='mx-auto max-w-7xl px-4 sm:px-6 lg:px-8'
129-
>
130-
<div className='text-center'>
131-
<h2 className='text-3xl font-bold text-gray-900 sm:text-4xl'>
132-
About the Fork, Commit, Merge project
133-
</h2>
134-
</div>
135-
13696
<motion.div
13797
variants={item}
13898
className='prose prose-lg mx-auto mt-12'
@@ -141,9 +101,10 @@ export default function Home() {
141101
"Fork, Commit, Merge" is an educational and practical project
142102
aimed at helping developers - both newcomers and seasoned -
143103
improve their skills in open-source contribution,
144-
problem-solving, finding bugs, testing, and much more in 135
145-
individual issues encompassing various programming languages,
146-
libraries and frameworks.
104+
problem-solving, finding bugs, testing, and much more in{' '}
105+
<span className='text-green-400'>135</span> individual issues
106+
encompassing various programming languages, libraries and
107+
frameworks.
147108
</p>
148109
<p>
149110
The project is open to everyone and anyone who wants to learn
@@ -199,38 +160,8 @@ export default function Home() {
199160
))}
200161
</motion.div>
201162

202-
<div className='mt-8 text-center'>
203-
<Link
204-
href='/contributors'
205-
className='inline-flex items-center justify-center rounded-md bg-modern-purple px-6 py-3 text-base font-medium text-white shadow-sm transition-colors duration-200 hover:bg-modern-purple/90'
206-
>
207-
View All Contributors
208-
<svg
209-
className='ml-2 h-5 w-5'
210-
fill='none'
211-
stroke='currentColor'
212-
viewBox='0 0 24 24'
213-
xmlns='http://www.w3.org/2000/svg'
214-
>
215-
<path
216-
strokeLinecap='round'
217-
strokeLinejoin='round'
218-
strokeWidth={2}
219-
d='M13 7l5 5m0 0l-5 5m5-5H6'
220-
/>
221-
</svg>
222-
</Link>
223-
</div>
224-
225163
{/* Other Contributors */}
226164
<div className='mt-16'>
227-
<h3 className='mb-8 text-center text-2xl font-bold text-gray-900'>
228-
Join Our Community
229-
</h3>
230-
<p className='mb-8 text-center text-gray-600'>
231-
Be part of our growing community of developers who are learning
232-
and contributing to open source
233-
</p>
234165
<div className='grid gap-4 sm:grid-cols-2 lg:grid-cols-3'>
235166
{otherContributors.map((contributor, index) => (
236167
<a
@@ -262,6 +193,28 @@ export default function Home() {
262193
)}
263194
</div>
264195
</div>
196+
<div className='mt-8 text-center'>
197+
<Link
198+
href='/contributors'
199+
className='inline-flex items-center justify-center rounded-md bg-modern-purple px-6 py-3 text-base font-medium text-white shadow-sm transition-colors duration-200 hover:bg-modern-purple/90'
200+
>
201+
View All Contributors
202+
<svg
203+
className='ml-2 h-5 w-5'
204+
fill='none'
205+
stroke='currentColor'
206+
viewBox='0 0 24 24'
207+
xmlns='http://www.w3.org/2000/svg'
208+
>
209+
<path
210+
strokeLinecap='round'
211+
strokeLinejoin='round'
212+
strokeWidth={2}
213+
d='M13 7l5 5m0 0l-5 5m5-5H6'
214+
/>
215+
</svg>
216+
</Link>
217+
</div>
265218
</div>
266219
</section>
267220

0 commit comments

Comments
 (0)