|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
import { ChevronDown, Globe, Menu, Sparkles, Waypoints } from 'lucide-react'; |
|
|
|
|
import { ChevronDown, Globe, Menu, Sparkles, Map } from 'lucide-react'; |
|
|
|
|
import { useEffect, useRef, useState } from 'react'; |
|
|
|
|
import { useOutsideClick } from '../../hooks/use-outside-click'; |
|
|
|
|
import { cn } from '../../lib/classname'; |
|
|
|
@ -13,19 +13,22 @@ const links = [ |
|
|
|
|
link: '/roadmaps', |
|
|
|
|
label: 'Official Roadmaps', |
|
|
|
|
description: 'Made by subject matter experts', |
|
|
|
|
Icon: Waypoints, |
|
|
|
|
Icon: Map, |
|
|
|
|
isHighlighted: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
link: '/ai/explore', |
|
|
|
|
label: 'AI Roadmaps', |
|
|
|
|
description: 'Generate roadmaps with AI', |
|
|
|
|
Icon: Sparkles, |
|
|
|
|
isHighlighted: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
link: '/community', |
|
|
|
|
label: 'Community Roadmaps', |
|
|
|
|
description: 'Made by community members', |
|
|
|
|
Icon: Globe, |
|
|
|
|
isHighlighted: false, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
@ -73,14 +76,34 @@ export function RoadmapDropdownMenu() { |
|
|
|
|
<a |
|
|
|
|
href={link.link} |
|
|
|
|
key={link.link} |
|
|
|
|
className="group flex items-center gap-3 px-4 py-2.5 text-gray-400 transition-colors hover:bg-slate-700" |
|
|
|
|
className={cn( |
|
|
|
|
'group flex items-center gap-3 px-4 py-2.5 text-gray-400 transition-colors hover:bg-slate-700', |
|
|
|
|
{ |
|
|
|
|
'mx-2 mb-1 rounded-md border border-slate-600 bg-slate-700 text-gray-200 hover:bg-slate-600': |
|
|
|
|
link.isHighlighted, |
|
|
|
|
}, |
|
|
|
|
)} |
|
|
|
|
role="menuitem" |
|
|
|
|
> |
|
|
|
|
<span className="flex h-[40px] w-[40px] items-center justify-center rounded-full bg-slate-600 transition-colors group-hover:bg-slate-500 group-hover:text-slate-100"> |
|
|
|
|
<span |
|
|
|
|
className={cn( |
|
|
|
|
'flex h-[40px] w-[40px] items-center justify-center rounded-full bg-slate-600 transition-colors group-hover:bg-slate-500 group-hover:text-slate-100', |
|
|
|
|
{ |
|
|
|
|
'bg-slate-500 text-slate-100': link.isHighlighted, |
|
|
|
|
}, |
|
|
|
|
)} |
|
|
|
|
> |
|
|
|
|
<link.Icon className="inline-block h-5 w-5" /> |
|
|
|
|
</span> |
|
|
|
|
<span className="flex flex-col"> |
|
|
|
|
<span className="font-medium text-slate-300 transition-colors group-hover:text-slate-100"> |
|
|
|
|
<span |
|
|
|
|
className={cn( |
|
|
|
|
'font-medium text-slate-300 transition-colors group-hover:text-slate-100', |
|
|
|
|
{ |
|
|
|
|
'text-white': link.isHighlighted, |
|
|
|
|
}, |
|
|
|
|
)} |
|
|
|
|
> |
|
|
|
|
{link.label} |
|
|
|
|
</span> |
|
|
|
|
<span className="text-sm">{link.description}</span> |
|
|
|
|