diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index a8e83c7b..a1d9718f 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -8,6 +8,7 @@ import { AmbientOrbs } from "@/components/ambient-orbs"; import { AnimatedCounter } from "@/components/animated-counter"; import { HomeLoginForm } from "@/components/auth/home-login-form"; import { Clock } from "@/components/clock"; +import { SectionCard } from "@/components/home-section"; import { LanguageSwitcher } from "@/components/language-switcher"; import { Reveal } from "@/components/motion-reveal"; import { UserAvatarThumbnail } from "@/components/shared/user-avatar-thumbnail"; @@ -115,7 +116,7 @@ export default async function Home() { const nonce = (await headers()).get("x-nonce") ?? undefined; return ( -
+
{/* ── Top Bar ── */}
@@ -232,7 +233,7 @@ export default async function Home() { {th("online", { count: online, hotel: hotelName })}

{th("tagline")} @@ -322,14 +323,12 @@ export default async function Home() { ].map((s) => (

@@ -374,52 +373,24 @@ export default async function Home() {
{/* Left: Login & Register */} -
-
- -

- Login -

-
-
- -
-
+ nonce={nonce} + /> +
{latestUsers.length > 0 && ( -
-
- -

- {tp("latestUsers", { count: users.toLocaleString() })} -

-
-
+
{latestUsers.map((u) => (
-
- -
+ {u.username} @@ -498,187 +443,118 @@ export default async function Home() {
))}
-
+ )} {/* Right: News */} -
-
-
- -

- {tp("latestNews")} -

-
- - {tp("allNews")} - -
-
- {articles.length > 0 ? ( -
- {articles.slice(0, 4).map((a) => ( - -
- {a.title} -
- - → - -
-
-

- {a.title} -

-

- {formatDate(a.createdAt, "date", "")} -

-
+ {articles.length > 0 ? ( +
+ {articles.slice(0, 4).map((a) => ( + +
+ {a.title} +
+ →
- - ))} -
- ) : ( -

- {tp("noArticles")} -

- )} -
-
+
+

+ {a.title} +

+

+ {formatDate(a.createdAt, "date", "")} +

+
+
+ + ))} +
+ ) : ( +

+ {tp("noArticles")} +

+ )} +
{/* ── Online users ── */} {recentUsers.length > 0 && ( -
-
-
- -

+ {recentUsers.slice(0, 12).map((u) => ( +
- {tp("recentUsers")} -

-
- - {tp("allUsers")} - -
-
-
- {recentUsers.slice(0, 12).map((u) => ( -
+ - - - {u.username} - -
- ))} -
+ {u.username} + +
+ ))}
-
+
)} {/* ── Bottom CTA ── */}

{tp("welcomeBody")} @@ -725,60 +601,33 @@ export default async function Home() { {/* ── Recent photos ── */} {recentPhotos.length > 0 && ( -

-
- -

- {tp("recentPhotos")} -

+
+ {recentPhotos.slice(0, 4).map((p) => ( + + + + ))}
-
-
- {recentPhotos.slice(0, 4).map((p) => ( - - - - ))} -
-
-
+ )}
diff --git a/src/components/home-section.tsx b/src/components/home-section.tsx new file mode 100644 index 00000000..91670bb5 --- /dev/null +++ b/src/components/home-section.tsx @@ -0,0 +1,84 @@ +import Image from "next/image"; +import Link from "next/link"; +import type { ReactNode } from "react"; + +interface SectionCardProps { + title: string; + icon?: string; + actionHref?: string; + actionLabel?: string; + children: ReactNode; + className?: string; + bodyClassName?: string; +} + +/** + * Consistent, restrained panel used across the home page. Replaces the + * per-section neon gradients with a single calm surface + hairline divider so + * the page reads as professional rather than game-like. + */ +export function SectionCard({ + title, + icon, + actionHref, + actionLabel, + children, + className, + bodyClassName, +}: SectionCardProps) { + return ( +
+
+
+ {icon && ( + + )} +

+ {title} +

+
+ {actionHref && actionLabel && ( + + {actionLabel} + + )} +
+
{children}
+
+ ); +}