Skip to content

Commit b47e35a

Browse files
Merge pull request #26 from TextureHQ/fix/landing-mobile
fix(landing): mobile responsive fixes — stats bar, CTA stack, footer wrap
2 parents 49de9d8 + cb2784f commit b47e35a

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

app/(shell)/page.tsx

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export default function LandingPage() {
260260
</div>
261261

262262
{/* CTAs */}
263-
<div className="flex items-center justify-center gap-3 flex-wrap">
263+
<div className="flex flex-col sm:flex-row items-stretch sm:items-center justify-center gap-3">
264264
<Button variant="primary" href="/explore" icon="ArrowRight" iconPosition="right">
265265
Browse the registry
266266
</Button>
@@ -274,33 +274,27 @@ export default function LandingPage() {
274274
{/* ── Stats bar ────────────────────────────────────── */}
275275
<div className="px-6 -mt-0.5">
276276
<div className="max-w-2xl mx-auto">
277-
<div className="bg-background-surface border border-border-default rounded-xl shadow-sm py-5 px-6 flex items-center justify-between gap-4 -mt-px">
278-
{[
279-
{ value: utilityCount.toLocaleString(), label: "Utilities" },
280-
{ value: gridOperatorCount.toLocaleString(), label: "Grid Operators" },
281-
{ value: TERRITORY_COUNT.toLocaleString(), label: "Territories" },
282-
{ value: programCount.toLocaleString(), label: "Programs" },
283-
].map((stat, i) => (
284-
<div key={stat.label} className="flex-1 text-center">
285-
{i > 0 && (
286-
<div className="absolute left-0 top-1/4 h-1/2 w-px bg-border-default" aria-hidden />
287-
)}
288-
<div className="text-xl sm:text-2xl font-bold text-text-heading tabular-nums">
289-
{stat.value}
290-
</div>
291-
<div className="text-[11px] font-medium uppercase tracking-widest text-text-muted mt-0.5">
292-
{stat.label}
277+
<div className="bg-background-surface border border-border-default rounded-xl shadow-sm py-5 px-6 -mt-px">
278+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-y-4 gap-x-2 items-start">
279+
{[
280+
{ value: utilityCount.toLocaleString(), label: "Utilities" },
281+
{ value: gridOperatorCount.toLocaleString(), label: "Grid Operators" },
282+
{ value: TERRITORY_COUNT.toLocaleString(), label: "Territories" },
283+
{ value: programCount.toLocaleString(), label: "Programs" },
284+
].map((stat) => (
285+
<div key={stat.label} className="text-center flex flex-col">
286+
<div className="text-xl sm:text-2xl font-bold text-text-heading tabular-nums">
287+
{stat.value}
288+
</div>
289+
<div className="text-[10px] font-medium uppercase tracking-wider text-text-muted mt-0.5 whitespace-nowrap">
290+
{stat.label}
291+
</div>
293292
</div>
294-
</div>
295-
))}
296-
<div className="flex-1 text-center">
297-
<div className="flex items-center justify-center gap-1.5">
298-
<span className="inline-block w-2 h-2 rounded-full bg-green-500" />
299-
<span className="text-sm font-semibold text-green-600">Live</span>
300-
</div>
301-
<div className="text-[11px] font-medium uppercase tracking-widest text-text-muted mt-0.5">
302-
Updated Daily
303-
</div>
293+
))}
294+
</div>
295+
<div className="flex items-center justify-center gap-1.5 mt-4 pt-3 border-t border-border-default sm:hidden">
296+
<span className="inline-block w-2 h-2 rounded-full bg-green-500" />
297+
<span className="text-xs font-semibold text-green-600">Live · Updated Daily</span>
304298
</div>
305299
</div>
306300
</div>
@@ -416,15 +410,15 @@ export default function LandingPage() {
416410

417411
{/* ── Footer ───────────────────────────────────────── */}
418412
<footer className="border-t border-border-default px-6 py-6">
419-
<div className="max-w-5xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-3 text-xs text-text-muted">
420-
<div className="flex items-center gap-1.5">
421-
<span>OpenGrid is maintained by Texture, Inc. · Data licensed under ODbL</span>
422-
<span className="inline-flex items-center gap-1 ml-1">
413+
<div className="max-w-5xl mx-auto flex flex-col gap-3 text-xs text-text-muted sm:flex-row sm:items-center sm:justify-between">
414+
<div className="flex items-center gap-1.5 flex-wrap">
415+
<span>OpenGrid by Texture, Inc. · ODbL License</span>
416+
<span className="inline-flex items-center gap-1">
423417
<span className="inline-block w-1.5 h-1.5 rounded-full bg-green-500" />
424418
<span className="text-green-600 font-medium">Live</span>
425419
</span>
426420
</div>
427-
<div className="flex items-center gap-5">
421+
<div className="flex items-center flex-wrap gap-x-5 gap-y-2">
428422
{[
429423
{ label: "GitHub", href: "https://github.com/TextureHQ/opengrid" },
430424
{ label: "API docs", href: "https://opengrid.texture.energy/api" },

0 commit comments

Comments
 (0)