同步收敛灵感发现模块与查看全部字号
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-13 23:29:34 +08:00
parent be9322583e
commit 335a6da684

View File

@ -588,11 +588,11 @@ export function LovartHome({
<h2 className="text-[18px] font-semibold tracking-tight">最近项目</h2>
<button
type="button"
className="inline-flex items-center gap-1 text-base text-black/45 hover:text-black"
className="inline-flex items-center gap-1 text-[13px] text-black/45 hover:text-black"
onClick={() => router.push("/canvas")}
>
查看全部
<ArrowRight className="h-4 w-4" />
<ArrowRight className="h-3.5 w-3.5" />
</button>
</div>
@ -642,15 +642,15 @@ export function LovartHome({
</section>
<section className="mt-16">
<h2 className="text-3xl font-semibold tracking-tight">灵感发现</h2>
<h2 className="text-[18px] font-semibold tracking-tight">灵感发现</h2>
<div className="mt-4 flex flex-wrap gap-2">
<div className="mt-3 flex flex-wrap gap-1.5">
{discoveryTabs.map((category) => (
<button
key={category}
type="button"
onClick={() => setActiveCategory(category)}
className={`rounded-xl px-4 py-2 text-sm ${
className={`rounded-xl px-3 py-1.5 text-[12px] ${
activeCategory === category
? "bg-[#ececec] text-black"
: "text-black/55 hover:bg-white"
@ -667,7 +667,7 @@ export function LovartHome({
key={item.id}
type="button"
onClick={() => window.open(item.originalUrl || item.thumbnailUrl, "_blank")}
className="mb-4 block w-full break-inside-avoid rounded-2xl border border-black/8 bg-white text-left shadow-sm"
className="group mb-4 block w-full break-inside-avoid rounded-2xl border border-black/8 bg-white text-left shadow-sm"
>
<div
className="overflow-hidden rounded-t-2xl bg-[#e8e8e8]"
@ -676,20 +676,20 @@ export function LovartHome({
<img
src={item.thumbnailUrl || item.originalUrl}
alt={item.prompt || "灵感图"}
className="h-full w-full object-cover"
className="h-full w-full object-cover transition-transform duration-300 ease-out group-hover:scale-[1.02]"
/>
</div>
<div className="flex items-center justify-between px-3 py-2 text-sm text-black/60">
<div className="flex items-center justify-between px-3 py-2 text-[12px] text-black/60">
<div className="line-clamp-1 font-medium text-black/85">
{item.user?.name || "创作者"}
</div>
<div className="inline-flex items-center gap-2 text-xs">
<div className="inline-flex items-center gap-2 text-[11px]">
<span className="inline-flex items-center gap-1">
<Sparkles className="h-3 w-3" />
<Sparkles className="h-2.5 w-2.5" />
{(1200 + index * 37).toLocaleString()}
</span>
<span className="inline-flex items-center gap-1">
<Heart className="h-3 w-3" />
<Heart className="h-2.5 w-2.5" />
{(20 + (index % 9) * 11).toLocaleString()}
</span>
</div>