mirror of
https://github.com/jnMetaCode/superpowers-zh.git
synced 2026-09-02 22:54:06 +08:00
refactor(sponsors): 旗舰赞助商文案改回分段展示,压成一整段把结构揉没了
赞助商给的原文本来是三条并列要点(⚡ 稳定承载 / 🧠 一个 Key 接入 / 🛠️ 赋能工作流), 上一版为了塞进卡片压成了一整段 —— 信息没丢,但骨架没了:卡片里是一堵 140 字的墙, README 里也是。付费展位应当按赞助方的文案结构呈现,读者也更容易扫。 ## 改法 - 官网旗舰卡:`desc` 整段 -> `points` 三条要点(图标 + 加粗小标题 + 说明),三语各一份; 新增 `.flag-points` 样式,图标定宽一列、标题与说明纵向对齐,颜色走 --text / --text-dim,深浅主题都已定义 - 两版 README:改成「标题行 + 致谢行 + 三条 bullet + 🎁 福利行」,与赞助商原文一一对应, 福利行补上原文的「superpowers-zh 用户专属福利」前缀 - 常规位不受影响,仍用整段 `desc`(卡片窄,四行截断的排版是为整段设计的) ## 门禁跟着分流 `assertSponsors()` 原来无差别要求每家都有 `desc`。现在按 tier 分:旗舰要 `img/w/h/points`,常规要 `logo/desc`;并新增一条 —— 三语要点**条数必须一致**, 每条的 `icon/t/d` 不能空。漏翻一条要点是最容易发生的漂移,页面上不会报错, 只会某个语言少一条。 反向验证:删掉繁體第三条 -> `points 三语条数不一致:zh/en/zht = 3/3/2`; 把简体第一条标题清空 -> `zh 要点缺 icon/t/d`。两条都按预期拦下。 ## 验证 - 三语赞助页各渲染 3 条要点,图标 / 标题 / 说明逐条核对无误 - 官网 66 页构建通过,站内死链 0、无效 href="#" 0 - styles.css 改动后内容 hash 已变(?v=786ad3f27f),边缘缓存不会喂旧 CSS - audit 170 pass / 0 fail;verify-release 115 pass / 0 fail
This commit is contained in:
10
README.md
10
README.md
@@ -41,9 +41,15 @@ Chinese community edition of [superpowers](https://github.com/obra/superpowers)
|
||||
</a>
|
||||
</p>
|
||||
|
||||
感谢 [Infistar.cc 无限星河](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link) 旗舰赞助本项目!Infistar.cc 提供全模型 API 服务:**一个 API Key 接入** Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等主流模型,适配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 编程工具。高可用模型通道与多节点冗余,价格低至官方渠道 **1 折**,稳定承载需求分析、方案规划、TDD、调试、代码审查这类长任务 —— 正好是 superpowers-zh 这套方法论跑起来时最吃稳定性的地方。
|
||||
**superpowers-zh × [Infistar.cc 无限星河](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)|全模型 API · 为 AI 编程注入稳定动力**
|
||||
|
||||
🎁 **通过[此链接](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)注册并完成首次调用,即可领取 5 美元等值测试额度!**
|
||||
感谢 Infistar.cc 无限星河 赞助并为 superpowers-zh 用户提供模型服务支持!
|
||||
|
||||
- ⚡ **稳定承载复杂开发任务**:提供高可用模型通道与多节点冗余,价格低至官方渠道 **1 折**,稳定支持需求分析、方案规划、TDD、调试及代码审查等长任务。
|
||||
- 🧠 **一个 API Key 接入主流模型**:全面支持 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等模型,适配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 编程工具。
|
||||
- 🛠️ **赋能完整开发工作流**:结合 superpowers-zh 的系统化 Skills,让 AI 更好地完成头脑风暴、计划执行、问题排查和质量检查。
|
||||
|
||||
🎁 **superpowers-zh 用户专属福利:通过[此链接](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)注册并完成首次调用,即可领取 5 美元等值测试额度!**
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -41,9 +41,15 @@ Chinese community edition of [superpowers](https://github.com/obra/superpowers)
|
||||
</a>
|
||||
</p>
|
||||
|
||||
感謝 [Infistar.cc 無限星河](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link) 旗艦贊助本專案!Infistar.cc 提供全模型 API 服務:**一個 API Key 接入** Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等主流模型,適配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 編程工具。高可用模型通道與多節點冗餘,價格低至官方渠道 **1 折**,穩定承載需求分析、方案規劃、TDD、除錯、程式碼審查這類長任務 —— 正好是 superpowers-zh 這套方法論跑起來時最吃穩定性的地方。
|
||||
**superpowers-zh × [Infistar.cc 無限星河](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)|全模型 API · 為 AI 編程注入穩定動力**
|
||||
|
||||
🎁 **透過[此連結](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)註冊並完成首次呼叫,即可領取 5 美元等值測試額度!**
|
||||
感謝 Infistar.cc 無限星河 贊助並為 superpowers-zh 使用者提供模型服務支援!
|
||||
|
||||
- ⚡ **穩定承載複雜開發任務**:提供高可用模型通道與多節點冗餘,價格低至官方渠道 **1 折**,穩定支援需求分析、方案規劃、TDD、除錯及程式碼審查等長任務。
|
||||
- 🧠 **一個 API Key 接入主流模型**:全面支援 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等模型,適配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 編程工具。
|
||||
- 🛠️ **賦能完整開發工作流**:結合 superpowers-zh 的系統化 Skills,讓 AI 更好地完成頭腦風暴、計畫執行、問題排查和品質檢查。
|
||||
|
||||
🎁 **superpowers-zh 使用者專屬福利:透過[此連結](https://www.infistar.cc/register?aff=PDVTM2VS&ref_source=link)註冊並完成首次呼叫,即可領取 5 美元等值測試額度!**
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -144,10 +144,24 @@ const SPONSORS = [
|
||||
en: 'Infistar.cc — all-model API service: one API key for Claude, ChatGPT, Gemini, Kimi, GLM and DeepSeek, from 10% of official pricing',
|
||||
zht: 'Infistar.cc 無限星河 —— 全模型 API 服務,一個 API Key 接入 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek,價格低至官方渠道 1 折',
|
||||
},
|
||||
desc: {
|
||||
zh: '全模型 API 服务:一个 API Key 接入 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等主流模型,适配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 编程工具。高可用通道与多节点冗余,价格低至官方渠道 1 折,稳定承载需求分析、方案规划、TDD、调试、代码审查这类长任务 —— 正好是 superpowers-zh 这套方法论跑起来时最吃稳定性的地方。',
|
||||
en: 'An all-model API service: one API key for Claude, ChatGPT, Gemini, Kimi, GLM and DeepSeek, wired for Claude Code, Codex, Cursor, Windsurf and Kiro. High-availability channels with multi-node redundancy, from 10% of official pricing, built to hold up across long tasks — requirements analysis, planning, TDD, debugging, code review — exactly where the superpowers-zh workflow leans hardest on stability.',
|
||||
zht: '全模型 API 服務:一個 API Key 接入 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等主流模型,適配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 編程工具。高可用通道與多節點冗餘,價格低至官方渠道 1 折,穩定承載需求分析、方案規劃、TDD、除錯、程式碼審查這類長任務 —— 正好是 superpowers-zh 這套方法論跑起來時最吃穩定性的地方。',
|
||||
// 旗舰卡按赞助商原文的三条要点分段展示(常规卡才用整段 desc)。
|
||||
// 压成一整段会把人家文案的骨架揉掉,也不好扫读 —— 付费展位按原结构呈现。
|
||||
points: {
|
||||
zh: [
|
||||
{ icon: '⚡', t: '稳定承载复杂开发任务', d: '高可用模型通道与多节点冗余,价格低至官方渠道 1 折,稳定支持需求分析、方案规划、TDD、调试及代码审查等长任务。' },
|
||||
{ icon: '🧠', t: '一个 API Key 接入主流模型', d: '全面支持 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等模型,适配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 编程工具。' },
|
||||
{ icon: '🛠️', t: '赋能完整开发工作流', d: '结合 superpowers-zh 的系统化 Skills,让 AI 更好地完成头脑风暴、计划执行、问题排查和质量检查。' },
|
||||
],
|
||||
en: [
|
||||
{ icon: '⚡', t: 'Built for long-running dev tasks', d: 'High-availability model channels with multi-node redundancy, from 10% of official pricing — steady across requirements analysis, planning, TDD, debugging and code review.' },
|
||||
{ icon: '🧠', t: 'One API key, every major model', d: 'Full support for Claude, ChatGPT, Gemini, Kimi, GLM and DeepSeek, wired for Claude Code, Codex, Cursor, Windsurf and Kiro.' },
|
||||
{ icon: '🛠️', t: 'Powers the whole workflow', d: 'Paired with the systematic skills in superpowers-zh, so the AI holds up through brainstorming, plan execution, troubleshooting and quality checks.' },
|
||||
],
|
||||
zht: [
|
||||
{ icon: '⚡', t: '穩定承載複雜開發任務', d: '高可用模型通道與多節點冗餘,價格低至官方渠道 1 折,穩定支援需求分析、方案規劃、TDD、除錯及程式碼審查等長任務。' },
|
||||
{ icon: '🧠', t: '一個 API Key 接入主流模型', d: '全面支援 Claude、ChatGPT、Gemini、Kimi、GLM、DeepSeek 等模型,適配 Claude Code、Codex、Cursor、Windsurf、Kiro 等 AI 編程工具。' },
|
||||
{ icon: '🛠️', t: '賦能完整開發工作流', d: '結合 superpowers-zh 的系統化 Skills,讓 AI 更好地完成頭腦風暴、計畫執行、問題排查和品質檢查。' },
|
||||
],
|
||||
},
|
||||
perk: {
|
||||
zh: '🎁 通过本页链接注册并完成首次调用,即可领取 5 美元等值测试额度',
|
||||
@@ -223,7 +237,7 @@ const SPONSORS = [
|
||||
// 页面上就是一个静默的碎图。构建时直接拦下来,不让它上线。
|
||||
function assertSponsors() {
|
||||
for (const s of SPONSORS) {
|
||||
const need = s.tier === 'flagship' ? ['img', 'w', 'h'] : ['logo'];
|
||||
const need = s.tier === 'flagship' ? ['img', 'w', 'h', 'points'] : ['logo', 'desc'];
|
||||
const missing = need.filter(k => !s[k]);
|
||||
if (missing.length) {
|
||||
throw new Error(`赞助商 ${s.name?.zh || '?'}(tier: ${s.tier})缺字段:${missing.join(', ')}`);
|
||||
@@ -233,12 +247,26 @@ function assertSponsors() {
|
||||
throw new Error(`赞助商 ${s.name?.zh || '?'} 的素材不存在:assets/sponsors/${f}`);
|
||||
}
|
||||
}
|
||||
for (const k of ['name', 'tagline', 'alt', 'desc', 'perk', 'perkShort']) {
|
||||
if (s.tier !== 'flagship' && k === 'tagline') continue; // 常规卡不展示 tagline
|
||||
const textKeys = s.tier === 'flagship'
|
||||
? ['name', 'tagline', 'alt', 'perk', 'perkShort']
|
||||
: ['name', 'alt', 'desc', 'perk', 'perkShort']; // 常规卡不展示 tagline
|
||||
for (const k of textKeys) {
|
||||
for (const lang of ['zh', 'en', 'zht']) {
|
||||
if (!s[k]?.[lang]) throw new Error(`赞助商 ${s.name?.zh || '?'} 的 ${k} 缺 ${lang} 文案`);
|
||||
}
|
||||
}
|
||||
// 旗舰的要点分段:三语条数必须一致,少一条就是某个语言漏翻了
|
||||
if (s.tier === 'flagship') {
|
||||
const counts = ['zh', 'en', 'zht'].map(l => s.points?.[l]?.length || 0);
|
||||
if (counts.some(n => n === 0) || new Set(counts).size > 1) {
|
||||
throw new Error(`赞助商 ${s.name?.zh || '?'} 的 points 三语条数不一致:zh/en/zht = ${counts.join('/')}`);
|
||||
}
|
||||
for (const l of ['zh', 'en', 'zht']) {
|
||||
for (const pt of s.points[l]) {
|
||||
if (!pt.icon || !pt.t || !pt.d) throw new Error(`赞助商 ${s.name?.zh || '?'} 的 ${l} 要点缺 icon/t/d`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
assertSponsors();
|
||||
@@ -911,7 +939,9 @@ function renderSponsors(lang) {
|
||||
<div class="flag-body">
|
||||
<h3>${esc(s.name[lang])}</h3>
|
||||
<p class="flag-tag">${esc(s.tagline[lang])}</p>
|
||||
<p class="flag-desc">${esc(s.desc[lang])}</p>
|
||||
<ul class="flag-points">${s.points[lang].map(pt => `
|
||||
<li><span class="fp-icon" aria-hidden="true">${pt.icon}</span><div><b>${esc(pt.t)}</b><span>${esc(pt.d)}</span></div></li>`).join('')}
|
||||
</ul>
|
||||
<div class="flag-foot">
|
||||
<span class="sponsor-perk">${esc(s.perk[lang])}</span>
|
||||
<a class="btn btn-primary" href="${esc(s.url)}" target="_blank" rel="sponsored nofollow noopener">${esc(sp.visitFlag)}</a>
|
||||
|
||||
@@ -357,6 +357,13 @@ footer { border-top: 1px solid var(--border-soft); margin-top: 40px; padding: 40
|
||||
.flag-body h3 { font-size: 19px; font-weight: 700; }
|
||||
.flag-tag { font-size: 13.5px; color: var(--accent-2); font-weight: 600; margin: 6px 0 12px; }
|
||||
.flag-desc { font-size: 14px; color: var(--text-dim); line-height: 1.75; }
|
||||
/* 旗舰卡的要点分段:图标定宽一列,标题与说明同一行起排 */
|
||||
.flag-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
|
||||
.flag-points li { display: flex; gap: 10px; align-items: flex-start; }
|
||||
.flag-points .fp-icon { flex: 0 0 auto; font-size: 15px; line-height: 1.6; }
|
||||
.flag-points li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
||||
.flag-points b { font-size: 14px; font-weight: 650; color: var(--text); }
|
||||
.flag-points span:not(.fp-icon) { font-size: 13.5px; color: var(--text-dim); line-height: 1.7; }
|
||||
.flag-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
|
||||
.flag-foot .sponsor-perk { margin: 0; flex: 1 1 320px; }
|
||||
.flag-foot .btn { flex: 0 0 auto; padding: 10px 20px; font-size: 14px; }
|
||||
|
||||
Reference in New Issue
Block a user