Skip to content

🤖 Open-source, local-first alternative to Grok Bot, OpenAI dots and Claude Duet. Your own AI bots on any model: GPT, Claude, Gemini, Grok, DeepSeek, Kimi, GLM and 70+ more through one Modelflare key. Reach them in the app, WeChat or Feishu; they remember you, work in the background, run commands and use your computer. Pay per use.

feat(site): 页脚收录徽章统一成等大格子,新增 19 个站,图片带本地备份

dyk9854214baed827
diff --git a/site/package.json b/site/package.json
index 8c28e8f..7b41fbc 100644
--- a/site/package.json
+++ b/site/package.json
@@ -18,6 +18,7 @@
"preview": "astro preview",
"og": "python3 scripts/make-og.py",
"bots:avif": "tsx scripts/make-bot-avif.ts",
+ "badges:copies": "tsx scripts/make-badge-copies.ts",
"releases": "tsx scripts/releases-from-github.ts",
"releases:dir": "tsx scripts/releases-from-dir.ts"
},
diff --git a/site/public/badges/aidirs.webp b/site/public/badges/aidirs.webp
new file mode 100644
index 0000000..3b04a9a
Binary files /dev/null and b/site/public/badges/aidirs.webp differ
diff --git a/site/public/badges/aura-dark.webp b/site/public/badges/aura-dark.webp
new file mode 100644
index 0000000..b3bf7f2
Binary files /dev/null and b/site/public/badges/aura-dark.webp differ
diff --git a/site/public/badges/aura-light.webp b/site/public/badges/aura-light.webp
new file mode 100644
index 0000000..5f5f9ab
Binary files /dev/null and b/site/public/badges/aura-light.webp differ
diff --git a/site/public/badges/deeplaunch-io-dark.webp b/site/public/badges/deeplaunch-io-dark.webp
new file mode 100644
index 0000000..a869c3e
Binary files /dev/null and b/site/public/badges/deeplaunch-io-dark.webp differ
diff --git a/site/public/badges/deeplaunch-io-light.webp b/site/public/badges/deeplaunch-io-light.webp
new file mode 100644
index 0000000..f59c55d
Binary files /dev/null and b/site/public/badges/deeplaunch-io-light.webp differ
diff --git a/site/public/badges/dofollow-tools-dark.webp b/site/public/badges/dofollow-tools-dark.webp
new file mode 100644
index 0000000..f392946
Binary files /dev/null and b/site/public/badges/dofollow-tools-dark.webp differ
diff --git a/site/public/badges/dofollow-tools-light.webp b/site/public/badges/dofollow-tools-light.webp
new file mode 100644
index 0000000..012f62f
Binary files /dev/null and b/site/public/badges/dofollow-tools-light.webp differ
diff --git a/site/public/badges/fazier.webp b/site/public/badges/fazier.webp
new file mode 100644
index 0000000..994349e
Binary files /dev/null and b/site/public/badges/fazier.webp differ
diff --git a/site/public/badges/findly-tools.webp b/site/public/badges/findly-tools.webp
new file mode 100644
index 0000000..e38e7a5
Binary files /dev/null and b/site/public/badges/findly-tools.webp differ
diff --git a/site/public/badges/huzzler.webp b/site/public/badges/huzzler.webp
new file mode 100644
index 0000000..58e3bd7
Binary files /dev/null and b/site/public/badges/huzzler.webp differ
diff --git a/site/public/badges/indiehunt.webp b/site/public/badges/indiehunt.webp
new file mode 100644
index 0000000..61f4d64
Binary files /dev/null and b/site/public/badges/indiehunt.webp differ
diff --git a/site/public/badges/launch-llama-dark.webp b/site/public/badges/launch-llama-dark.webp
new file mode 100644
index 0000000..4256cf1
Binary files /dev/null and b/site/public/badges/launch-llama-dark.webp differ
diff --git a/site/public/badges/launch-llama-light.webp b/site/public/badges/launch-llama-light.webp
new file mode 100644
index 0000000..2f673c8
Binary files /dev/null and b/site/public/badges/launch-llama-light.webp differ
diff --git a/site/public/badges/marketingdb.webp b/site/public/badges/marketingdb.webp
new file mode 100644
index 0000000..15519f5
Binary files /dev/null and b/site/public/badges/marketingdb.webp differ
diff --git a/site/public/badges/mydentify.webp b/site/public/badges/mydentify.webp
new file mode 100644
index 0000000..ed6102a
Binary files /dev/null and b/site/public/badges/mydentify.webp differ
diff --git a/site/public/badges/neeed-directory.webp b/site/public/badges/neeed-directory.webp
new file mode 100644
index 0000000..8220d6a
Binary files /dev/null and b/site/public/badges/neeed-directory.webp differ
diff --git a/site/public/badges/nick-launches-dark.webp b/site/public/badges/nick-launches-dark.webp
new file mode 100644
index 0000000..4848d57
Binary files /dev/null and b/site/public/badges/nick-launches-dark.webp differ
diff --git a/site/public/badges/nick-launches-light.webp b/site/public/badges/nick-launches-light.webp
new file mode 100644
index 0000000..6dc2a14
Binary files /dev/null and b/site/public/badges/nick-launches-light.webp differ
diff --git a/site/public/badges/openhunts.webp b/site/public/badges/openhunts.webp
new file mode 100644
index 0000000..08cc9d9
Binary files /dev/null and b/site/public/badges/openhunts.webp differ
diff --git a/site/public/badges/saascity.webp b/site/public/badges/saascity.webp
new file mode 100644
index 0000000..13b2862
Binary files /dev/null and b/site/public/badges/saascity.webp differ
diff --git a/site/public/badges/scrolllaunch.webp b/site/public/badges/scrolllaunch.webp
new file mode 100644
index 0000000..e0ee2c6
Binary files /dev/null and b/site/public/badges/scrolllaunch.webp differ
diff --git a/site/public/badges/shipboost.webp b/site/public/badges/shipboost.webp
new file mode 100644
index 0000000..11364b4
Binary files /dev/null and b/site/public/badges/shipboost.webp differ
diff --git a/site/public/badges/showmebestai-dark.webp b/site/public/badges/showmebestai-dark.webp
new file mode 100644
index 0000000..29ba23f
Binary files /dev/null and b/site/public/badges/showmebestai-dark.webp differ
diff --git a/site/public/badges/showmebestai-light.webp b/site/public/badges/showmebestai-light.webp
new file mode 100644
index 0000000..4403c86
Binary files /dev/null and b/site/public/badges/showmebestai-light.webp differ
diff --git a/site/public/badges/smol-launch.webp b/site/public/badges/smol-launch.webp
new file mode 100644
index 0000000..3c5d82d
Binary files /dev/null and b/site/public/badges/smol-launch.webp differ
diff --git a/site/public/badges/startuptrusted.webp b/site/public/badges/startuptrusted.webp
new file mode 100644
index 0000000..931ab58
Binary files /dev/null and b/site/public/badges/startuptrusted.webp differ
diff --git a/site/public/badges/tooldirs-dark.webp b/site/public/badges/tooldirs-dark.webp
new file mode 100644
index 0000000..eed4466
Binary files /dev/null and b/site/public/badges/tooldirs-dark.webp differ
diff --git a/site/public/badges/tooldirs-light.webp b/site/public/badges/tooldirs-light.webp
new file mode 100644
index 0000000..0cf08c4
Binary files /dev/null and b/site/public/badges/tooldirs-light.webp differ
diff --git a/site/public/badges/toolpilot.webp b/site/public/badges/toolpilot.webp
new file mode 100644
index 0000000..88dbd46
Binary files /dev/null and b/site/public/badges/toolpilot.webp differ
diff --git a/site/public/badges/turbo0.webp b/site/public/badges/turbo0.webp
new file mode 100644
index 0000000..7f72052
Binary files /dev/null and b/site/public/badges/turbo0.webp differ
diff --git a/site/public/badges/twelve-tools-dark.webp b/site/public/badges/twelve-tools-dark.webp
new file mode 100644
index 0000000..c65afb0
Binary files /dev/null and b/site/public/badges/twelve-tools-dark.webp differ
diff --git a/site/public/badges/twelve-tools-light.webp b/site/public/badges/twelve-tools-light.webp
new file mode 100644
index 0000000..bea7fd9
Binary files /dev/null and b/site/public/badges/twelve-tools-light.webp differ
diff --git a/site/public/badges/uno-directory.webp b/site/public/badges/uno-directory.webp
new file mode 100644
index 0000000..4a16c01
Binary files /dev/null and b/site/public/badges/uno-directory.webp differ
diff --git a/site/public/badges/whatsthebigdata.webp b/site/public/badges/whatsthebigdata.webp
new file mode 100644
index 0000000..d5e78ba
Binary files /dev/null and b/site/public/badges/whatsthebigdata.webp differ
diff --git a/site/scripts/check-images.ts b/site/scripts/check-images.ts
index 363cf00..04ea619 100644
--- a/site/scripts/check-images.ts
+++ b/site/scripts/check-images.ts
@@ -3,6 +3,7 @@ import crypto from "node:crypto";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+import { BADGES, badgeVariants } from "../src/data/badges";
const root = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
const pub = path.join(root, "public");
@@ -37,6 +38,10 @@ for (const f of files.filter((f) => /^bots\/.+\.webp$/.test(f))) {
const hash = crypto.createHash("sha256").update(fs.readFileSync(path.join(pub, f))).digest("hex");
if (!files.includes(`bots/${key}.avif`) || avifOf[key] !== hash) bad.push(`bots/${key}.avif 不是从当前的 ${f} 生成的(npm run bots:avif 重新生成)`);
}
+// 每张图片徽章都要有本地备份,否则站方的图连不上时格子是空的(styles/footer.css)
+for (const { copy } of BADGES.flatMap(badgeVariants)) {
+ if (copy && !files.includes(copy.path)) bad.push(`${copy.path} 不存在(npm run badges:copies 重新生成)`);
+}
const fonts = files.filter((f) => f.endsWith(".woff2")).reduce((n, f) => n + fs.statSync(path.join(pub, f)).size, 0);
if (fonts > 60 * KB) bad.push(`字体合计 ${Math.round(fonts / KB)} KB(≤ 60 KB)`);
if (bad.length) { console.error(`✗ 图片与字体检查未通过:\n ${bad.join("\n ")}`); process.exit(1); }
diff --git a/site/scripts/make-badge-copies.ts b/site/scripts/make-badge-copies.ts
new file mode 100644
index 0000000..9e5acf5
--- /dev/null
+++ b/site/scripts/make-badge-copies.ts
@@ -0,0 +1,48 @@
+// 收录徽章的本地备份(public/badges/*.webp):站方图片连不上或被拦截时,页脚显示这一份,不留破图。
+// 页面 HTML 里的站方原码不变,校验机器人读到的还是站方的图片地址;备份只是垫在下面(styles/footer.css)。
+//
+// 一律转成 WebP:大的 SVG 有几十 KB,放不进 check-images 的 SVG 预算;转成位图也就不用在自家域名上托管第三方 SVG。
+// 高度 88px,是页脚显示高度(44px)的两倍。
+//
+// 用法:npm run badges:copies(需要联网)。data/badges.ts 新增或换了图片徽章后要重跑,check-images 会查缺的文件。
+import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import sharp from "sharp";
+import { BADGES, badgeVariants } from "../src/data/badges";
+
+const HEIGHT = 88;
+const out = path.join(path.dirname(path.dirname(fileURLToPath(import.meta.url))), "public");
+
+// 服务器上 SVG 指定的字体大多没有,默认的 DejaVu 又偏宽,长一点的字会超出徽章(Fazier 被裁掉最后一个字母)。
+// 换成窄一些的 Noto Sans,更接近访客系统字体的效果;等宽字体保持不变。这台机器没有这个字体时会退回默认字体,不影响生成
+function narrowFont(file: Buffer) {
+ if (!file.subarray(0, 1024).toString().includes("<svg")) return file;
+ return Buffer.from(file.toString().replace(/font-family\s*(=\s*"[^"]*"|:\s*[^;}"]+)/g, (m, value: string) =>
+ /mono/i.test(value) ? m : value.startsWith("=") ? 'font-family="Noto Sans SC"' : "font-family: 'Noto Sans SC'"));
+}
+
+const failed: string[] = [];
+const copies = BADGES.flatMap(badgeVariants).flatMap((v) => v.copy ?? []);
+for (const copy of copies) {
+ try {
+ const res = await fetch(copy.remote, { signal: AbortSignal.timeout(30_000) });
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
+ // density 决定 SVG 的光栅化精度:先画到足够大再缩,文字才不糊。位图不受影响
+ const image = sharp(narrowFont(Buffer.from(await res.arrayBuffer())), { density: 288 });
+ const file = path.join(out, copy.path);
+ fs.mkdirSync(path.dirname(file), { recursive: true });
+ const info = await image.resize({ height: HEIGHT }).webp({ quality: 88, effort: 6 }).toFile(file);
+ console.log(`${copy.path} ${info.width}×${info.height} ${(info.size / 1024).toFixed(1)} KB`);
+ } catch (err) {
+ failed.push(`${copy.remote}:${err instanceof Error ? err.message : err}`);
+ }
+}
+if (failed.length) {
+ console.error(`✗ 这些徽章没有生成备份:\n ${failed.join("\n ")}`);
+ process.exit(1);
+}
+// 全部成功才清理:徽章换了款或删掉后,旧备份不留在 public/ 里
+const dir = path.join(out, "badges");
+const keep = new Set(copies.map((c) => path.basename(c.path)));
+for (const f of fs.readdirSync(dir)) if (!keep.has(f)) fs.rmSync(path.join(dir, f));
diff --git a/site/src/components/Footer.astro b/site/src/components/Footer.astro
index 1d61d45..e41a56d 100644
--- a/site/src/components/Footer.astro
+++ b/site/src/components/Footer.astro
@@ -9,7 +9,7 @@ import { dict, href, altLang, switchHref, type Lang } from "../i18n";
import { GITHUB_URL, MF, pricing } from "../lib/site";
import { docsUrl } from "../lib/docs";
import { pickModels } from "../lib/eyefield";
-import { BADGES, type Badge } from "../data/badges";
+import { BADGES, badgeVariants } from "../data/badges";
interface Props { lang: Lang; path: string }
const { lang, path } = Astro.props;
const t = dict(lang);
@@ -25,12 +25,9 @@ const ext = (u: string) => /^https?:/.test(u);
const other = altLang(lang);
// 眼睛田"换脑"时轮流显示的模型:价格快照里每家厂商取一个
const models = pickModels(pricing.rows);
-// 有深色款的徽章出两份,由 CSS 按主题显示一份。图片懒加载:被隐藏的那份不会发请求,页面也只在快到页脚时才请求这些外部图片
-const lazy = (html: string) => html.replace(/<img\b/g, '<img loading="lazy" decoding="async"');
-type BadgeItem = { html: string; kind: Badge["kind"]; on?: "dark" | "light" };
-const badges = BADGES.flatMap(({ html, dark, kind }): BadgeItem[] => dark
- ? [{ html: lazy(dark), kind, on: "dark" }, { html: lazy(html), kind, on: "light" }]
- : [{ html: lazy(html), kind }]);
+// 图片懒加载:被隐藏的那个主题款不会发请求,页面也只在快到页脚时才请求这些外部图片
+const lazy = (html: string) => html.replace(/<img\b([^>]*)>/g, (_, attrs: string) => `<img${/\sloading=/.test(attrs) ? "" : ' loading="lazy"'} decoding="async"${attrs}>`);
+const badges = BADGES.flatMap((b) => badgeVariants(b).map((v) => ({ ...v, kind: b.kind, label: b.noCopy ? b.name : undefined, html: lazy(v.html) })));
---
<footer class="footer">
<div class="container footer__inner">
@@ -54,7 +51,12 @@ const badges = BADGES.flatMap(({ html, dark, kind }): BadgeItem[] => dark
<div class="container footer__featured">
<h2 class="footer__title">{t.footer.featured}</h2>
<ul class="footer__badges" role="list">
- {badges.map((b) => <li class="footer__badge" data-kind={b.kind} data-on={b.on} set:html={b.html} />)}
+ {badges.map((b) => (
+ <li class="footer__badge" data-kind={b.kind} data-on={b.on} data-label={b.label}>
+ {b.copy && <img class="footer__badge-copy" src={`/${b.copy.path}`} alt="" loading="lazy" decoding="async" />}
+ <Fragment set:html={b.html} />
+ </li>
+ ))}
</ul>
</div>
<div class="container footer__bottom">
@@ -75,4 +77,5 @@ const badges = BADGES.flatMap(({ html, dark, kind }): BadgeItem[] => dark
</footer>
<script>
import "../scripts/eyefield";
+ import "../scripts/badges";
</script>
diff --git a/site/src/data/badges.ts b/site/src/data/badges.ts
index b332aee..be2bd63 100644
--- a/site/src/data/badges.ts
+++ b/site/src/data/badges.ts
@@ -3,10 +3,11 @@
// 所以这里存站方给的原码,构建时直接写进静态页;不要改成前端渲染,出站链接也不要加 nofollow。
// 不少站会定期复查(AI Tool Trek、MarketingDB 等),徽章移除后会下架或把链接降为 nofollow,删之前先确认。
//
-// 图片故意外链到站方:校验可能看图片地址,而且很多 SVG 有几十 KB,放不进 public/ 的体积预算(check-images)。
-// 隐私说明(i18n 的 privacy.body)写了这个例外,这里改动外链方式时那边要同步。
+// 图片故意外链到站方:校验可能看图片地址。隐私说明(i18n 的 privacy.body)写了这个例外,这里改动外链方式时那边要同步。
+// 站方的图不一定连得上(对方限流、访客网络不通、被插件拦截),所以 public/badges/ 里每张都有一份备份垫在下面,
+// 站方的图加载成功才盖上去。新增或换了图片徽章要跑 npm run badges:copies,check-images 会查缺的文件。
//
-// 除了下面注明的两处,代码都和站方页面一字不差。
+// 除了下面注明的几处,代码都和站方页面一字不差。
export interface Badge {
name: string;
@@ -16,17 +17,42 @@ export interface Badge {
dark?: string;
/**
* 默认:图片徽章,统一缩放到一个高度。
- * text:站方只要一条文字链接,页脚里画成小胶囊。
- * natural:保持站方尺寸(HTML 画的徽章,或本身就矮的徽章)。
+ * natural:图片徽章,但本身就矮,保持站方尺寸。
+ * text:站方只要一条文字链接。
+ * html:站方用 HTML 画的徽章,页脚的样式会盖掉它自带的底色和边框。
*/
- kind?: "text" | "natural";
+ kind?: "natural" | "text" | "html";
+ /** 取不到站方的图,没有本地备份:站方的图加载出来之前,格子里显示站名 */
+ noCopy?: boolean;
+}
+
+export interface BadgeVariant {
+ html: string;
+ /** 只在这个主题下显示;没有就两个主题都显示 */
+ on?: "dark" | "light";
+ /** 站方图片的地址和它在 public/ 下的备份。文字徽章没有图,HTML 画的徽章只有一个小 logo,都不备份 */
+ copy?: { remote: string; path: string };
+}
+
+const slug = (name: string) => name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
+
+/** 页脚实际输出的条目:有深色款的徽章出两条,由 CSS 按主题显示一条 */
+export function badgeVariants({ name, html, dark, kind, noCopy }: Badge): BadgeVariant[] {
+ const list = dark ? [{ html: dark, on: "dark" as const }, { html, on: "light" as const }] : [{ html }];
+ if (kind === "text" || kind === "html" || noCopy) return list;
+ return list.map((v) => {
+ const remote = v.html.match(/<img\b[^>]*?\ssrc="([^"]+)"/)?.[1];
+ if (!remote) throw new Error(`徽章 ${name} 的代码里找不到图片地址`);
+ const suffix = "on" in v ? `-${v.on}` : "";
+ return { ...v, copy: { remote, path: `badges/${slug(name)}${suffix}.webp` } };
+ });
}
export const BADGES: Badge[] = [
{
+ // 站方的深色款(...-dark.png)在深色底上字几乎看不清,两个主题都用彩色款
name: "Whatsthebigdata",
html: `<a href="https://whatsthebigdata.com/ai-tools/" target="_blank" rel="noopener" title="Whatsthebigdata AI Tools Directory"><img src="https://whatsthebigdata.com/badges/featured-on-whatsthebigdata-color.png" alt="Featured on Whatsthebigdata" width="240" style="max-width:100%;height:auto"/></a>`,
- dark: `<a href="https://whatsthebigdata.com/ai-tools/" target="_blank" rel="noopener" title="Whatsthebigdata AI Tools Directory"><img src="https://whatsthebigdata.com/badges/featured-on-whatsthebigdata-dark.png" alt="Featured on Whatsthebigdata" width="240" style="max-width:100%;height:auto"/></a>`,
},
{
// rel 里的 nofollow sponsored 是站方原码自带的;要求放在 /en/ 上,页脚每页都有,满足
@@ -38,11 +64,6 @@ export const BADGES: Badge[] = [
kind: "natural",
html: `<a href="https://mydentify.com/" aria-label="Listed on Mydentify"><img src="https://mydentify.com/badges/listed-on-mydentify.svg" alt="Listed on Mydentify" width="176" height="32"></a>`,
},
- {
- name: "AI Toolz Dir",
- kind: "text",
- html: `<a href="https://www.aitoolzdir.com" target="_blank">AI Toolz Dir</a>`,
- },
{
name: "DeepLaunch.io",
html: `<a href="https://deeplaunch.io" target="_blank"><img src="https://deeplaunch.io/badge/badge_light.svg" alt="Featured on DeepLaunch.io" width="200" height="54" /></a>`,
@@ -65,7 +86,7 @@ export const BADGES: Badge[] = [
},
{
name: "TopAITools4U",
- kind: "natural",
+ kind: "html",
html: `<a data-topaitools4u-badge="verified-listing" href="https://www.topaitools4u.site" target="_blank" rel="noopener" aria-label="Listed on TopAITools4U" style="display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid #d9d9d9;border-radius:12px;background:#ffffff;color:#111111;font-family:Inter,Arial,sans-serif;text-decoration:none;">
<img src="https://www.topaitools4u.site/logo.svg" alt="TopAITools4U" width="32" height="32" style="display:block;width:32px;height:32px;border-radius:9px;" />
<span style="display:flex;flex-direction:column;line-height:1.15;">
@@ -75,14 +96,10 @@ export const BADGES: Badge[] = [
</a>`,
},
{
- name: "AI Tool Trek",
- kind: "text",
- html: `<a href='https://aitooltrek.com' title='AI Tool Trek'>AI Tool Trek</a>`,
- },
- {
+ // 站方码的链接是首页 nicklaunches.com/,校验要求指向我们的产品页,这里改了
name: "Nick Launches",
- html: `<a href="https://nicklaunches.com/" target="_blank" rel="noopener"><img src="https://nicklaunches.com/badges/featured.png" alt="Featured on Nick Launches" width="244" height="56" /></a>`,
- dark: `<a href="https://nicklaunches.com/" target="_blank" rel="noopener"><img src="https://nicklaunches.com/badges/featured-dark.png" alt="Featured on Nick Launches" width="244" height="56" /></a>`,
+ html: `<a href="https://nicklaunches.com/products/anymodelbot/" target="_blank" rel="noopener"><img src="https://nicklaunches.com/badges/featured.png" alt="Featured on Nick Launches" width="244" height="56" /></a>`,
+ dark: `<a href="https://nicklaunches.com/products/anymodelbot/" target="_blank" rel="noopener"><img src="https://nicklaunches.com/badges/featured-dark.png" alt="Featured on Nick Launches" width="244" height="56" /></a>`,
},
{
// 改动一:站方码还带一条 7px 小字链接 "Launch your MCP" → mcpshelf.co(站方的姊妹产品),这里删了。
@@ -117,4 +134,125 @@ export const BADGES: Badge[] = [
<img alt="OpenHunts Club Member" height="105" src="https://cdn.openhunts.com/badges/club.webp" style="width: 195px; height: auto;" width="486">
</a>`,
},
+ {
+ // 站方开了 Vercel 安全检查,服务器请求这张图只拿到 429 和验证页(2026-11-01),所以没有备份;访客的浏览器能否加载也不确定
+ name: "Startup Fame",
+ noCopy: true,
+ html: `<a href="https://startupfa.me/s/anymodelbot?utm_source=anymodel.bot" target="_blank"><img src="https://startupfa.me/badges/featured-badge.webp" alt="AnyModelBot - Featured on Startup Fame" width="171" height="54" /></a>`,
+ },
+ {
+ name: "SaaSCity",
+ html: `<a href="https://saascity.io" target="_blank" rel="noopener">
+ <img src="https://saascity.io/badges/featured-dark.svg" alt="Featured on SaaSCity" width="150" height="54" />
+</a>`,
+ },
+ {
+ // 站方只给图片没给 HTML,这段是按它品牌页的 "Featured on ToolPilot" 黑底图拼的
+ name: "ToolPilot",
+ html: `<a href="https://www.toolpilot.ai" target="_blank"><img src="https://www.toolpilot.ai/cdn/shop/files/f-b_690x151_crop_center.png" alt="Featured on ToolPilot" width="150" height="33" /></a>`,
+ },
+ {
+ name: "Findly.tools",
+ html: `<a href="https://findly.tools/anymodelbot?utm_source=anymodelbot" target="_blank" rel="noopener noreferrer">
+ <img src="https://findly.tools/badges/findly-tools-badge-dark.svg" alt="Featured on Findly.tools" width="175" height="55" />
+</a>`,
+ },
+ {
+ name: "Fazier",
+ html: `<a href="https://fazier.com" target="_blank"><img src="https://fazier.com/api/v1//public/badges/launch_badges.svg?badge_type=featured&theme=light" width=250 alt="Fazier badge" /></a>`,
+ },
+ {
+ name: "Neeed Directory",
+ html: `<a href="https://neeed.directory/products/anymodelbot?utm_source=anymodelbot" target="_blank" rel="noopener">
+ <img src="https://neeed.directory/badges/neeed-badge-dark.svg" alt="Featured on neeed.directory" width="139" />
+</a>`,
+ },
+ {
+ name: "Turbo0",
+ html: `<a href="https://turbo0.com/item/anymodelbot" target="_blank" rel="noopener noreferrer">
+ <img src="https://img.turbo0.com/badge-listed-dark.svg" alt="Listed on Turbo0" style="height: 54px; width: auto;" />
+</a>`,
+ },
+ {
+ name: "Smol Launch",
+ html: `<a href="https://smollaunch.com" target="_blank" rel="noopener">
+ <img src="https://smollaunch.com/badges/featured-dark.svg" alt="AnyModelBot — Featured on Smol Launch" loading="lazy" width="250" height="60" />
+</a>`,
+ },
+ {
+ name: "IndieHunt",
+ html: `<a href="https://indiehunt.io/project/anymodelbot" target="_blank" rel="noopener">
+ <img src="https://indiehunt.io/badges/indiehunt-badge-dark.svg" alt="Featured on IndieHunt" width="265" height="58" />
+</a>`,
+ },
+ {
+ name: "Aidirs",
+ html: `<a href="https://aidirs.best" target="_blank" rel="noopener">
+ <img src="https://aidirs.best/dark.svg" alt="Featured on Aidirs" width="200" height="56" />
+</a>`,
+ },
+ {
+ name: "StartupTrusted",
+ html: `<a href="https://startuptrusted.com?ref=anymodel.bot" target="_blank" rel="noopener">
+ <img src="https://startuptrusted.com/api/badge?type=featured&style=dark" alt="AnyModelBot on StartupTrusted" width="240" height="54" />
+</a>`,
+ },
+ {
+ // 站方要求徽章长期保留
+ name: "Uno Directory",
+ html: `<a href="https://uno.directory" target="_blank" rel="noopener">
+ <img src="https://uno.directory/uno-directory.svg" alt="Listed on Uno Directory" width="120" height="30" />
+</a>`,
+ },
+ {
+ name: "Huzzler",
+ html: `<a href="https://huzzler.so/products/gZTJSjWHoU/anymodelbot?utm_source=huzzler_product_website&amp;utm_medium=badge&amp;utm_campaign=badge" target="_blank" rel="noopener noreferrer">
+ <img alt="Huzzler Embed Badge" src="https://huzzler.so/assets/images/embeddable-badges/featured.png" width="159" height="55" />
+</a>`,
+ },
+ {
+ name: "ShipBoost",
+ html: `<a href="https://shipboost.io/tools/anymodelbot" data-shipboost-badge="free-launch" target="_blank" rel="noopener">
+ <img src="https://shipboost.io/badge/cmvx0coz20001qh0t19nupsyp?theme=dark" alt="Featured on ShipBoost" width="244" height="56" style="width:244px;height:56px;" />
+</a>`,
+ },
+ {
+ // 站方只给了白色版,深色款是把地址里的 white 换成 dark;页脚必须放
+ name: "ShowMeBestAI",
+ html: `<a href="https://showmebest.ai" target="_blank"><img src="https://showmebest.ai/badge/feature-badge-white.webp" alt="Featured on ShowMeBestAI" width="220" height="60"></a>`,
+ dark: `<a href="https://showmebest.ai" target="_blank"><img src="https://showmebest.ai/badge/feature-badge-dark.webp" alt="Featured on ShowMeBestAI" width="220" height="60"></a>`,
+ },
+ {
+ // 站方要求:首页页脚、服务端输出,href 和 src 都不能改,不加 nofollow 和 utm
+ name: "ScrollLaunch",
+ html: `<a href="https://www.scrolllaunch.com/products/anymodelbot?ref=badge" target="_blank" rel="noopener">
+ <img src="https://www.scrolllaunch.com/api/badge/anymodelbot?variant=launched&theme=dark" alt="AnyModelBot - Featured on ScrollLaunch" width="220" height="48" />
+</a>`,
+ },
+ {
+ name: "AI Toolz Dir",
+ kind: "text",
+ html: `<a href="https://www.aitoolzdir.com" target="_blank">AI Toolz Dir</a>`,
+ },
+ {
+ name: "AI Tool Trek",
+ kind: "text",
+ html: `<a href='https://aitooltrek.com' title='AI Tool Trek'>AI Tool Trek</a>`,
+ },
+ {
+ name: "AI Hustle",
+ kind: "text",
+ html: `<a href="https://aihustle.tools" target="_blank">AI Hustle</a>`,
+ },
+ {
+ // 站方说链接或徽章都行;它的深色徽章内嵌超长 SVG,这里用最简的文字链接。必须放首页
+ name: "Bowora",
+ kind: "text",
+ html: `<a href="https://bowora.com/?via=6oyuqkbm" target="_blank">Featured on Bowora</a>`,
+ },
+ {
+ name: "AiToolSaver",
+ kind: "text",
+ html: `<a href="https://www.aitoolsaver.com" target="_blank">Featured on AiToolSaver</a>`,
+ },
];
diff --git a/site/src/scripts/badges.ts b/site/src/scripts/badges.ts
new file mode 100644
index 0000000..518605a
--- /dev/null
+++ b/site/src/scripts/badges.ts
@@ -0,0 +1,11 @@
+// 收录徽章:站方的图加载成功后,才显示出来盖住本地备份(样式和原因见 styles/footer.css)。
+// 失败不用处理:站方的图一直是透明的,格子里留着备份。
+const list = document.querySelector(".footer__badges");
+if (list) {
+ const reveal = (img: Element) => {
+ if (!img.matches(".footer__badge-copy")) img.closest(".footer__badge")?.classList.add("is-loaded");
+ };
+ // load 事件不冒泡,只能在捕获阶段收;脚本运行前就加载完的图错过了事件,单独补一次
+ list.addEventListener("load", (e) => { if (e.target instanceof HTMLImageElement) reveal(e.target); }, true);
+ list.querySelectorAll("img").forEach((img) => { if (img.complete && img.naturalWidth) reveal(img); });
+}
diff --git a/site/src/styles/footer.css b/site/src/styles/footer.css
index 093a60a..04ab249 100644
--- a/site/src/styles/footer.css
+++ b/site/src/styles/footer.css
@@ -19,20 +19,35 @@
.footer__cols ul { display: grid; gap: 10px; font-size: var(--fs-sm); }
.footer__cols a { color: var(--text-2); transition: color var(--dur-fast); }
.footer__cols a:hover { color: var(--text); text-decoration: none; }
- /* 收录徽章(data/badges.ts):原码各带各的尺寸和内联样式,图片统一成一个高度才排得齐,所以这里要 !important 盖过内联。
- 44px 不要再往小改:Aura++ 这类站方要求徽章不小于 150×44 */
+ /* 收录徽章(data/badges.ts):站方的徽章宽窄、高矮、底色各不相同,统一放进同样大小的格子,边框和底色由本站定。
+ 原码带着各自的尺寸和内联样式,所以下面要用 !important 盖过内联。
+ 图片高度 44px 不要再往小改:Aura++ 这类站方要求徽章不小于 150×44。格子最窄 216px,是因为最宽的 OpenHunts 在这个高度下有 204px */
.footer__featured { margin-top: 40px; }
- .footer__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
- .footer__badge { display: flex; }
+ .footer__badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 10px; }
+ .footer__badge { position: relative; display: grid; place-items: center; height: 56px; border: 1px solid var(--line); border-radius: var(--r-item); background: var(--bg-raised); transition: border-color var(--dur-fast); }
+ .footer__badge > * { grid-area: 1 / 1; }
+ .footer__badge:hover { border-color: var(--line-strong); }
[data-theme="dark"] .footer__badge[data-on="light"], [data-theme="light"] .footer__badge[data-on="dark"] { display: none; }
- .footer__badge:not([data-kind]) img { display: block; width: auto !important; height: 44px !important; max-width: none !important; }
- .footer__badge[data-kind="natural"] img { display: block; }
- .footer__badge[data-kind="text"] a { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-item); color: var(--text-2); font-size: var(--fs-xs); transition: color var(--dur-fast), border-color var(--dur-fast); }
- .footer__badge[data-kind="text"] a:hover { color: var(--text); border-color: var(--line-strong); text-decoration: none; }
- /* 手机上换行要占大半屏,改成贴边的一行横滑,右边露出半个徽章提示还能滑。只是摆放方式,HTML 不变,校验机器人照样读得到 */
+ /* 链接铺满整格,整格都能点 */
+ .footer__badge a { position: absolute; inset: 0; display: flex !important; align-items: center; justify-content: center; border-radius: var(--r-item); }
+ .footer__badge a:hover { text-decoration: none; }
+ .footer__badge img { display: block; }
+ .footer__badge:not([data-kind]) img { width: auto !important; height: 44px !important; max-width: none !important; }
+ .footer__badge[data-kind="natural"] img { width: auto; height: 32px; }
+ /* 站方的图加载成功才显示(scripts/badges.ts 加 is-loaded)。还在等、连不上或被插件拦截时,格子里显示的是 public/badges/ 的备份,
+ 不会出现破图图标和裸露的 alt 文字。没有 JS 时直接显示站方的图,备份垫在下面 */
+ .js .footer__badge:not(.is-loaded) a img { opacity: 0; }
+ .footer__badge.is-loaded .footer__badge-copy { display: none; }
+ /* 没有备份的徽章(badges.ts 的 noCopy):站方的图加载出来之前显示站名 */
+ .js .footer__badge[data-label]:not(.is-loaded)::before { content: attr(data-label); grid-area: 1 / 1; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
+ .footer__badge[data-kind="text"] a { color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; transition: color var(--dur-fast); }
+ .footer__badge[data-kind="text"] a:hover { color: var(--text); }
+ /* TopAITools4U 是站方用内联样式画的白底卡片,这里去掉它自己的底色和边框,字色跟主题走 */
+ .footer__badge[data-kind="html"] a { padding: 0 !important; border: 0 !important; background: none !important; color: var(--text) !important; font-family: inherit !important; }
+ .footer__badge[data-kind="html"] a > span > span:first-child { color: var(--text-2) !important; }
+ /* 手机上排成网格会有十几屏长,改成贴边的三行横滑,右边露出半格提示还能滑。只是摆放方式,HTML 不变,校验机器人照样读得到 */
@media (max-width: 767px) {
- .footer__badges { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
- .footer__badge { flex: none; }
+ .footer__badges { grid-template-columns: none; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: 216px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
}
.footer__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-2); }
.footer__switch { margin-left: auto; display: flex; gap: 16px; }