code: sync from git
Browse files
code/.claude/skills/eco-release/SKILL.md
CHANGED
|
@@ -88,7 +88,7 @@ env -u ALL_PROXY -u all_proxy python3 .claude/skills/eco-release/scripts/inspect
|
|
| 88 |
### 5. 页面
|
| 89 |
|
| 90 |
- 新发布落在已有模态时,页面代码一般不用改,只在预览里检查新名字的标记(`page.md` 第 4 节)。
|
| 91 |
-
- 跳转到官网是按模态挂的:语言挂 M Plan,视频和图像挂 H3 Family,新发布自动带上。新模态要不要挂、挂到哪,问用户后在 `web/src/lib/links.ts` 加一行(`page.md` 第 1.5 节)。
|
| 92 |
- 新模态按 `page.md` 第 2 节逐项改:org 的显示名、`CAT_ORDER`、颜色(用 dataviz 验证器检查)、`media.tsx`、背景和卡片视频。
|
| 93 |
- 页面风格跟 minimax.io 一致:亮色、会动的官方素材背景、白色卡片。
|
| 94 |
- 文案中英两版都要有,写在 `web/src/lib/i18n.ts`(`page.md` 第 5 节);不加小字说明,不说 open source,中文不说"开源"。新模态要在 `zh.cat` 加中文名。
|
|
|
|
| 88 |
### 5. 页面
|
| 89 |
|
| 90 |
- 新发布落在已有模态时,页面代码一般不用改,只在预览里检查新名字的标记(`page.md` 第 4 节)。
|
| 91 |
+
- 跳转到官网是按模态挂的:语言挂 M Plan,视频和图像挂 H3 Family,新发布自动带上;英文版指向 minimax.io,中文版指向 minimax.cn。新模态要不要挂、挂到哪,问用户后在 `web/src/lib/links.ts` 加一行(`page.md` 第 1.5 节)。
|
| 92 |
- 新模态按 `page.md` 第 2 节逐项改:org 的显示名、`CAT_ORDER`、颜色(用 dataviz 验证器检查)、`media.tsx`、背景和卡片视频。
|
| 93 |
- 页面风格跟 minimax.io 一致:亮色、会动的官方素材背景、白色卡片。
|
| 94 |
- 文案中英两版都要有,写在 `web/src/lib/i18n.ts`(`page.md` 第 5 节);不加小字说明,不说 open source,中文不说"开源"。新模态要在 `zh.cat` 加中文名。
|
code/.claude/skills/eco-release/reference/page.md
CHANGED
|
@@ -24,9 +24,9 @@
|
|
| 24 |
|
| 25 |
## 1.5 跳转到官网:按模态挂
|
| 26 |
|
| 27 |
-
`web/src/lib/links.ts` 的 `
|
| 28 |
-
- 所有语言模型(language)→ https://www.minimax.io/m-plan
|
| 29 |
-
- 所有视频和图像模型(video、image)→ https://www.minimax.io/h3-family
|
| 30 |
- music 不挂
|
| 31 |
|
| 32 |
它出现在两个地方:
|
|
@@ -35,7 +35,7 @@
|
|
| 35 |
|
| 36 |
页面顶栏不放这些链接:2026-11-25 用户要求去掉顶栏的 H3 Family 和 M Plan 按钮。顶栏只有 logo、语言切换和 Models 菜单。
|
| 37 |
|
| 38 |
-
已有模态的新发布自动带上按钮,不用改。新模态要不要挂、挂到哪,先问用户。
|
| 39 |
|
| 40 |
## 2. 新模态要改的地方(缺一处就会出错)
|
| 41 |
|
|
|
|
| 24 |
|
| 25 |
## 1.5 跳转到官网:按模态挂
|
| 26 |
|
| 27 |
+
`web/src/lib/links.ts` 的 `PAGE` 把**模态**映射到官网页面(2026-11-24 用户定的);英文版指向 minimax.io,中文版指向 minimax.cn 上同一路径的中文页面(2026-11-26 用户定的):
|
| 28 |
+
- 所有语言模型(language)→ `/m-plan`("M Plan"):https://www.minimax.io/m-plan ,中文 https://www.minimax.cn/m-plan
|
| 29 |
+
- 所有视频和图像模型(video、image)→ `/h3-family`("H3 Family"):https://www.minimax.io/h3-family ,中文 https://www.minimax.cn/h3-family
|
| 30 |
- music 不挂
|
| 31 |
|
| 32 |
它出现在两个地方:
|
|
|
|
| 35 |
|
| 36 |
页面顶栏不放这些链接:2026-11-25 用户要求去掉顶栏的 H3 Family 和 M Plan 按钮。顶栏只有 logo、语言切换和 Models 菜单。
|
| 37 |
|
| 38 |
+
已有模态的新发布自动带上按钮,不用改。新模态要不要挂、挂到哪,先问用户;加的时候确认 minimax.cn 上也有同一路径的中文页面。
|
| 39 |
|
| 40 |
## 2. 新模态要改的地方(缺一处就会出错)
|
| 41 |
|
code/web/src/components/site-header.tsx
CHANGED
|
@@ -8,11 +8,11 @@ import { catColor } from "@/lib/category"
|
|
| 8 |
import { full } from "@/lib/format"
|
| 9 |
import { href } from "@/lib/route"
|
| 10 |
import { Logo } from "@/components/logo"
|
| 11 |
-
import {
|
| 12 |
import { catName, getLang, setLang, T } from "@/lib/i18n"
|
| 13 |
|
| 14 |
/** Sits on the hero video of every page: the MiniMax logo home, the language switch, and every
|
| 15 |
-
* model page in a menu (
|
| 16 |
export function SiteHeader({ site }: { site: Site }) {
|
| 17 |
const rel = (k: string) => site.releases.find((r) => r.key === k)!
|
| 18 |
return (
|
|
@@ -59,7 +59,7 @@ export function SiteHeader({ site }: { site: Site }) {
|
|
| 59 |
})}
|
| 60 |
<DropdownMenuSeparator className="my-1.5 bg-border" />
|
| 61 |
<DropdownMenuLabel className="sr-only">{T.elsewhere}</DropdownMenuLabel>
|
| 62 |
-
{[...
|
| 63 |
{ label: T.hfOrg, href: "https://huggingface.co/MiniMaxAI" }].map((l) => (
|
| 64 |
<DropdownMenuItem key={l.href} asChild className="rounded-lg px-2.5 py-2 text-[15px] text-foreground/80 focus:bg-muted focus:text-foreground">
|
| 65 |
<a href={l.href} target="_blank" rel="noopener" className="flex items-center gap-2">
|
|
|
|
| 8 |
import { full } from "@/lib/format"
|
| 9 |
import { href } from "@/lib/route"
|
| 10 |
import { Logo } from "@/components/logo"
|
| 11 |
+
import { officialLinks } from "@/lib/links"
|
| 12 |
import { catName, getLang, setLang, T } from "@/lib/i18n"
|
| 13 |
|
| 14 |
/** Sits on the hero video of every page: the MiniMax logo home, the language switch, and every
|
| 15 |
+
* model page in a menu (the official site's pages at its foot). */
|
| 16 |
export function SiteHeader({ site }: { site: Site }) {
|
| 17 |
const rel = (k: string) => site.releases.find((r) => r.key === k)!
|
| 18 |
return (
|
|
|
|
| 59 |
})}
|
| 60 |
<DropdownMenuSeparator className="my-1.5 bg-border" />
|
| 61 |
<DropdownMenuLabel className="sr-only">{T.elsewhere}</DropdownMenuLabel>
|
| 62 |
+
{[...officialLinks().map((l) => ({ label: T.officialLink(l.label), href: l.href })),
|
| 63 |
{ label: T.hfOrg, href: "https://huggingface.co/MiniMaxAI" }].map((l) => (
|
| 64 |
<DropdownMenuItem key={l.href} asChild className="rounded-lg px-2.5 py-2 text-[15px] text-foreground/80 focus:bg-muted focus:text-foreground">
|
| 65 |
<a href={l.href} target="_blank" rel="noopener" className="flex items-center gap-2">
|
code/web/src/lib/links.ts
CHANGED
|
@@ -1,13 +1,22 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
-
/** The same pages once each, for the menu
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
.map((l) => [l.href, l])).values()]
|
|
|
|
| 1 |
+
import { getLang } from "@/lib/i18n"
|
| 2 |
+
|
| 3 |
+
/** The official page for a modality's models: every language release links to M Plan, every
|
| 4 |
+
* video and image release to the H3 Family page. English goes to minimax.io, Chinese to the
|
| 5 |
+
* same pages on minimax.cn. Shown as a button on each release's page and in the Models menu.
|
| 6 |
+
* Keys are category keys (org.CATEGORY_NAME). */
|
| 7 |
+
const PAGE: Record<string, { label: string; path: string }> = {
|
| 8 |
+
language: { label: "M Plan", path: "/m-plan" },
|
| 9 |
+
video: { label: "H3 Family", path: "/h3-family" },
|
| 10 |
+
image: { label: "H3 Family", path: "/h3-family" },
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
const site = () => (getLang() === "zh" ? "https://www.minimax.cn" : "https://www.minimax.io")
|
| 14 |
+
|
| 15 |
+
export function officialPage(cat: string): { label: string; href: string } | undefined {
|
| 16 |
+
const p = PAGE[cat]
|
| 17 |
+
return p && { label: p.label, href: site() + p.path }
|
| 18 |
}
|
| 19 |
|
| 20 |
+
/** The same pages once each, for the menu (H3 Family first, as the video category leads the page). */
|
| 21 |
+
export const officialLinks = () =>
|
| 22 |
+
[...new Map(["video", "image", "language"].map((c) => officialPage(c)!).map((l) => [l.href, l])).values()]
|
|
|
code/web/src/pages/category.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { SiteHeader } from "@/components/site-header"
|
|
| 8 |
import { CountUp, Panel, Section, Stat } from "@/components/layout"
|
| 9 |
import { TitleLockup } from "@/components/lockup"
|
| 10 |
import { HeroVideo } from "@/components/media"
|
| 11 |
-
import {
|
| 12 |
import { GrowthLines, WeeklyBars } from "@/components/growth"
|
| 13 |
import { DailyLines } from "@/components/daily"
|
| 14 |
import { DownloadHistory } from "@/components/downloads"
|
|
@@ -48,6 +48,7 @@ export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel:
|
|
| 48 |
if (!c) return null
|
| 49 |
const L = data && lineage ? data.lineages[lineage] : null
|
| 50 |
const tabs = c.releases.map((k) => site.releases.find((r) => r.key === k)!)
|
|
|
|
| 51 |
|
| 52 |
return (
|
| 53 |
<>
|
|
@@ -67,12 +68,12 @@ export function CategoryPage({ site, cat, rel }: { site: Site; cat: string; rel:
|
|
| 67 |
</span>
|
| 68 |
</h1>
|
| 69 |
)}
|
| 70 |
-
{/*
|
| 71 |
-
{L &&
|
| 72 |
-
<a href={
|
| 73 |
className="mt-7 inline-flex h-11 items-center gap-1.5 rounded-[10px] bg-white/20 px-6 text-[16px] font-medium text-white backdrop-blur-sm transition-colors hover:bg-white/30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
| 74 |
style={{ animation: "rise 700ms cubic-bezier(.22,.61,.36,1) 120ms both" }}>
|
| 75 |
-
{
|
| 76 |
</a>
|
| 77 |
)}
|
| 78 |
{tabs.length > 1 && (
|
|
|
|
| 8 |
import { CountUp, Panel, Section, Stat } from "@/components/layout"
|
| 9 |
import { TitleLockup } from "@/components/lockup"
|
| 10 |
import { HeroVideo } from "@/components/media"
|
| 11 |
+
import { officialPage } from "@/lib/links"
|
| 12 |
import { GrowthLines, WeeklyBars } from "@/components/growth"
|
| 13 |
import { DailyLines } from "@/components/daily"
|
| 14 |
import { DownloadHistory } from "@/components/downloads"
|
|
|
|
| 48 |
if (!c) return null
|
| 49 |
const L = data && lineage ? data.lineages[lineage] : null
|
| 50 |
const tabs = c.releases.map((k) => site.releases.find((r) => r.key === k)!)
|
| 51 |
+
const official = officialPage(cat)
|
| 52 |
|
| 53 |
return (
|
| 54 |
<>
|
|
|
|
| 68 |
</span>
|
| 69 |
</h1>
|
| 70 |
)}
|
| 71 |
+
{/* the official page for this modality, set like the buttons under the hero on minimax.io */}
|
| 72 |
+
{L && official && (
|
| 73 |
+
<a href={official.href} target="_blank" rel="noopener"
|
| 74 |
className="mt-7 inline-flex h-11 items-center gap-1.5 rounded-[10px] bg-white/20 px-6 text-[16px] font-medium text-white backdrop-blur-sm transition-colors hover:bg-white/30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
| 75 |
style={{ animation: "rise 700ms cubic-bezier(.22,.61,.36,1) 120ms both" }}>
|
| 76 |
+
{official.label}<ArrowUpRight className="size-4" />
|
| 77 |
</a>
|
| 78 |
)}
|
| 79 |
{tabs.length > 1 && (
|