mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
Reorganize the products mega-menu around cloud primitives into ten categories (two rows of five), each mapped to its Google Cloud equivalent: AI · Compute · Data · Network · Security Dev · Deploy · Observe · Chain · Apps - Single source of truth: lib/data/cloud-primitives.ts. productsNav and the generated overview pages both derive from it (DRY, one way). - Adds Network (new) and Chain (replaces Web3 as the on-chain settlement layer); renames Observability -> Observe; splits Platform -> Deploy + Security; maps AI & Agents -> AI, Async -> Deploy/Compute, Developer -> Dev. - Removes implementation-specific top-level items (Async/Flow/Auto/Tasks/ Pubsub/MQ/Stream), filing them under the right category. - Every leaf links to a real page: a bespoke product page where one exists, else a generated, unique cloud-primitive overview at /cloud/<slug> (one [slug] route) or /blockchain/<slug>. No dead links, no 404s, no empty stubs. - Menu shows the GCP-equivalent per category and "Open AI Cloud — GCP-compatible. Open source. On-chain." Monochrome, @hanzo/gui spacing. Favicon: full modern set from the canonical Hanzo mark (public/favicon.svg) — favicon.ico (regenerated, multi-res), favicon.svg, favicon-32x32/-16x16, apple-touch-icon (180), icon-192/512, site.webmanifest, plus a metadata.icons link set in the document head. Removes app/icon.svg so there is one icon source. Reproducible via scripts/gen-favicons.mjs + gen-favicon-ico.py. e2e: products.spec.ts now covers all 60 leaves (200 + unique hero + github links resolve); new mega-menu.spec.ts asserts the 2x5 layout, that the old categories are gone, the positioning line, no dead (#) links, and hover -> navigate for both bespoke and generated leaves. Co-authored-by: Hanzo Dev <[email protected]>
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import { notFound } from 'next/navigation'
|
|
import { CloudPrimitiveOverview } from '@/components/cloud/CloudPrimitiveOverview'
|
|
import { cloudPrimitiveSlugs, getPrimitive, getPrimitiveCategory } from '@/lib/data/cloud-primitives'
|
|
|
|
// Every cloud primitive without a bespoke page is pre-rendered here, so the
|
|
// mega-menu can link to it with zero risk of a 404 in the static export.
|
|
export function generateStaticParams() {
|
|
return cloudPrimitiveSlugs.map((slug) => ({ slug }))
|
|
}
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
|
|
const { slug } = await params
|
|
const primitive = getPrimitive(slug)
|
|
if (!primitive) return {}
|
|
return {
|
|
title: `${primitive.title} — Hanzo Cloud`,
|
|
description: primitive.description ?? primitive.tagline,
|
|
}
|
|
}
|
|
|
|
export default async function CloudPrimitivePage({ params }: { params: Promise<{ slug: string }> }) {
|
|
const { slug } = await params
|
|
const primitive = getPrimitive(slug)
|
|
if (!primitive) notFound()
|
|
return <CloudPrimitiveOverview primitive={primitive} category={getPrimitiveCategory(slug)} />
|
|
}
|