diff --git a/docs/components/FloatingSponsorCard.tsx b/docs/components/FloatingSponsorCard.tsx index d548f660df..5b606d22ce 100644 --- a/docs/components/FloatingSponsorCard.tsx +++ b/docs/components/FloatingSponsorCard.tsx @@ -4,20 +4,34 @@ import { X } from "lucide-react"; import { useEffect, useState } from "react"; const DISMISS_STORAGE_KEY = "dbx.docs.sponsorCard.dismissedAt"; -// 关闭 7 天后重新出现 -const RESURFACE_MS = 7 * 24 * 60 * 60 * 1000; +// 关闭后第二天(24 小时)重新出现 +const RESURFACE_MS = 24 * 60 * 60 * 1000; -const RAINYUN_URL = "https://www.rainyun.com/MTE5Mjc4Ng==_"; +// 悬浮赞助位:固定展示全部赞助商 +const SPONSORS = [ + { + href: "https://www.jumpserver.org/", + logo: "/sponsors/jumpserver-card.png", + alt: "JumpServer", + cnTagline: "广受欢迎的开源堡垒机", + enTagline: "Widely popular open-source bastion host", + }, + { + href: "https://www.rainyun.com/MTE5Mjc4Ng==_", + logo: "/sponsors/rainyun-card.png", + alt: "RainYun", + cnTagline: "云服务器 · 游戏云 · 物理服务器", + enTagline: "Cloud servers, game hosting & bare metal", + }, +] as const; const COPY = { cn: { badge: "赞助商", - tagline: "云服务器 · 游戏云 · 物理服务器", closeLabel: "关闭赞助卡片", }, en: { badge: "Sponsor", - tagline: "Cloud servers, game hosting & bare metal", closeLabel: "Dismiss sponsor card", }, } as const; @@ -65,13 +79,24 @@ export function FloatingSponsorCard({ lang }: { lang: string }) { - - {/* 品牌图为白底,暗色主题下需显式白底容器承载 */} - - RainYun - - {t.tagline} - + {SPONSORS.map((sponsor, index) => { + const tagline = lang === "cn" ? sponsor.cnTagline : sponsor.enTagline; + return ( + 0 ? "mt-2 border-t border-fd-border pt-2.5" : "mt-1.5"}`} + > + {/* 品牌图为白底,暗色主题下需显式白底容器承载 */} + + {sponsor.alt} + + {tagline} + + ); + })} ); }