From d0db352f36a1e274f515db59915c9cc160c89735 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 18 Sep 2026 13:06:26 +0200 Subject: [PATCH] feat(home): make index clearer with decluttered hero and live stats panel --- src/app/(site)/page.tsx | 333 ++++++++++++++++++++-------------------- src/messages/en.json | 1 + src/messages/it.json | 1 + 3 files changed, 166 insertions(+), 169 deletions(-) diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index f1242c01..38c7a538 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -349,7 +349,112 @@ export default async function Home() { {th("login")} -
+
+ + + + {/* ── Features ── */} + +
+
+ {tp("sectionFeaturesLabel")} +

+ {tp("sectionFeaturesTitle")} +

+
+
+ {features.map((f, i) => { + const accentVar = + i % 2 === 0 ? "var(--color-primary)" : "var(--color-accent)"; + return ( + +
+
+ +
+

+ {f.title} +

+

+ {f.desc} +

+ + ); + })} +
+
+ + + {/* ── Stats + Login ── */} + +
+
+
+ {tp("sectionStatsLabel")} +

+ {tp("sectionStatsTitle")} +

+
+ + + + + + {tp("liveUpdates")} + +
+
+ - {/* ── Features ── */} - -
-
- {tp("sectionFeaturesLabel")} -

- {tp("sectionFeaturesTitle")} -

-
-
- {features.map((f) => ( - -
- -
-

- {f.title} -

-

- {f.desc} -

-
- ))} -
-
-
- - {/* ── Stats + Login ── */} - -
-
- {tp("sectionStatsLabel")} -

- {tp("sectionStatsTitle")} -

-
-
- {[ - { - value: users, - label: tp("statsCitizens"), - icon: ICON_FRIENDS, - live: false, - }, - { - value: rooms, - label: tp("statsRooms"), - icon: ICON_CATALOG, - live: false, - }, - { - value: online, - label: tp("statsOnline"), - icon: ICON_NAV_ME, - live: true, - }, - { - value: articles?.length ?? null, - label: tp("statsArticles"), - icon: ICON_ARTICLE, - live: false, - }, - ].map((s) => ( - -
- {s.value === null ? ( - {te("unavailable")} - ) : s.live ? ( - - ) : ( - - )} -
-
- {s.live && ( - - - - - )} - - {s.label} -
-
- ))} -
-
-
- {/* ── Login + Online users ── */}
{tp("sectionCommunityLabel")} @@ -635,7 +630,7 @@ export default async function Home() { href={`/news/${a.slug}`} className="group relative w-full overflow-hidden rounded-xl transition-all duration-500 hover:-translate-y-1 hover:shadow-xl" style={{ - height: "clamp(160px, 20vw, 200px)", + height: "clamp(180px, 22vw, 220px)", backgroundColor: "var(--color-background)", border: "1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent)", @@ -671,7 +666,7 @@ export default async function Home() { "linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)", }} > -

+

{a.title}