import { writeFile } from 'node:fs/promises'; export async function buildDesignCatalog(directions) { const latest = directions.at(-1), themes = directions[0].themes; const html = ` 设计总览 · HEX TRAILS
HEX TRAILS 设计档案
ART DIRECTION LIBRARY / 01–${latest.code}

${directions.length} 套设计,
放在一起看。

按方案编号整理,每套都有轻松、进阶、烧脑、挑战和每周挑战。
喜欢的可以同时保留,再到审核页逐套记录意见。

最近新增 · 第 ${latest.code} 套${latest.name}${latest.description}查看完整设计稿 ↗
01 / COMPARE

同一棋盘,看清不同画法

统一弯曲轨道与七色棋子;切换主题,同时更新全部方案。

查看 ${directions.length * themes.length} 种主题 ↓
${themes.map((t,i)=>``).join('')}

当前对比:轻松 · ${directions.length} 套设计

${directions.map(d=>``).join('')}
02 / THEME INDEX

${directions.length} 套设计 × ${themes.length} 种主题

每个名字对应一份配色。点击主题,直接进入对应方案的试玩与审核。

${directions.map(d=>``).join('')}
03 / SHARED DETAILS

已经统一的细节

查看组件与交互规范 ↗
`; await writeFile(new URL('../design/index.html', import.meta.url), html); }