forked from emre/www_projectmycelium_com
refactor: simplify navigation structure and update homepage content
- Removed Cloud dropdown menu and flattened navigation to direct links (Network, Cloud, Pods, Agents, Node) - Reordered navigation items for better flow and renamed "Nodes" to "Node" for consistency - Updated homepage hero and CTA sections with clearer messaging focused on digital sovereignty and infrastructure control - Added new bento grid images for visual refresh
This commit is contained in:
@@ -1,32 +1,14 @@
|
||||
import { useState } from 'react'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { Dropdown } from './ui/Dropdown'
|
||||
import { ChevronDownIcon } from '@heroicons/react/20/solid'
|
||||
import { Link } from 'react-router-dom'
|
||||
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' },
|
||||
{ name: 'Compute', href: '/compute' },
|
||||
{ name: 'Storage', href: '/storage' },
|
||||
{ name: 'GPU', href: '/gpu' },
|
||||
]
|
||||
|
||||
export function Header() {
|
||||
const location = useLocation()
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
||||
|
||||
const getCurrentPageName = () => {
|
||||
const currentPath = location.pathname;
|
||||
if (currentPath.startsWith('/compute')) return 'Compute';
|
||||
if (currentPath.startsWith('/storage')) return 'Storage';
|
||||
if (currentPath.startsWith('/gpu')) return 'GPU';
|
||||
return 'Cloud';
|
||||
};
|
||||
|
||||
return (
|
||||
<header className="bg-white">
|
||||
<nav className="border-b border-gray-100">
|
||||
@@ -36,22 +18,6 @@ export function Header() {
|
||||
<img src={pmyceliumLogo} alt="Mycelium" className="h-8 w-auto" />
|
||||
</Link>
|
||||
<div className="hidden lg:flex lg:gap-10">
|
||||
<Dropdown
|
||||
buttonContent={
|
||||
<>
|
||||
{['Compute', 'Storage', 'GPU'].includes(getCurrentPageName()) ? (
|
||||
<>
|
||||
<span className="text-gray-500">Cloud {' >'} </span>
|
||||
<span>{getCurrentPageName()}</span>
|
||||
</>
|
||||
) : (
|
||||
'Cloud'
|
||||
)}
|
||||
<ChevronDownIcon className="h-5 w-5" aria-hidden="true" />
|
||||
</>
|
||||
}
|
||||
items={cloudNavItems}
|
||||
/>
|
||||
<Link
|
||||
to="/network"
|
||||
className="text-base/7 tracking-tight text-gray-700 hover:text-cyan-500 transition-colors"
|
||||
@@ -59,10 +25,10 @@ export function Header() {
|
||||
Network
|
||||
</Link>
|
||||
<Link
|
||||
to="/agents"
|
||||
to="/cloud"
|
||||
className="text-base/7 tracking-tight text-gray-700 hover:text-cyan-500 transition-colors"
|
||||
>
|
||||
Agents
|
||||
Cloud
|
||||
</Link>
|
||||
<Link
|
||||
to="/pods"
|
||||
@@ -71,10 +37,16 @@ export function Header() {
|
||||
Pods
|
||||
</Link>
|
||||
<Link
|
||||
to="/nodes"
|
||||
to="/agents"
|
||||
className="text-base/7 tracking-tight text-gray-700 hover:text-cyan-500 transition-colors"
|
||||
>
|
||||
Nodes
|
||||
Agents
|
||||
</Link>
|
||||
<Link
|
||||
to="/node"
|
||||
className="text-base/7 tracking-tight text-gray-700 hover:text-cyan-500 transition-colors"
|
||||
>
|
||||
Node
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,16 +102,6 @@ export function Header() {
|
||||
<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"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
{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"
|
||||
@@ -148,11 +110,11 @@ export function Header() {
|
||||
Network
|
||||
</Link>
|
||||
<Link
|
||||
to="/agents"
|
||||
to="/cloud"
|
||||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
Agents
|
||||
Cloud
|
||||
</Link>
|
||||
<Link
|
||||
to="/pods"
|
||||
@@ -162,11 +124,18 @@ export function Header() {
|
||||
Pods
|
||||
</Link>
|
||||
<Link
|
||||
to="/nodes"
|
||||
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"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
Nodes
|
||||
Agents
|
||||
</Link>
|
||||
<Link
|
||||
to="/node"
|
||||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
Node
|
||||
</Link>
|
||||
</div>
|
||||
<div className="py-6">
|
||||
|
||||
Reference in New Issue
Block a user