Skip to content

Commit 135cdf3

Browse files
sktbrdclaude
andcommitted
fix(newhome): follow the theme toggle; drop the chest's green halo
/newhome was pinned dark. It painted its own near-black ground over the whole viewport and hardcoded every grey, so the theme toggle did nothing on the route. The chrome is expressed as the app's semantic tokens now — background, foreground, card, muted, border — which already flip with `.dark`. Brand accents stay literal: gold, the status greens and reds, and the rarity colours carry meaning and read on either ground. Two things needed more than a class swap: - The hero headline is `bg-clip-text` over a gradient. Hardcoded to near-white it was invisible on a light ground, so the gradient is built from `var(--foreground)` and tracks the theme. - The auction's inactive badge and the proposals' neutral vote tone were literal `rgba(255,255,255,…)`; both are `color-mix` against the foreground token now. Set pieces stay dark on purpose — the CRT, the foil bounty table and the globe panel are objects on a stage, like a photo or a video player, and they read against a light page rather than inverting with it. Also removes the green halo behind the rewards chest: the float and the badge already say something is there, and it painted a green disc behind a gold object. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 88cab9b commit 135cdf3

11 files changed

Lines changed: 82 additions & 78 deletions

File tree

src/app/[locale]/newhome/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ export default async function NewHome({ params }: { params: Promise<{ locale: st
6868
];
6969

7070
return (
71-
<div className="relative -mx-4 flex flex-1 flex-col text-neutral-50">
71+
<div className="relative -mx-4 flex flex-1 flex-col text-foreground">
7272
{/* Full-viewport ground. A fixed backdrop rather than a 100vw block: the
7373
page lives inside the layout's centred `main`, and widening past it
74-
would add a horizontal scrollbar on every platform that reserves one. */}
75-
<div aria-hidden className="fixed inset-0 -z-10 bg-[#0a0a0a]" />
74+
would add a horizontal scrollbar on every platform that reserves one.
75+
`bg-background` rather than a hardcoded near-black: this route used to
76+
be pinned dark and ignored the theme toggle entirely. */}
77+
<div aria-hidden className="fixed inset-0 -z-10 bg-background" />
7678

7779
<HeroSection stats={heroStats} />
7880
<TVHeroSection />

src/components/newhome/AuctionPanel.tsx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export function AuctionPanel() {
130130
style={
131131
isLive
132132
? { backgroundImage: GOLD, color: "#1a1205" }
133-
: { background: "rgba(255,255,255,.08)", color: "#a3a3a3" }
133+
: {
134+
background: "color-mix(in oklab,var(--foreground) 8%,transparent)",
135+
color: "var(--muted-foreground)",
136+
}
134137
}
135138
>
136139
<span
@@ -144,24 +147,26 @@ export function AuctionPanel() {
144147
/>
145148
{isLive ? t("liveAuction") : t("awaitingSettlement")}
146149
</span>
147-
<div className="flex gap-[3px] font-mono text-[15px] font-bold text-neutral-50">
150+
<div className="flex gap-[3px] font-mono text-[15px] font-bold text-foreground">
148151
{countdown ? (
149152
[countdown.hours, countdown.minutes, countdown.seconds].map((part, i) => (
150153
<span key={i} className="flex items-center gap-[3px]">
151-
{i > 0 && <span className="text-neutral-500">:</span>}
154+
{i > 0 && <span className="text-muted-foreground/70">:</span>}
152155
<span className="rounded-[5px] bg-black px-[7px] py-[3px] tabular-nums">
153156
{part}
154157
</span>
155158
</span>
156159
))
157160
) : (
158-
<span className="rounded-[5px] bg-black px-[7px] py-[3px] text-neutral-600">--</span>
161+
<span className="rounded-[5px] bg-foreground/10 px-[7px] py-[3px] text-muted-foreground">
162+
--
163+
</span>
159164
)}
160165
</div>
161166
</div>
162167

163168
{/* The Gnar */}
164-
<div className="relative aspect-square overflow-hidden rounded-[14px] border-2 border-[#f7c948]/55 bg-neutral-800 shadow-[0_0_0_5px_rgba(247,201,72,.08),inset_0_0_34px_rgba(245,133,31,.18)]">
169+
<div className="relative aspect-square overflow-hidden rounded-[14px] border-2 border-[#f7c948]/55 bg-muted shadow-[0_0_0_5px_rgba(247,201,72,.08),inset_0_0_34px_rgba(245,133,31,.18)]">
165170
<GnarImageTile tokenId={Number(tokenId || 0)} imageUrl={imageUrl} />
166171
{tokenId != null && (
167172
<span className="absolute left-2.5 top-2.5 rounded-lg bg-[#0a0908]/70 px-2.5 py-1 font-mono text-xs font-bold text-[#f7c948] backdrop-blur-sm">
@@ -171,7 +176,7 @@ export function AuctionPanel() {
171176
{/* An auction that closed without a bid reports the zero address as its
172177
"winner" — crowning that reads as a real leader, so it is dropped. */}
173178
{displayBidder && !ZERO_BIDDER.test(displayBidder) && (
174-
<span className="absolute right-2.5 top-2.5 flex items-center gap-1.5 rounded-lg bg-[#0a0908]/70 px-2.5 py-1 text-[11px] font-bold text-neutral-50 backdrop-blur-sm">
179+
<span className="absolute right-2.5 top-2.5 flex items-center gap-1.5 rounded-lg bg-[#0a0908]/70 px-2.5 py-1 text-[11px] font-bold text-foreground backdrop-blur-sm">
175180
👑 {truncateAddress(displayBidder)}
176181
</span>
177182
)}
@@ -180,7 +185,7 @@ export function AuctionPanel() {
180185
{/* Current bid + time elapsed */}
181186
<div>
182187
<div className="mb-[7px] flex items-baseline justify-between gap-3">
183-
<span className="shrink-0 text-[11px] font-semibold uppercase tracking-[0.14em] text-neutral-400">
188+
<span className="shrink-0 text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground">
184189
{t("currentBid")}
185190
</span>
186191
<span
@@ -190,14 +195,14 @@ export function AuctionPanel() {
190195
{displayBid ? Number(displayBid).toFixed(3) : "0.000"} ETH
191196
</span>
192197
</div>
193-
<div className="flex h-2.5 overflow-hidden rounded-full border border-white/[0.06] bg-neutral-800">
198+
<div className="flex h-2.5 overflow-hidden rounded-full border border-border bg-muted">
194199
<span
195200
className="block h-full rounded-full bg-[linear-gradient(90deg,#f59e0b,#FF2D2D)] transition-[width] duration-1000"
196201
style={{ width: `${elapsedPct}%` }}
197202
/>
198203
</div>
199204
{leadingComment && displayBidder && !ZERO_BIDDER.test(displayBidder) && (
200-
<p className="mt-1.5 text-[11.5px] italic text-neutral-400">
205+
<p className="mt-1.5 text-[11.5px] italic text-muted-foreground">
201206
{leadingComment}” — {truncateAddress(displayBidder ?? "")}
202207
</p>
203208
)}
@@ -206,7 +211,7 @@ export function AuctionPanel() {
206211
{/* Leaderboard */}
207212
{bids.length > 0 && (
208213
<div className="flex flex-col gap-1.5 rounded-xl border border-white/[0.07] bg-black/25 p-3">
209-
<span className="text-[10.5px] font-bold uppercase tracking-[0.14em] text-neutral-400">
214+
<span className="text-[10.5px] font-bold uppercase tracking-[0.14em] text-muted-foreground">
210215
{t("leaderboard", { count: bids.length })}
211216
</span>
212217
{bids.slice(0, 4).map((bid, i) => (
@@ -222,10 +227,10 @@ export function AuctionPanel() {
222227
className="size-[18px] shrink-0 rounded-full"
223228
style={{ backgroundImage: avatarGradient(bid.bidder) }}
224229
/>
225-
<span className="flex-1 truncate text-[12.5px] font-medium text-neutral-200">
230+
<span className="flex-1 truncate text-[12.5px] font-medium text-foreground/85">
226231
{truncateAddress(bid.bidder)}
227232
</span>
228-
<span className="font-mono text-[12.5px] font-bold tabular-nums text-neutral-50">
233+
<span className="font-mono text-[12.5px] font-bold tabular-nums text-foreground">
229234
{Number(formatEther(BigInt(bid.amount))).toFixed(3)} Ξ
230235
</span>
231236
</div>
@@ -245,7 +250,7 @@ export function AuctionPanel() {
245250
<AuctionSettleButton isWinner={!!isWinner} />
246251
)}
247252

248-
<p className="text-xs leading-[1.5] text-neutral-500">{t("auctionFootnote")}</p>
253+
<p className="text-xs leading-[1.5] text-muted-foreground/70">{t("auctionFootnote")}</p>
249254
</div>
250255
);
251256
}

src/components/newhome/BountiesSection.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,29 @@ export function BountiesSection({
149149
/>
150150

151151
{isLoading && hand.length === 0 ? (
152-
<div className="flex h-[420px] items-center justify-center rounded-[22px] border border-white/[0.07] bg-[#060606] font-mono text-sm text-neutral-500">
152+
<div className="flex h-[420px] items-center justify-center rounded-[22px] border border-border bg-muted/30 font-mono text-sm text-muted-foreground/70">
153153
154154
</div>
155155
) : (
156156
<BountyCardFan cards={hand} />
157157
)}
158158

159-
<div className="flex flex-wrap items-center justify-between gap-4 rounded-xl border border-white/10 bg-neutral-900 px-6 py-5">
160-
<p className="text-pretty text-[14.5px] text-neutral-400">
161-
{t("flowPrefix")} <span className="font-semibold text-neutral-50">{t("flow")}</span>
159+
<div className="flex flex-wrap items-center justify-between gap-4 rounded-xl border border-border bg-card px-6 py-5">
160+
<p className="text-pretty text-[14.5px] text-muted-foreground">
161+
{t("flowPrefix")} <span className="font-semibold text-foreground">{t("flow")}</span>
162162
</p>
163163
<div className="flex gap-2">
164164
<Link
165165
href="/community/bounties"
166-
className="rounded-lg bg-neutral-50 px-4.5 py-2.5 text-sm font-semibold text-neutral-900 hover:opacity-90"
166+
className="rounded-lg bg-foreground px-4.5 py-2.5 text-sm font-semibold text-background hover:opacity-90"
167167
>
168168
{t("create")}
169169
</Link>
170170
<a
171171
href="https://poidh.xyz"
172172
target="_blank"
173173
rel="noopener noreferrer"
174-
className="rounded-lg border border-white/10 bg-white/[0.04] px-4.5 py-2.5 text-sm font-medium text-neutral-50 hover:bg-neutral-800"
174+
className="rounded-lg border border-border bg-muted/40 px-4.5 py-2.5 text-sm font-medium text-foreground hover:bg-accent"
175175
>
176176
{t("viewPoidh")}
177177
</a>

src/components/newhome/FeedPanel.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function FeedPanel({ events, limit = 5 }: { events: FeedEvent[]; li
6868
return (
6969
<div className="flex flex-col gap-2.5">
7070
<div className="flex items-center justify-between">
71-
<span className="flex items-center gap-1.5 text-base font-bold text-neutral-50">
71+
<span className="flex items-center gap-1.5 text-base font-bold text-foreground">
7272
{t("liveFeed")}
7373
<span
7474
aria-hidden
@@ -78,14 +78,14 @@ export async function FeedPanel({ events, limit = 5 }: { events: FeedEvent[]; li
7878
</span>
7979
<Link
8080
href="/feed"
81-
className="text-[12.5px] font-medium text-neutral-400 hover:text-neutral-50"
81+
className="text-[12.5px] font-medium text-muted-foreground hover:text-foreground"
8282
>
8383
{t("viewAll")}
8484
</Link>
8585
</div>
8686

8787
{rows.length === 0 ? (
88-
<p className="py-4 text-sm text-neutral-500">{t("feedEmpty")}</p>
88+
<p className="py-4 text-sm text-muted-foreground/70">{t("feedEmpty")}</p>
8989
) : (
9090
rows.map((row) => (
9191
<div key={row.id} className="flex flex-col gap-2 border-t border-white/[0.07] py-3">
@@ -95,14 +95,14 @@ export async function FeedPanel({ events, limit = 5 }: { events: FeedEvent[]; li
9595
className="size-6 shrink-0 rounded-full"
9696
style={{ backgroundImage: avatarGradient(row.actor) }}
9797
/>
98-
<span className="font-mono text-[13px] font-semibold text-neutral-50">
98+
<span className="font-mono text-[13px] font-semibold text-foreground">
9999
{truncateAddress(row.actor)}
100100
</span>
101-
<span className="ml-auto shrink-0 text-[11.5px] text-neutral-500">
101+
<span className="ml-auto shrink-0 text-[11.5px] text-muted-foreground/70">
102102
{shortAge(row.timestamp * 1000, now)}
103103
</span>
104104
</div>
105-
<p className="pl-[34px] text-[13.5px] leading-[1.5] text-neutral-400">
105+
<p className="pl-[34px] text-[13.5px] leading-[1.5] text-muted-foreground">
106106
{row.verb === "created" ? (
107107
t("feedCreated")
108108
) : (
@@ -116,7 +116,7 @@ export async function FeedPanel({ events, limit = 5 }: { events: FeedEvent[]; li
116116
)}{" "}
117117
<Link
118118
href={`/proposals/base/${row.proposalNumber}`}
119-
className="font-bold text-neutral-50 hover:underline"
119+
className="font-bold text-foreground hover:underline"
120120
>
121121
#{row.proposalNumber} {row.proposalTitle}
122122
</Link>

src/components/newhome/GovSection.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ export async function GovSection() {
5050
<div className={`${SHELL} flex flex-col gap-6 px-0`}>
5151
<div className="flex flex-col gap-2.5">
5252
<Eyebrow>{t("eyebrow")}</Eyebrow>
53-
<h2 className="text-[clamp(1.875rem,3.4vw,2.75rem)] font-extrabold leading-[1.05] tracking-[-0.025em] text-neutral-50">
53+
<h2 className="text-[clamp(1.875rem,3.4vw,2.75rem)] font-extrabold leading-[1.05] tracking-[-0.025em] text-foreground">
5454
{t("title")}
5555
</h2>
5656
</div>
5757

5858
<div className="grid grid-cols-1 items-stretch gap-5 lg:grid-cols-2">
5959
<AuctionPanel />
6060

61-
<div className="flex h-full min-w-0 flex-col gap-4 rounded-2xl border border-white/10 bg-neutral-900 p-5">
61+
<div className="flex h-full min-w-0 flex-col gap-4 rounded-2xl border border-border bg-card p-5">
6262
<Suspense fallback={<RecentProposalsSkeleton />}>
6363
<Proposals />
6464
</Suspense>
65-
<div className="h-px bg-white/[0.08]" />
65+
<div className="h-px bg-border" />
6666
<Suspense fallback={<ActivityFeedSkeleton responsive />}>
6767
<Feed />
6868
</Suspense>

src/components/newhome/HeroSection.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,34 @@ export async function HeroSection({ stats }: { stats: HeroStat[] }) {
3030
{/* Sized down from the display setting the shorter headline used: this
3131
sentence is twice the length, and at the old clamp it ran to five
3232
lines before the fold. `text-balance` keeps the wrap even. */}
33-
<h1 className="text-balance bg-[linear-gradient(90deg,#fafafa,rgba(250,250,250,.8))] bg-clip-text text-[clamp(2.25rem,5.5vw,4.75rem)] font-extrabold leading-[1] tracking-[-0.03em] text-transparent">
33+
<h1
34+
className="text-balance bg-clip-text text-[clamp(2.25rem,5.5vw,4.75rem)] font-extrabold leading-[1] tracking-[-0.03em] text-transparent"
35+
// Driven off the foreground token, not a literal near-white: clipped
36+
// to the text, a hardcoded white gradient is invisible on a light
37+
// ground.
38+
style={{
39+
backgroundImage:
40+
"linear-gradient(90deg,var(--foreground),color-mix(in oklab,var(--foreground) 78%,transparent))",
41+
}}
42+
>
3443
{t("title")}
3544
</h1>
3645

3746
{/* HeroTagline reserves its own height against layout shift. */}
38-
<p className="max-w-[32em] text-pretty text-[clamp(1.0625rem,2.2vw,1.5rem)] leading-[1.45] text-neutral-400">
47+
<p className="max-w-[32em] text-pretty text-[clamp(1.0625rem,2.2vw,1.5rem)] leading-[1.45] text-muted-foreground">
3948
<HeroTagline />
4049
</p>
4150

4251
<div className="mt-1.5 flex flex-wrap justify-center gap-2.5">
4352
<Link
4453
href="/stake"
45-
className="whitespace-nowrap rounded-lg bg-neutral-50 px-5 py-3 text-[14.5px] font-semibold text-neutral-900 hover:opacity-90"
54+
className="whitespace-nowrap rounded-lg bg-foreground px-5 py-3 text-[14.5px] font-semibold text-background hover:opacity-90"
4655
>
4756
{t("ctaStake")}
4857
</Link>
4958
<Link
5059
href="/community/bounties"
51-
className="whitespace-nowrap rounded-lg border border-white/10 bg-white/[0.04] px-5 py-3 text-[14.5px] font-medium text-neutral-50 hover:bg-neutral-800"
60+
className="whitespace-nowrap rounded-lg border border-border bg-muted/40 px-5 py-3 text-[14.5px] font-medium text-foreground hover:bg-accent"
5261
>
5362
{t("ctaBounties")}
5463
</Link>
@@ -65,8 +74,8 @@ export async function HeroSection({ stats }: { stats: HeroStat[] }) {
6574
<Icon className="size-4" />
6675
</span>
6776
<span className="flex flex-col whitespace-nowrap text-left">
68-
<span className="text-[15px] font-semibold text-neutral-50">{s.value}</span>
69-
<span className="text-xs text-neutral-400">{s.label}</span>
77+
<span className="text-[15px] font-semibold text-foreground">{s.value}</span>
78+
<span className="text-xs text-muted-foreground">{s.label}</span>
7079
</span>
7180
</div>
7281
);

src/components/newhome/HeroTagline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function HeroTagline() {
2626
<TextType
2727
text={[...descriptions]}
2828
as="span"
29-
className="col-start-1 row-start-1 font-medium text-neutral-50"
29+
className="col-start-1 row-start-1 font-medium text-foreground"
3030
typingSpeed={75}
3131
deletingSpeed={50}
3232
pauseDuration={1800}

src/components/newhome/ProposalsPanel.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const STATUS_TONE: Partial<Record<ProposalStatus, [string, string, string]>> = {
1515
const NEUTRAL_TONE: [string, string, string] = [
1616
"rgba(38,38,38,.8)",
1717
"#a3a3a3",
18-
"rgba(255,255,255,.1)",
18+
"color-mix(in oklab,var(--foreground) 10%,transparent)",
1919
];
2020

2121
/**
@@ -60,10 +60,10 @@ export async function ProposalsPanel({ proposals }: { proposals: Proposal[] }) {
6060
return (
6161
<div className="flex flex-col gap-2.5">
6262
<div className="flex items-center justify-between">
63-
<span className="text-base font-bold text-neutral-50">{t("recentProposals")}</span>
63+
<span className="text-base font-bold text-foreground">{t("recentProposals")}</span>
6464
<Link
6565
href="/proposals"
66-
className="text-[12.5px] font-medium text-neutral-400 hover:text-neutral-50"
66+
className="text-[12.5px] font-medium text-muted-foreground hover:text-foreground"
6767
>
6868
{t("viewAll")}
6969
</Link>
@@ -82,22 +82,24 @@ export async function ProposalsPanel({ proposals }: { proposals: Proposal[] }) {
8282
<Link
8383
key={p.proposalId}
8484
href={`/proposals/base/${p.proposalNumber}`}
85-
className="flex flex-col gap-2 rounded-[10px] border border-white/[0.08] bg-neutral-800/35 px-3.5 py-3 hover:border-white/20"
85+
className="flex flex-col gap-2 rounded-[10px] border border-border bg-muted/40 px-3.5 py-3 hover:border-foreground/25"
8686
>
8787
<div className="flex items-center gap-2.5">
88-
<span className="font-mono text-[11.5px] text-neutral-500">#{p.proposalNumber}</span>
88+
<span className="font-mono text-[11.5px] text-muted-foreground/70">
89+
#{p.proposalNumber}
90+
</span>
8991
<span
9092
className="rounded-md border px-2 py-px text-[11.5px] font-medium"
9193
style={{ background: bg, color: fg, borderColor: border }}
9294
>
9395
{p.status}
9496
</span>
95-
<span className="ml-auto shrink-0 text-[11.5px] text-neutral-500">
97+
<span className="ml-auto shrink-0 text-[11.5px] text-muted-foreground/70">
9698
{time ? t(time.key, time.values) : null}
9799
</span>
98100
</div>
99101

100-
<span className="line-clamp-2 text-sm font-semibold leading-[1.35] text-neutral-50">
102+
<span className="line-clamp-2 text-sm font-semibold leading-[1.35] text-foreground">
101103
{p.title}
102104
</span>
103105

@@ -118,7 +120,7 @@ export async function ProposalsPanel({ proposals }: { proposals: Proposal[] }) {
118120
)}
119121
</div>
120122

121-
<div className="flex gap-3.5 text-[11.5px] text-neutral-400">
123+
<div className="flex gap-3.5 text-[11.5px] text-muted-foreground">
122124
<span style={{ color: VOTE_COLOR.for }}>{t("for", { count: p.forVotes })}</span>
123125
<span style={{ color: VOTE_COLOR.against }}>
124126
{t("against", { count: p.againstVotes })}

0 commit comments

Comments
 (0)