diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index 18d1c42f..bed43af6 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -2,8 +2,8 @@ import Image from "next/image"; import Link from "next/link"; import { getTranslations } from "next-intl/server"; import { cached } from "@/lib/cache"; -import { formatDate } from "@/lib/format-date"; import { avatarImageUrl } from "@/lib/format"; +import { formatDate } from "@/lib/format-date"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; @@ -27,7 +27,7 @@ async function getHotelData() { cached("total_users", 30_000, () => prisma.user.count()).catch(() => 0), cached("total_rooms", 30_000, () => prisma.rooms.count()).catch(() => 0), prisma.websiteArticles - .findMany({ orderBy: { createdAt: "desc" }, take: 6 }) + .findMany({ orderBy: { createdAt: "desc" }, take: 5 }) .catch(() => []), prisma.user .findMany({ @@ -37,7 +37,7 @@ async function getHotelData() { }) .catch(() => []), prisma.cameraWeb - .findMany({ orderBy: { timestamp: "desc" }, take: 6 }) + .findMany({ orderBy: { timestamp: "desc" }, take: 4 }) .catch(() => []), ]); @@ -65,428 +65,281 @@ export default async function Home() { recentUsers, recentPhotos, } = await getHotelData(); - const featured = articles[0]; - const rest = articles.slice(1, 5); return ( -
- {/* ── 1. Cinematic Hero ── */} -
-
+
+ {/* ── 1. Welcome section ── */} +
+
-
+ {online.toLocaleString()} online +
+

+ Welcome to{" "} + -
+ {hotelName} + +

+

+ {t("tagline")} +

+
+ -
-
-
- - - - - {online.toLocaleString()} guests online -
- -

- Your story starts{" "} - - - here - - - -

-

- {t("tagline")} -

-
- - - - Enter {hotelName} - - - - Play now - -
-
- -
-
-
- Frank -
-

- Hey! 👋 -

-

- Ready for an adventure? -

-
-
-
- {recentUsers.slice(0, 5).map((u, i) => ( -
- -
-

- {u.username} -

-
- - - Online - -
-
-
- ))} -
-
-
+ > + + Enter {hotelName} + + + Play now +
-
+
+
+
+ Frank +
+
+ {recentUsers.slice(0, 5).map((u) => ( +
+ +
+

+ {u.username} +

+

+ Online +

+
+
+ ))} +
+
+
{/* ── 2. Stats ── */} -
+
{[ - { - value: online.toLocaleString(), - label: "Guests online", - sub: "Exploring right now", - icon: "🟢", - }, - { - value: users.toLocaleString(), - label: "Total citizens", - sub: "And counting", - icon: "👥", - }, - { - value: rooms.toLocaleString(), - label: "Rooms built", - sub: "Waiting for you", - icon: "🏠", - }, + { value: online.toLocaleString(), label: "Online now", icon: "🟢" }, + { value: users.toLocaleString(), label: "Total users", icon: "👤" }, + { value: rooms.toLocaleString(), label: "Rooms", icon: "🏠" }, ].map((s) => (
-
-
- {s.value} -
-
- {s.label} -
-
- {s.sub} -
+ className="text-3xl md:text-4xl font-black tracking-tight mb-0.5" + style={{ color: "var(--color-primary)" }} + > + {s.value} +
+
+ {s.label}
))}
- {/* ── 3. News + Sidebar ── */} -
- {/* Main feed */} -
-
-
-

- Latest news -

-

- Stay up to date with {hotelName} -

+ {/* ── 3. Features ── */} +
+ {[ + { + img: "/assets/images/icons/star.gif", + title: "Avatar", + desc: "Create your unique look with thousands of outfits", + }, + { + img: "/assets/images/icons/catalog.png", + title: "Furniture", + desc: "Decorate rooms with hundreds of items", + }, + { + img: "/assets/images/icons/navigation/community.png", + title: "Community", + desc: "Make friends and join groups", + }, + { + img: "/assets/images/icons/navigation/bb.png", + title: "Games", + desc: "Compete in battles and events", + }, + ].map((f) => ( +
+
+
+

+ {f.title} +

+

+ {f.desc} +

+
+ ))} +
+ + {/* ── 4. News + Sidebar ── */} +
+
+
+

+ News +

- View all + View all →
- - {featured && ( - -
- {featured.image ? ( - - ) : ( -
- )} -
-
-
- Featured -
-

- {featured.title} -

-

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

-
-
- - )} - - {rest.length > 0 && ( + {articles.length > 0 ? (
- {rest.map((a, i) => ( + {articles.slice(0, 4).map((a) => ( -
+
{a.image ? ( ) : (
)}
-
+

{a.title}

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

@@ -494,130 +347,35 @@ export default async function Home() { ))}
+ ) : ( +

+ No news yet. +

)} - -
- - View all articles → - -
- {/* Sidebar */}
- {/* ── 4. CTA ── */} -
-
+

+ Ready to join? +

+

+ Create your free account and start your adventure today. +

+ -
-
-

- The doors are open -

-

- {hotelName} is free, forever. Your first room is waiting — come - join us! -

- - - - Claim your room - -
-
-
+ Create free account + +
); } diff --git a/src/app/(site)/register/page.tsx b/src/app/(site)/register/page.tsx index b2d2d128..fa802f56 100644 --- a/src/app/(site)/register/page.tsx +++ b/src/app/(site)/register/page.tsx @@ -36,99 +36,72 @@ export default async function RegisterPage() { ]); return ( -
- {/* ── Left: Reception ── */} +
+ {/* Left panel */}
-
+
+ Frank
-
-
-
- Frank -
- - {online.toLocaleString()} online -
-

- Join{" "} - - {hotelName} - -

-

- {t("tagline")} -

-
+ + {online.toLocaleString()} online
+

+ Join{" "} + + {hotelName} + +

+

+ {t("tagline")} +

{recentUsers.length > 0 && (

Who's online

@@ -136,7 +109,7 @@ export default async function RegisterPage() { {recentUsers.map((u) => (
@@ -168,9 +141,7 @@ export default async function RegisterPage() {

Already have an account?{" "}

- {/* ── Right: Registration ── */} + {/* Right: form */}
-
+

- Free and takes less than a minute — no email required + Free and takes less than a minute