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"
|
leaveFrom="opacity-100 translate-y-0"
|
||||||
leaveTo="opacity-0 translate-y-1"
|
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
|
<SectionsMenu
|
||||||
sections={{
|
sections={{
|
||||||
'Speed, Reliability and AI': solutionsItems,
|
'By roles': solutionsItems,
|
||||||
|
'For enterprises': enterpriseItems,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Popover.Panel>
|
</Popover.Panel>
|
||||||
@ -235,49 +236,14 @@ export function Header({ ctaButtons }: HeaderProps): ReactElement {
|
|||||||
</Link>
|
</Link>
|
||||||
<div className="hidden h-6 w-px bg-slate-200 md:block dark:bg-slate-700" />
|
<div className="hidden h-6 w-px bg-slate-200 md:block dark:bg-slate-700" />
|
||||||
{/*ENTERPRISE*/}
|
{/*ENTERPRISE*/}
|
||||||
<Popover className="relative">
|
<Link
|
||||||
{({ open }) => (
|
href="/enterprise"
|
||||||
<>
|
title="Nx for Enterprises"
|
||||||
<PopoverButton
|
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"
|
||||||
className={cx(
|
prefetch={false}
|
||||||
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
|
Enterprise
|
||||||
</span>
|
</Link>
|
||||||
<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>
|
|
||||||
<div className="hidden h-6 w-px bg-slate-200 md:block dark:bg-slate-700" />
|
<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">
|
<div className="px-3 opacity-50 hover:opacity-100">
|
||||||
<AlgoliaSearch tiny={true} />
|
<AlgoliaSearch tiny={true} />
|
||||||
@ -455,9 +421,10 @@ export function Header({ ctaButtons }: HeaderProps): ReactElement {
|
|||||||
as="ul"
|
as="ul"
|
||||||
className="space-y-1 pb-2"
|
className="space-y-1 pb-2"
|
||||||
>
|
>
|
||||||
{Object.values(solutionsItems)
|
{[
|
||||||
.flat()
|
...Object.values(solutionsItems).flat(),
|
||||||
.map((item) => (
|
...Object.values(enterpriseItems).flat(),
|
||||||
|
].map((item) => (
|
||||||
<MobileMenuItem
|
<MobileMenuItem
|
||||||
key={item.name}
|
key={item.name}
|
||||||
item={item}
|
item={item}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user