Skip to content

Commit 5f5daa2

Browse files
committed
move Resources and AI Tools under Roadmap & add FAQ link into header
1 parent 39114ec commit 5f5daa2

2 files changed

Lines changed: 61 additions & 24 deletions

File tree

components/data/roadmapList.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ export const roadmapList = [
1919
link: '/roadmaps/open-source-terminology'
2020
},
2121
{ name: 'Discussions', link: '/community/discussions' },
22-
{ name: 'Events', link: '/community/events' }
22+
{ name: 'Events', link: '/community/events' },
23+
{ name: 'Resources', link: '/resources' },
24+
{ name: 'AI Tools', link: '/ai' }
2325
]

components/layout/Header.tsx

Lines changed: 58 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -318,23 +318,17 @@ const Header = () => {
318318

319319
<div className='hidden items-center md:flex'>
320320
<div className='flex items-center space-x-4'>
321-
<Link
322-
href='/resources'
323-
className='mx-2 font-medium text-gray-700 transition-colors hover:text-modern-purple'
324-
>
325-
Resources
326-
</Link>
327321
<Link
328322
href='/contributors'
329323
className='mx-2 font-medium text-gray-700 transition-colors hover:text-modern-purple'
330324
>
331325
Contributors
332326
</Link>
333327
<Link
334-
href='/ai'
328+
href='/faq'
335329
className='mx-2 font-medium text-gray-700 transition-colors hover:text-modern-purple'
336330
>
337-
AI Tools
331+
FAQ
338332
</Link>
339333

340334
<div className='h-5 border-r border-gray-300'></div>
@@ -494,13 +488,40 @@ const Header = () => {
494488
)}
495489
</div>
496490

497-
<Link
498-
href='/resources'
499-
onClick={() => setIsOpen(false)}
500-
className='block px-3 py-2 text-base font-medium text-gray-700 hover:text-modern-purple'
501-
>
502-
Resources
503-
</Link>
491+
<div className='block px-3 py-2 text-base font-medium text-gray-700'>
492+
<button
493+
onClick={toggleRoadmapDropdown}
494+
className='flex w-full items-center justify-between'
495+
>
496+
<span>Roadmap</span>
497+
<svg
498+
className={`ml-1 h-5 w-5 transition-transform ${isRoadmapDropdownOpen ? 'rotate-180' : ''}`}
499+
fill='none'
500+
viewBox='0 0 24 24'
501+
stroke='currentColor'
502+
>
503+
<path
504+
strokeLinecap='round'
505+
strokeLinejoin='round'
506+
strokeWidth={2}
507+
d='M19 9l-7 7-7-7'
508+
/>
509+
</svg>
510+
</button>
511+
{isRoadmapDropdownOpen && (
512+
<div className='space-y-2 pl-4 pt-2'>
513+
{roadmapList.map(roadmap => (
514+
<button
515+
key={roadmap.name}
516+
onClick={() => navigateToRoadmap(roadmap.link)}
517+
className='block w-full py-1 text-left text-sm text-gray-600 hover:text-modern-purple'
518+
>
519+
{roadmap.name}
520+
</button>
521+
))}
522+
</div>
523+
)}
524+
</div>
504525

505526
<Link
506527
href='/contributors'
@@ -510,14 +531,6 @@ const Header = () => {
510531
Contributors
511532
</Link>
512533

513-
<Link
514-
href='/ai'
515-
onClick={() => setIsOpen(false)}
516-
className='block px-3 py-2 text-base font-medium text-gray-700 hover:text-modern-purple'
517-
>
518-
AI Tools
519-
</Link>
520-
521534
<Link
522535
href='/faq'
523536
onClick={() => setIsOpen(false)}
@@ -527,6 +540,23 @@ const Header = () => {
527540
</Link>
528541

529542
<div className='flex items-center space-x-2 px-3 py-2'>
543+
<a
544+
href='https://github.com/fork-commit-merge/fork-commit-merge'
545+
target='_blank'
546+
rel='noopener noreferrer'
547+
className='flex items-center text-gray-700 transition-colors hover:text-modern-purple'
548+
>
549+
<svg
550+
className='mr-1 h-5 w-5'
551+
viewBox='0 0 24 24'
552+
fill='currentColor'
553+
>
554+
<path d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z' />
555+
</svg>
556+
{starCount !== null && (
557+
<span className='text-sm font-medium'>{starCount}</span>
558+
)}
559+
</a>
530560
<ThemeSelector />
531561
{isLoaded && !user && (
532562
<Link
@@ -537,6 +567,11 @@ const Header = () => {
537567
Sign In
538568
</Link>
539569
)}
570+
{isLoaded && user && (
571+
<div className='flex items-center'>
572+
<UserButton afterSignOutUrl='/' />
573+
</div>
574+
)}
540575
</div>
541576
</div>
542577
</div>

0 commit comments

Comments
 (0)