mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-08 16:17:58 +00:00
## Summary Surface the supported-models catalog (`/p/supported-models`) from the home page by adding a "Supported Models" link to the Products dropdown and the footer. ## Changes - **What**: Add a `nav.supportedModels` i18n entry (en `Supported Models`, zh-CN `支持的模型`) and link it to the existing `routes.models` constant in two places: the Products mega-menu Features column (between Launches and Docs) and the footer Products column (after Comfy MCP). Locale handling comes from `getRoutes`, so zh-CN resolves to `/zh-CN/p/supported-models` automatically. ## Review Focus - Placement is intentionally in **both** the nav and the footer (per FE-1190). Fine to drop either, happy to adjust after review. - Reuses the existing nav/footer link pattern, no new components or styles, and no `new` badge (the page is not newly launched). - Consumes `routes.models`, which was already defined but previously unused. FE-1190 ## Screenshots **Nav — Products dropdown, Features column** _Desktop:_ _Mobile:_ **Footer — Products column** _Desktop:_ _Mobile:_ Preview: https://comfy-website-preview-pr-13432.vercel.app
204 lines
5.7 KiB
TypeScript
204 lines
5.7 KiB
TypeScript
import { externalLinks, getRoutes } from '../config/routes'
|
|
import type { Locale } from '../i18n/translations'
|
|
import { t } from '../i18n/translations'
|
|
|
|
export type NavColumnItem = {
|
|
label: string
|
|
href: string
|
|
badge?: 'new'
|
|
external?: boolean
|
|
}
|
|
|
|
export type NavColumn = {
|
|
header: string
|
|
items: NavColumnItem[]
|
|
}
|
|
|
|
export type NavFeatured = {
|
|
imageSrc: string
|
|
imageAlt?: string
|
|
title: string
|
|
cta: {
|
|
label: string
|
|
ariaLabel?: string
|
|
href: string
|
|
}
|
|
}
|
|
|
|
export type NavItem =
|
|
| {
|
|
label: string
|
|
columns: NavColumn[]
|
|
featured?: NavFeatured
|
|
href?: never
|
|
}
|
|
| { label: string; href: string; columns?: never; featured?: never }
|
|
|
|
export function getMainNavigation(locale: Locale): NavItem[] {
|
|
const routes = getRoutes(locale)
|
|
return [
|
|
{
|
|
label: t('nav.products', locale),
|
|
featured: {
|
|
imageSrc: 'https://media.comfy.org/website/nav/mcp-card.webp',
|
|
imageAlt: t('nav.featuredProductsAlt', locale),
|
|
title: t('nav.featuredProductsTitle', locale),
|
|
cta: {
|
|
label: t('cta.getStarted', locale),
|
|
ariaLabel: t('nav.featuredProductsCtaAria', locale),
|
|
href: routes.mcp
|
|
}
|
|
},
|
|
columns: [
|
|
{
|
|
header: t('nav.products', locale),
|
|
items: [
|
|
{ label: t('nav.comfyLocal', locale), href: routes.download },
|
|
{ label: t('nav.comfyCloud', locale), href: routes.cloud },
|
|
{
|
|
label: t('nav.comfyApi', locale),
|
|
href: routes.api,
|
|
badge: 'new'
|
|
},
|
|
{
|
|
label: t('nav.comfyEnterprise', locale),
|
|
href: routes.cloudEnterprise
|
|
}
|
|
]
|
|
},
|
|
{
|
|
header: t('nav.colFeatures', locale),
|
|
items: [
|
|
{
|
|
label: t('nav.mcpServer', locale),
|
|
href: routes.mcp,
|
|
badge: 'new'
|
|
},
|
|
// TODO: no page yet — re-enable when landing pages ship
|
|
// { label: t('nav.appMode', locale), href: '#' },
|
|
// { label: t('nav.agentSkills', locale), href: '#' },
|
|
{
|
|
label: t('nav.launches', locale),
|
|
href: routes.launches,
|
|
badge: 'new'
|
|
},
|
|
{ label: t('nav.supportedModels', locale), href: routes.models },
|
|
{
|
|
label: t('nav.docs', locale),
|
|
href: externalLinks.docs,
|
|
external: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{ label: t('nav.pricing', locale), href: routes.cloudPricing },
|
|
{
|
|
label: t('nav.community', locale),
|
|
featured: {
|
|
imageSrc: 'https://media.comfy.org/website/nav/featured-demo-card.jpg',
|
|
imageAlt: t('nav.featuredCommunityAlt', locale),
|
|
title: t('nav.featuredCommunityTitle', locale),
|
|
cta: {
|
|
label: t('cta.watchDemo', locale),
|
|
ariaLabel: t('nav.featuredCommunityCtaAria', locale),
|
|
href: 'https://comfy.org/workflows/537cf7f1f745-537cf7f1f745/'
|
|
}
|
|
},
|
|
columns: [
|
|
{
|
|
header: t('nav.colPrograms', locale),
|
|
items: [
|
|
{ label: t('nav.comfyHub', locale), href: externalLinks.workflows },
|
|
{ label: t('nav.gallery', locale), href: routes.gallery },
|
|
{
|
|
label: t('nav.affiliates', locale),
|
|
href: routes.affiliates,
|
|
badge: 'new'
|
|
},
|
|
{
|
|
label: t('nav.learning', locale),
|
|
href: routes.learning,
|
|
badge: 'new'
|
|
}
|
|
]
|
|
},
|
|
{
|
|
header: t('nav.colConnect', locale),
|
|
items: [
|
|
{
|
|
label: t('nav.discord', locale),
|
|
href: externalLinks.discord,
|
|
external: true
|
|
},
|
|
{
|
|
label: t('nav.github', locale),
|
|
href: externalLinks.github,
|
|
external: true
|
|
},
|
|
{
|
|
label: t('nav.youtube', locale),
|
|
href: externalLinks.youtube,
|
|
external: true
|
|
},
|
|
{
|
|
label: t('nav.reddit', locale),
|
|
href: externalLinks.reddit,
|
|
external: true
|
|
},
|
|
{
|
|
label: t('nav.x', locale),
|
|
href: externalLinks.x,
|
|
external: true
|
|
},
|
|
{
|
|
label: t('nav.instagram', locale),
|
|
href: externalLinks.instagram,
|
|
external: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
label: t('nav.company', locale),
|
|
featured: {
|
|
imageSrc: 'https://media.comfy.org/website/nav/customer-story-card.jpg',
|
|
imageAlt: t('nav.featuredCompanyAlt', locale),
|
|
title: t('nav.featuredCompanyTitle', locale),
|
|
cta: {
|
|
label: t('cta.watchNow', locale),
|
|
ariaLabel: t('nav.featuredCompanyCtaAria', locale),
|
|
href: '/customers#hero-video'
|
|
}
|
|
},
|
|
columns: [
|
|
{
|
|
header: t('nav.company', locale),
|
|
items: [
|
|
{ label: t('nav.aboutUs', locale), href: routes.about },
|
|
{ label: t('nav.careers', locale), href: routes.careers },
|
|
{ label: t('nav.contact', locale), href: routes.contact }
|
|
]
|
|
},
|
|
{
|
|
header: t('nav.colMore', locale),
|
|
items: [
|
|
{
|
|
label: t('nav.customerStories', locale),
|
|
href: routes.customers
|
|
},
|
|
// TODO: no /brand page yet
|
|
// { label: t('nav.brand', locale), href: '#' },
|
|
{
|
|
label: t('nav.blogs', locale),
|
|
href: externalLinks.blog,
|
|
external: true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|