🤖 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.
Python ai-agentai-assistantchatbotclaudecomputer-usedeepseekdesktop-appdshelectronfeishugeminigptgrokllmlocal-firstmodelflaremulti-modelopenai-compatiblepersonal-ai-agentwechat
feat(site): 页脚收录徽章改成等高排列,默认收起,可展开全部
dyk98d3b4488caab7
diff --git a/site/scripts/check-images.ts b/site/scripts/check-images.tsindex 04ea619..2741cfc 100644--- a/site/scripts/check-images.ts+++ b/site/scripts/check-images.ts@@ -39,8 +39,11 @@ for (const f of files.filter((f) => /^bots\/.+\.webp$/.test(f))) {if (!files.includes(`bots/${key}.avif`) || avifOf[key] !== hash) bad.push(`bots/${key}.avif 不是从当前的 ${f} 生成的(npm run bots:avif 重新生成)`);}// 每张图片徽章都要有本地备份,否则站方的图连不上时格子是空的(styles/footer.css)+// 也要有宽高比,否则页脚只能按默认宽度摆,图片会变小(styles/footer.css 的 --r)+const badgeRatios: Record<string, number> = JSON.parse(fs.readFileSync(path.join(root, "src/data/badge-ratios.json"), "utf8"));for (const { copy } of BADGES.flatMap(badgeVariants)) {if (copy && !files.includes(copy.path)) bad.push(`${copy.path} 不存在(npm run badges:copies 重新生成)`);+ else if (copy && !badgeRatios[copy.path]) bad.push(`${copy.path} 在 badge-ratios.json 里没有宽高比(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)`);diff --git a/site/scripts/make-badge-copies.ts b/site/scripts/make-badge-copies.tsindex db72b59..9225a09 100644--- a/site/scripts/make-badge-copies.ts+++ b/site/scripts/make-badge-copies.ts@@ -2,7 +2,8 @@// 页面 HTML 里的站方原码不变,校验机器人读到的还是站方的图片地址;备份只是垫在下面(styles/footer.css)。//// 一律转成 WebP:大的 SVG 有几十 KB,放不进 check-images 的 SVG 预算;转成位图也就不用在自家域名上托管第三方 SVG。-// 高度 88px:页脚格子里最高显示 30px,三倍屏也够清晰。+// 高度 88px:页脚的徽章高 30px,三倍屏也够清晰。+// 同时把每张图的宽高比写进 src/data/badge-ratios.json:页脚按它给徽章定宽,图片加载前就占好位,不会把一排挤乱。//// 用法:npm run badges:copies(需要联网)。data/badges.ts 新增或换了图片徽章后要重跑,check-images 会查缺的文件。import fs from "node:fs";@@ -23,6 +24,7 @@ function narrowFont(file: Buffer) {}const failed: string[] = [];+const ratios: Record<string, number> = {};const copies = BADGES.flatMap(badgeVariants).flatMap((v) => v.copy ?? []);for (const copy of copies) {try {@@ -33,6 +35,7 @@ for (const copy of copies) {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);+ ratios[copy.path] = +(info.width / info.height).toFixed(2);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}`);@@ -42,6 +45,7 @@ if (failed.length) {console.error(`✗ 这些徽章没有生成备份:\n ${failed.join("\n ")}`);process.exit(1);}+fs.writeFileSync(path.join(path.dirname(out), "src/data/badge-ratios.json"), JSON.stringify(ratios, null, 2) + "\n");// 全部成功才清理:徽章换了款或删掉后,旧备份不留在 public/ 里const dir = path.join(out, "badges");const keep = new Set(copies.map((c) => path.basename(c.path)));diff --git a/site/src/components/Footer.astro b/site/src/components/Footer.astroindex e41a56d..c2a5ca5 100644--- a/site/src/components/Footer.astro+++ b/site/src/components/Footer.astro@@ -1,15 +1,17 @@---// 页脚:品牌(标记 + 一句话)| 三栏链接 → 收录徽章 → 版权行 → 眼睛田。-// 收录徽章的原码和取舍见 data/badges.ts:要写进静态 HTML,校验机器人不跑 JS。+// 收录徽章的原码和取舍见 data/badges.ts:要写进静态 HTML,校验机器人不跑 JS。默认收起成一两排,只是样式,HTML 里始终是全部徽章。// 眼睛田是页脚最下面的大字标:AnyModelBot 由几百枚迷你 Eyes 标记拼成,跟着指针看、点一下发消息、定时"换脑"(scripts/eyefield.ts)。// 纯装饰(aria-hidden),没有 JS 时整块不显示;样式在 styles/footer.css。import "../styles/footer.css";import EyesMark from "./EyesMark.astro";-import { dict, href, altLang, switchHref, type Lang } from "../i18n";+import Icon from "./Icon.astro";+import { dict, fmt, 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, badgeVariants } from "../data/badges";+import badgeRatios from "../data/badge-ratios.json";interface Props { lang: Lang; path: string }const { lang, path } = Astro.props;const t = dict(lang);@@ -27,7 +29,15 @@ const other = altLang(lang);const models = pickModels(pricing.rows);// 图片懒加载:被隐藏的那个主题款不会发请求,页面也只在快到页脚时才请求这些外部图片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) })));+// 有深色款的排最前面:收起时露出来的第一排,在两个主题下都和页面底色协调+const ratios: Record<string, number> = badgeRatios;+const badges = [...BADGES.filter((b) => b.dark), ...BADGES.filter((b) => !b.dark)].flatMap((b) => badgeVariants(b).map((v) => ({+ ...v,+ kind: b.kind,+ label: b.noCopy ? b.name : undefined,+ ratio: v.copy ? ratios[v.copy.path] : b.ratio,+ html: lazy(v.html),+})));---<footer class="footer"><div class="container footer__inner">@@ -50,9 +60,14 @@ const badges = BADGES.flatMap((b) => badgeVariants(b).map((v) => ({ ...v, kind:</div><div class="container footer__featured"><h2 class="footer__title">{t.footer.featured}</h2>- <ul class="footer__badges" role="list">+ <button class="footer__more" type="button" aria-expanded="false" aria-controls="footer-badges">+ <span data-when="closed">{fmt(t.footer.featuredMore, { count: BADGES.length })}</span>+ <span data-when="open">{t.footer.featuredLess}</span>+ <Icon name="chevron" size={14} />+ </button>+ <ul class="footer__badges" id="footer-badges" role="list">{badges.map((b) => (- <li class="footer__badge" data-kind={b.kind} data-on={b.on} data-label={b.label}>+ <li class="footer__badge" data-kind={b.kind} data-on={b.on} data-label={b.label} style={b.ratio ? `--r:${b.ratio}` : undefined}>{b.copy && <img class="footer__badge-copy" src={`/${b.copy.path}`} alt="" loading="lazy" decoding="async" />}<Fragment set:html={b.html} /></li>diff --git a/site/src/data/badge-ratios.json b/site/src/data/badge-ratios.jsonnew file mode 100644index 0000000..ebf762d--- /dev/null+++ b/site/src/data/badge-ratios.json@@ -0,0 +1,36 @@+{+ "badges/whatsthebigdata.webp": 3.07,+ "badges/marketingdb.webp": 4.17,+ "badges/mydentify.webp": 5.5,+ "badges/deeplaunch-io-dark.webp": 3.48,+ "badges/deeplaunch-io-light.webp": 3.48,+ "badges/dofollow-tools-dark.webp": 3.48,+ "badges/dofollow-tools-light.webp": 3.48,+ "badges/tooldirs-dark.webp": 3.16,+ "badges/tooldirs-light.webp": 3.16,+ "badges/twelve-tools-dark.webp": 3.7,+ "badges/twelve-tools-light.webp": 3.7,+ "badges/nick-launches-dark.webp": 4.28,+ "badges/nick-launches-light.webp": 4.28,+ "badges/launch-llama-dark.webp": 3.77,+ "badges/launch-llama-light.webp": 3.82,+ "badges/aura-dark.webp": 3.41,+ "badges/aura-light.webp": 3.41,+ "badges/openhunts.webp": 4.63,+ "badges/saascity.webp": 2.63,+ "badges/toolpilot.webp": 4.55,+ "badges/findly-tools.webp": 3.16,+ "badges/fazier.webp": 4.23,+ "badges/neeed-directory.webp": 3.16,+ "badges/turbo0.webp": 2.99,+ "badges/smol-launch.webp": 4.17,+ "badges/indiehunt.webp": 3.44,+ "badges/aidirs.webp": 3.57,+ "badges/startuptrusted.webp": 4.44,+ "badges/uno-directory.webp": 3.32,+ "badges/huzzler.webp": 2.89,+ "badges/shipboost.webp": 4.35,+ "badges/showmebestai-dark.webp": 4,+ "badges/showmebestai-light.webp": 4,+ "badges/scrolllaunch.webp": 4.58+}diff --git a/site/src/data/badges.ts b/site/src/data/badges.tsindex 920c8e4..437d184 100644--- a/site/src/data/badges.ts+++ b/site/src/data/badges.ts@@ -16,13 +16,15 @@ export interface Badge {/** 站方的深色款,深色主题用 */dark?: string;/**- * 默认:图片徽章,在格子里等比缩放。+ * 默认:图片徽章,等高排列,宽度跟着图片自己的比例走。* text:站方只要一条文字链接。* html:站方用 HTML 画的徽章,页脚的样式会盖掉它自带的底色和边框。*/kind?: "text" | "html";- /** 取不到站方的图,没有本地备份:站方的图加载出来之前,格子里显示站名 */+ /** 取不到站方的图,没有本地备份:站方的图加载出来之前,徽章的位置上显示站名 */noCopy?: boolean;+ /** 没有备份的图片徽章的宽高比,取站方原码的 width / height。有备份的不用写,量备份得到(badge-ratios.json) */+ ratio?: number;}export interface BadgeVariant {@@ -136,6 +138,7 @@ export const BADGES: Badge[] = [// 站方开了 Vercel 安全检查,服务器请求这张图只拿到 429 和验证页(2026-11-01),所以没有备份;访客的浏览器能否加载也不确定name: "Startup Fame",noCopy: true,+ ratio: 3.17,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>`,},{diff --git a/site/src/i18n/en.ts b/site/src/i18n/en.tsindex b54ff15..32b499d 100644--- a/site/src/i18n/en.ts+++ b/site/src/i18n/en.ts@@ -408,6 +408,8 @@ export const en: Dict = {art: "Character art © the AnyModelBot project",tagline: "AI teammates that live on your machine. One key for every major model — swap brains any time.",featured: "Featured on",+ featuredMore: "Show all {count}",+ featuredLess: "Show less",// Footer eye field: the wordmark is made of a crowd of bot facesfieldHint: "Click to message them all",fieldModel: "Brain",diff --git a/site/src/i18n/zh.ts b/site/src/i18n/zh.tsindex e3db8e1..a6dedfa 100644--- a/site/src/i18n/zh.ts+++ b/site/src/i18n/zh.ts@@ -414,6 +414,8 @@ export const zh = {art: "角色插画 © AnyModelBot 项目",tagline: "住在你电脑里的 AI 搭子。一个 Key,畅用主流模型,随时换脑。",featured: "被收录于",+ featuredMore: "展开全部 {count} 个",+ featuredLess: "收起",// 页脚眼睛田:字标由一群机器人的脸拼成fieldHint: "点一下,给它们发条消息",fieldModel: "换脑",diff --git a/site/src/scripts/badges.ts b/site/src/scripts/badges.tsindex 518605a..b54eb42 100644--- a/site/src/scripts/badges.ts+++ b/site/src/scripts/badges.ts@@ -1,7 +1,10 @@-// 收录徽章:站方的图加载成功后,才显示出来盖住本地备份(样式和原因见 styles/footer.css)。-// 失败不用处理:站方的图一直是透明的,格子里留着备份。-const list = document.querySelector(".footer__badges");+// 收录徽章的两件事(样式和原因见 styles/footer.css)。+const root = document.querySelector<HTMLElement>(".footer__featured");+const list = root?.querySelector<HTMLElement>(".footer__badges");+const more = root?.querySelector<HTMLButtonElement>(".footer__more");+if (list) {+ // 站方的图加载成功后,才显示出来盖住本地备份。失败不用处理:站方的图一直是透明的,留着备份。const reveal = (img: Element) => {if (!img.matches(".footer__badge-copy")) img.closest(".footer__badge")?.classList.add("is-loaded");};@@ -9,3 +12,25 @@ if (list) {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); });}++if (root && list && more) {+ // 展开和收起。高度过渡用 Web Animations 做:结束后高度交回给 CSS,窗口再怎么变都不用重新量+ const reduced = matchMedia("(prefers-reduced-motion: reduce)");+ let anim: Animation | undefined;+ const setOpen = (open: boolean) => {+ const from = list.getBoundingClientRect().height;+ anim?.cancel(); // 上一次还没播完时,先量到当前位置再取消,否则量不到新状态的真实高度+ root.classList.toggle("is-open", open);+ more.setAttribute("aria-expanded", String(open));+ if (reduced.matches) return;+ const to = list.getBoundingClientRect().height;+ // max-height 要一起动:收起时 CSS 的 max-height 立刻生效,只动 height 会直接跳过去+ anim = list.animate({ height: [`${from}px`, `${to}px`], maxHeight: [`${from}px`, `${to}px`] }, { duration: 240, easing: "cubic-bezier(.2, .8, .2, 1)" });+ };+ more.addEventListener("click", () => setOpen(!root.classList.contains("is-open")));+ // 被裁掉的链接还在 Tab 顺序里:键盘走到折叠线以下时自动展开,焦点不会落到看不见的地方+ list.addEventListener("focusin", (e) => {+ if (root.classList.contains("is-open") || !(e.target instanceof Element)) return;+ if (e.target.getBoundingClientRect().top >= list.getBoundingClientRect().bottom) setOpen(true);+ });+}diff --git a/site/src/styles/footer.css b/site/src/styles/footer.cssindex f3fa998..318ae99 100644--- a/site/src/styles/footer.css+++ b/site/src/styles/footer.css@@ -19,40 +19,63 @@.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):几十个站方徽章,只是页脚的一条署名,要紧凑、不抢眼。- 统一放进小格子,图片在格子里等比缩放(object-fit),原码的尺寸和内联样式都用 !important 盖掉;平时灰阶,指到时恢复原色。- HTML 里的站方原码不变,校验机器人读到的 width / height 还是站方给的 */- .footer__featured { margin-top: 32px; }- .footer__featured .footer__title { margin-bottom: 10px; }- .footer__badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }- .footer__badge { position: relative; display: grid; place-items: center; height: 38px; border-radius: 8px; background: var(--hover); filter: grayscale(1); opacity: .82; transition: filter var(--dur-fast), opacity var(--dur-fast); }+ /* 收录徽章(data/badges.ts):只是页脚的一条署名,要窄、要安静。上下两条细线夹成一条带子:标题 | 徽章 | 展开按钮,窄屏时标题和按钮在徽章上面。+ 这些徽章本身就是设计好的小卡片,所以不再套格子:全部等高,宽度 = 高度 × 图片自己的宽高比(--r,来自 data/badge-ratios.json),不留白也不变形。+ 平时灰阶,指到时恢复原色。原码的尺寸和内联样式用 !important 盖掉,HTML 里的站方原码不变,校验机器人读到的 width / height 还是站方给的。+ 默认收起到 --badge-rows 排(scripts/badges.ts 切 is-open)。只是把多的裁掉,HTML 里始终是全部徽章;没有 JS 时全部显示,也没有按钮 */+ .footer__featured { --badge-h: 30px; --badge-gap-x: 10px; --badge-gap-y: 8px; --badge-rows: 1; --badge-ring: 4px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }+ .footer__featured .footer__title { grid-column: 1; grid-row: 1; margin: 0; line-height: var(--badge-h); white-space: nowrap; }++ .footer__more { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; gap: 4px; height: var(--badge-h); color: var(--text-2); font-size: var(--fs-xs); white-space: nowrap; transition: color var(--dur-fast); }+ .footer__more:hover { color: var(--text); }+ .footer__more svg { transition: rotate var(--dur-fast); }+ .footer__more[aria-expanded="true"] svg { rotate: 180deg; }+ .footer__more[aria-expanded="true"] [data-when="closed"], .footer__more[aria-expanded="false"] [data-when="open"] { display: none; }+ html:not(.js) .footer__more { display: none; }++ /* 四周多出 --badge-ring 的内边距,再用负外边距抵消:裁切线在内边距外沿,键盘焦点框不会被切。比行距小一半,下一排也不会露头 */+ .footer__badges { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--badge-gap-y) var(--badge-gap-x); padding: var(--badge-ring); margin: calc(-1 * var(--badge-ring)); overflow: hidden; overflow: clip; }+ /* 每排两端对齐,最后一排不够满时靠左,别被拉散 */+ .footer__badges::after { content: ""; flex: 999 0 0; }+ html.js .footer__featured:not(.is-open) .footer__badges { max-height: calc(var(--badge-rows) * var(--badge-h) + (var(--badge-rows) - 1) * var(--badge-gap-y) + 2 * var(--badge-ring)); }++ .footer__badge { position: relative; flex: none; display: grid; place-items: center; width: calc(var(--badge-h) * var(--r, 3.6)); height: var(--badge-h); filter: grayscale(1); opacity: .78; transition: filter var(--dur-fast), opacity var(--dur-fast); }.footer__badge:hover, .footer__badge:focus-within { filter: none; opacity: 1; }[data-theme="dark"] .footer__badge[data-on="light"], [data-theme="light"] .footer__badge[data-on="dark"] { display: none; }- /* 链接铺满整格,整格都能点 */- .footer__badge a { position: absolute; inset: 0; display: flex !important; align-items: center; justify-content: center; padding: 4px; border-radius: 8px; }+ .footer__badge a { display: flex !important; align-items: center; justify-content: center; border-radius: 6px; }.footer__badge a:hover { text-decoration: none; }.footer__badge img { display: block; }- .footer__badge:not([data-kind]) a img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; }- .footer__badge-copy { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); max-width: none; object-fit: contain; }- /* 站方的图加载成功才显示(scripts/badges.ts 加 is-loaded)。还在等、连不上或被插件拦截时,格子里显示的是 public/badges/ 的备份,+ /* 图片徽章:链接铺满整个徽章。站方的图直角、圆角都有,统一修一点圆角 */+ .footer__badge:not([data-kind]) a { position: absolute; inset: 0; }+ .footer__badge:not([data-kind]) a img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; border-radius: 5px; }+ .footer__badge-copy { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; border-radius: 5px; }+ /* 站方的图加载成功才显示(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)在站方的图加载出来之前显示的站名 */- .footer__badge[data-kind="text"] a, .js .footer__badge[data-label]:not(.is-loaded)::before { color: var(--text-2); font-size: 11.5px; font-weight: 500; line-height: 1.2; text-align: center; }- .js .footer__badge[data-label]:not(.is-loaded)::before { content: attr(data-label); }- .footer__badge[data-kind="text"] a { padding: 0 8px; 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; gap: 6px !important; border: 0 !important; background: none !important; color: var(--text) !important; font-family: inherit !important; }- .footer__badge[data-kind="html"] a img { flex: none; width: 20px !important; height: 20px !important; border-radius: 5px !important; }- .footer__badge[data-kind="html"] a > span > span:first-child { color: var(--text-2) !important; font-size: 8.5px !important; }+ /* 没有备份的徽章(badges.ts 的 noCopy)在站方的图加载出来之前,显示站名 */+ .js .footer__badge[data-label]:not(.is-loaded) { border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }+ .js .footer__badge[data-label]:not(.is-loaded)::before { content: attr(data-label); color: var(--text-2); font-size: 11.5px; font-weight: 500; line-height: 1.2; text-align: center; }+ /* 没有图的徽章宽度跟着文字走,和图片徽章等高、描一圈细边,排在一起像同一套 */+ .footer__badge[data-kind] { width: auto; }+ .footer__badge[data-kind="text"] a { height: var(--badge-h); padding-inline: 12px; border: 1px solid var(--line); color: var(--text-2); font-size: 11.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; transition: color var(--dur-fast), border-color var(--dur-fast); }+ .footer__badge[data-kind="text"] a:hover { border-color: var(--line-strong); color: var(--text); }+ /* TopAITools4U 是站方用内联样式画的白底卡片:去掉它自己的底色,边框换成同一圈细边,字色跟主题走,图标和字号缩到放得下 */+ .footer__badge[data-kind="html"] a { height: var(--badge-h); padding: 0 10px !important; gap: 6px !important; border: 1px solid var(--line) !important; border-radius: 6px !important; background: none !important; color: var(--text) !important; font-family: inherit !important; white-space: nowrap; }+ .footer__badge[data-kind="html"] a img { flex: none; width: 18px !important; height: 18px !important; border-radius: 4px !important; }+ .footer__badge[data-kind="html"] a > span > span:first-child { color: var(--text-2) !important; font-size: 8px !important; }.footer__badge[data-kind="html"] a > span > span:last-child { font-size: 11.5px !important; }- /* 手机上排成网格仍然很长,改成贴边的三行横滑,右边露出半格提示还能滑。只是摆放方式,HTML 不变 */+ @media (max-width: 1023px) {+ .footer__featured { grid-template-columns: minmax(0, 1fr) auto; }+ .footer__more { grid-column: 2; }+ .footer__badges { grid-column: 1 / -1; grid-row: 2; }+ }+ /* 手机一排只放得下两三个,两端对齐会在中间拉出大缝,改成靠左;收起时留两排 */@media (max-width: 767px) {- .footer__badges { grid-template-columns: none; grid-template-rows: repeat(3, 38px); grid-auto-flow: column; grid-auto-columns: 124px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }+ .footer__featured { --badge-h: 28px; --badge-gap-x: 8px; --badge-rows: 2; }+ .footer__badges { justify-content: flex-start; }}- .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__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-2); }.footer__switch { margin-left: auto; display: flex; gap: 16px; }.footer__switch a, .footer__switch button { color: var(--text-2); font-size: var(--fs-xs); transition: color var(--dur-fast); }.footer__switch a:hover, .footer__switch button:hover { color: var(--text); text-decoration: none; }