feat: add mobile navigation menu to header

- Implemented responsive mobile menu using Headless UI Dialog component with hamburger toggle
- Refactored hero sections to use consistent boxed layout with background images and improved spacing
- Standardized button styling across hero components with arrow indicators for secondary actions
This commit is contained in:
2025-11-06 23:43:28 +01:00
parent 0f2f6df299
commit 8d1e2f4c7d
5 changed files with 170 additions and 92 deletions

BIN
public/images/agents.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -1,10 +1,12 @@
import { useState } from 'react'
import { Link, useLocation } from 'react-router-dom'
import { Dropdown } from './ui/Dropdown'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
import { Container } from './Container'
import { Button } from './Button'
import pmyceliumLogo from '../images/logos/logo_1.png'
import { Dialog } from '@headlessui/react'
import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'
const cloudNavItems = [
{ name: 'Cloud', href: '/cloud' },
@@ -15,6 +17,7 @@ const cloudNavItems = [
export function Header() {
const location = useLocation()
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
const getCurrentPageName = () => {
const currentPath = location.pathname;
@@ -72,9 +75,84 @@ export function Header() {
Get Mycelium Connector
</Button>
</div>
<div className="lg:hidden">
<button
type="button"
className="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 hover:text-cyan-500 transition-colors"
onClick={() => setMobileMenuOpen(true)}
>
<span className="sr-only">Open main menu</span>
<Bars3Icon className="h-6 w-6" aria-hidden="true" />
</button>
</div>
</div>
</Container>
</nav>
<Dialog as="div" className="lg:hidden" open={mobileMenuOpen} onClose={setMobileMenuOpen}>
<div className="fixed inset-0 z-10" />
<Dialog.Panel className="fixed inset-y-0 right-0 z-10 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10">
<div className="flex items-center justify-between">
<Link to="#" className="-m-1.5 p-1.5">
<span className="sr-only">Mycelium</span>
<img
className="h-8 w-auto"
src={pmyceliumLogo}
alt=""
/>
</Link>
<button
type="button"
className="-m-2.5 rounded-md p-2.5 text-gray-700 hover:text-cyan-500 transition-colors"
onClick={() => setMobileMenuOpen(false)}
>
<span className="sr-only">Close menu</span>
<XMarkIcon className="h-6 w-6" aria-hidden="true" />
</button>
</div>
<div className="mt-6 flow-root">
<div className="-my-6 divide-y divide-gray-500/10">
<div className="space-y-2 py-6">
{cloudNavItems.map((item) => (
<Link
key={item.name}
to={item.href}
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
>
{item.name}
</Link>
))}
<Link
to="/network"
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
>
Network
</Link>
<Link
to="/agents"
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
>
Agents
</Link>
</div>
<div className="py-6">
<Button
to="https://myceliumcloud.tf"
variant="outline"
as="a"
target="_blank"
rel="noopener noreferrer"
className="w-full"
>
Start Deployment
</Button>
<Button to="/download" variant="solid" color="cyan" className="mt-4 w-full">
Get Mycelium Connector
</Button>
</div>
</div>
</div>
</Dialog.Panel>
</Dialog>
</header>
)
}

View File

@@ -1,40 +1,43 @@
'use client'
import { Button } from '@/components/Button'
import { Eyebrow, P, H3 } from '@/components/Texts'
import { Eyebrow, H3 } from '@/components/Texts'
export function AgentHeroAlt() {
return (
<div className="relative bg-white lg:mt-10 mt-0">
<div className="relative h-80 overflow-hidden bg-transparent md:absolute md:right-0 md:h-full md:w-1/3 lg:w-2/3">
<img
alt=""
src="/images/agents.png"
className="size-full object-cover"
/>
</div>
<div className="relative mx-auto max-w-7xl py-24 sm:py-32 lg:px-8">
<div className="pr-6 pl-6 md:mr-auto md:w-2/3 md:pr-16 lg:w-1/2 lg:pl-0 lg:pr-24 xl:pr-32">
<Eyebrow className="text-base/7 font-semibold text-cyan-500">MYCELIUM AGENTS</Eyebrow>
<H3 as="h1" className="mt-2 text-gray-900">Sovereign AI Agents, Coming Soon.</H3>
<P className="mt-6 text-gray-600">
The Agent layer will allow you to run autonomous, policy-governed AI that operates on infrastructure you control, with private memory, verifiable execution, and coordination across your personal or organizational environment.
</P>
<P className="mt-6 text-gray-600">
Works Alone. Works Together.
Use Agents on top of any Mycelium Cloud deployment or pair them with the Mycelium Network for private, encrypted collaboration across users and systems.
</P>
<div className="mt-8">
<Button href="#" variant="solid" color="cyan">
Follow Deployment
</Button>
<Button href="#" variant="outline" color="white">
Explore Docs
</Button>
<div className="">
{/* Boxed container */}
<div
className="relative mx-auto max-w-7xl border border-t-0 border-b-0 border-gray-200 bg-white overflow-hidden bg-contain bg-right bg-no-repeat"
style={{ backgroundImage: "url('/images/agents.webp')", backgroundSize: "contain" }}
>
{/* Inner padding */}
<div className="px-6 py-16 lg:py-16">
<div className="max-w-2xl lg:pl-6">
<Eyebrow>MYCELIUM AGENTS</Eyebrow>
<H3 as="h1" className="mt-4">
Sovereign AI Agents, Coming Soon.
</H3>
<p className="mt-6 text-lg">
The Agent layer will allow you to run autonomous, policy-governed AI that operates on infrastructure you control, with private memory, verifiable execution, and coordination across your personal or organizational environment.
</p>
<p className="mt-4 lg:text-base italic text-gray-600 text-sm">
Works Alone. Works Together. Use Agents on top of any Mycelium Cloud deployment or pair them with the Mycelium Network for private, encrypted collaboration across users and systems.
</p>
<div className="mt-10 flex items-center gap-x-6">
<Button href="#" variant="solid" color="cyan">
Follow Deployment
</Button>
<Button href="#" variant="outline">
Explore Docs <span aria-hidden="true"></span>
</Button>
</div>
</div>
</div>
</div>
{/* ✅ Bottom horizontal line with spacing */}
<div className="w-full border-b border-gray-200" />
<div className="max-w-7xl bg-transparent mx-auto py-6 border border-t-0 border-b-0 border-gray-200"></div>
</div>
)
}

View File

@@ -1,42 +1,40 @@
'use client'
import { Button } from '@/components/Button'
import { Eyebrow, SectionHeader, P } from '@/components/Texts'
import { Eyebrow, H3 } from '@/components/Texts'
export function GpuHero() {
return (
<div className="relative bg-white">
<div className="relative h-80 overflow-hidden bg-transparent md:absolute md:right-0 md:h-full md:w-1/3 lg:w-1/2">
<img
alt="Mycelium GPU nebula illustration"
src="/images/gpuhero2.png"
className="size-full object-contain"
/>
</div>
<div className="relative mx-auto max-w-7xl py-24 lg:py-32 lg:px-8">
<div className="pr-6 pl-6 md:mr-auto md:w-2/3 md:pr-16 lg:w-1/2 lg:pl-0 lg:pr-24 ">
<Eyebrow className="tracking-[0.35em] uppercase text-cyan-500">
Mycelium GPU
</Eyebrow>
<SectionHeader as="h1" className="mt-4 text-gray-900">
Sovereign GPU Acceleration for AI and High-Performance Compute
</SectionHeader>
<P className="mt-6 text-gray-600">
Access GPUs across the Mycelium mesh without waitlists,
inflated pricing, or centralized control.
Run inference, training, and compute workloads where they make sense:
cloud, edge, or on your own hardware.
</P>
<div className="mt-10 flex flex-wrap gap-4">
<Button to="#gpu-getting-started" as="a" variant="solid" color="cyan">
How it works
</Button>
<Button to="#gpu-architecture" as="a" variant="outline" color="cyan">
Explore Docs
</Button>
<div className="">
{/* Boxed container */}
<div
className="relative mx-auto max-w-7xl border border-t-0 border-b-0 border-gray-200 bg-white overflow-hidden bg-contain bg-right bg-no-repeat"
style={{ backgroundImage: "url('/images/gpuhero2.png')", backgroundSize: "contain" }}
>
{/* Inner padding */}
<div className="px-6 py-16 lg:py-16">
<div className="max-w-2xl lg:pl-6">
<Eyebrow>Mycelium GPU</Eyebrow>
<H3 as="h1" className="mt-4">
Sovereign GPU Acceleration for AI and High-Performance Compute
</H3>
<p className="mt-6 text-lg">
Access GPUs across the Mycelium mesh without waitlists, inflated pricing, or centralized control. Run inference, training, and compute workloads where they make sense: cloud, edge, or on your own hardware.
</p>
<div className="mt-10 flex items-center gap-x-6">
<Button to="#gpu-getting-started" as="a" variant="solid" color="cyan">
How it works
</Button>
<Button to="#gpu-architecture" as="a" variant="outline">
Explore Docs <span aria-hidden="true"></span>
</Button>
</div>
</div>
</div>
</div>
{/* ✅ Bottom horizontal line with spacing */}
<div className="w-full border-b border-gray-200" />
<div className="max-w-7xl bg-transparent mx-auto py-6 border border-t-0 border-b-0 border-gray-200"></div>
</div>
)
}

View File

@@ -1,45 +1,44 @@
'use client'
import { Button } from '@/components/Button'
import { Eyebrow, SectionHeader, P } from '@/components/Texts'
import { Eyebrow, H3 } from '@/components/Texts'
export function StorageHero() {
return (
<div className="relative bg-white">
<div className="relative h-80 overflow-hidden bg-transparent md:absolute md:right-0 md:h-full md:w-1/3 lg:w-1/2">
<img
alt="Mycelium Storage visual"
src="/images/computehero11.webp"
className="size-full object-contain"
/>
</div>
<div className="relative mx-auto max-w-7xl py-24 lg:py-32 lg:px-8">
<div className="pr-6 pl-6 md:mr-auto md:w-2/3 md:pr-16 lg:w-1/2 lg:pl-0 lg:pr-24 xl:pr-32">
<Eyebrow className="tracking-[0.35em] uppercase text-cyan-500">
Mycelium Storage
</Eyebrow>
<SectionHeader as="h1" className="mt-4 text-gray-900">
Sovereign Storage With Self-Healing and Multi-Protocol Access
</SectionHeader>
<P className="mt-6 text-gray-600">
Store, replicate, and serve data across the global mesh
with encrypted, quantum safe, verifiable storage you control at the infrastructure layer.
</P>
<div className="mt-10 flex flex-wrap gap-4">
<Button to="#storage-features" as="a" variant="solid" color="cyan">
How It Works
</Button>
<Button
to="#storage-developer-experience"
as="a"
variant="outline"
color="cyan"
>
Explore Docs
</Button>
<div className="">
{/* Boxed container */}
<div
className="relative mx-auto max-w-7xl border border-t-0 border-b-0 border-gray-200 bg-white overflow-hidden bg-contain bg-right bg-no-repeat"
style={{ backgroundImage: "url('/images/computehero11.webp')", backgroundSize: "contain" }}
>
{/* Inner padding */}
<div className="px-6 py-16 lg:py-16">
<div className="max-w-2xl lg:pl-6">
<Eyebrow>Mycelium Storage</Eyebrow>
<H3 as="h1" className="mt-4">
Sovereign Storage With Self-Healing and Multi-Protocol Access
</H3>
<p className="mt-6 text-lg">
Store, replicate, and serve data across the global mesh with encrypted, quantum safe, verifiable storage you control at the infrastructure layer.
</p>
<div className="mt-10 flex items-center gap-x-6">
<Button to="#storage-features" as="a" variant="solid" color="cyan">
How It Works
</Button>
<Button
to="#storage-developer-experience"
as="a"
variant="outline"
>
Explore Docs <span aria-hidden="true"></span>
</Button>
</div>
</div>
</div>
</div>
{/* ✅ Bottom horizontal line with spacing */}
<div className="w-full border-b border-gray-200" />
<div className="max-w-7xl bg-transparent mx-auto py-6 border border-t-0 border-b-0 border-gray-200"></div>
</div>
)
}