docs(nx-dev): consolidate enterprise menus (#31517)
Replaced the "Enterprise" drop-down menu with a direct link to the Enterprise page for simpler navigation. Updated mobile menus to integrate enterprise items alongside solutions.
This commit is contained in:
parent
719c5f55fb
commit
8767f0d9ec
@ -157,10 +157,11 @@ export function Header({ ctaButtons }: HeaderProps): ReactElement {
|
||||
leaveFrom="opacity-100 translate-y-0"
|
||||
leaveTo="opacity-0 translate-y-1"
|
||||
>
|
||||
<Popover.Panel className="absolute left-60 z-30 mt-3 w-max max-w-xl -translate-x-1/2 transform lg:left-20 xl:max-w-2xl">
|
||||
<Popover.Panel className="absolute left-60 z-30 mt-3 w-max max-w-xl -translate-x-1/2 transform lg:left-20">
|
||||
<SectionsMenu
|
||||
sections={{
|
||||
'Speed, Reliability and AI': solutionsItems,
|
||||
'By roles': solutionsItems,
|
||||
'For enterprises': enterpriseItems,
|
||||
}}
|
||||
/>
|
||||
</Popover.Panel>
|
||||
@ -235,49 +236,14 @@ export function Header({ ctaButtons }: HeaderProps): ReactElement {
|
||||
</Link>
|
||||
<div className="hidden h-6 w-px bg-slate-200 md:block dark:bg-slate-700" />
|
||||
{/*ENTERPRISE*/}
|
||||
<Popover className="relative">
|
||||
{({ open }) => (
|
||||
<>
|
||||
<PopoverButton
|
||||
className={cx(
|
||||
open ? 'text-blue-500 dark:text-sky-500' : '',
|
||||
'group inline-flex items-center px-3 py-2 font-medium leading-tight outline-0 dark:text-slate-200'
|
||||
)}
|
||||
>
|
||||
<span className="transition duration-150 ease-in-out group-hover:text-blue-500 dark:group-hover:text-sky-500">
|
||||
Enterprise
|
||||
</span>
|
||||
<ChevronDownIcon
|
||||
className={cx(
|
||||
open
|
||||
? 'rotate-180 transform text-blue-500 dark:text-sky-500'
|
||||
: '',
|
||||
'ml-2 h-3 w-3 transition duration-150 ease-in-out group-hover:text-blue-500 dark:group-hover:text-sky-500'
|
||||
)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</PopoverButton>
|
||||
|
||||
<Transition
|
||||
as={Fragment}
|
||||
enter="transition ease-out duration-200"
|
||||
enterFrom="opacity-0 translate-y-1"
|
||||
enterTo="opacity-100 translate-y-0"
|
||||
leave="transition ease-in duration-150"
|
||||
leaveFrom="opacity-100 translate-y-0"
|
||||
leaveTo="opacity-0 translate-y-1"
|
||||
>
|
||||
<Popover.Panel className="absolute left-60 z-30 mt-3 w-max max-w-xl -translate-x-1/2 transform lg:left-20 xl:max-w-2xl">
|
||||
<SectionsMenu
|
||||
sections={{
|
||||
'Nx for Enterprises': enterpriseItems,
|
||||
}}
|
||||
/>
|
||||
</Popover.Panel>
|
||||
</Transition>
|
||||
</>
|
||||
)}
|
||||
</Popover>
|
||||
<Link
|
||||
href="/enterprise"
|
||||
title="Nx for Enterprises"
|
||||
className="hidden gap-2 px-3 py-2 font-semibold leading-tight hover:text-blue-500 md:inline-flex dark:text-slate-200 dark:hover:text-sky-500"
|
||||
prefetch={false}
|
||||
>
|
||||
Enterprise
|
||||
</Link>
|
||||
<div className="hidden h-6 w-px bg-slate-200 md:block dark:bg-slate-700" />
|
||||
<div className="px-3 opacity-50 hover:opacity-100">
|
||||
<AlgoliaSearch tiny={true} />
|
||||
@ -455,14 +421,15 @@ export function Header({ ctaButtons }: HeaderProps): ReactElement {
|
||||
as="ul"
|
||||
className="space-y-1 pb-2"
|
||||
>
|
||||
{Object.values(solutionsItems)
|
||||
.flat()
|
||||
.map((item) => (
|
||||
<MobileMenuItem
|
||||
key={item.name}
|
||||
item={item}
|
||||
/>
|
||||
))}
|
||||
{[
|
||||
...Object.values(solutionsItems).flat(),
|
||||
...Object.values(enterpriseItems).flat(),
|
||||
].map((item) => (
|
||||
<MobileMenuItem
|
||||
key={item.name}
|
||||
item={item}
|
||||
/>
|
||||
))}
|
||||
</Disclosure.Panel>
|
||||
</>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user