From eb60f1a762b4c008ba6f5bb318a120756a65093d Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 22 Jul 2026 13:58:58 +0200 Subject: [PATCH] refactor: complete unique redesign of home and register pages --- src/app/(site)/page.tsx | 726 +++++++++++++++++++++---------- src/app/(site)/register/page.tsx | 178 +++++--- 2 files changed, 606 insertions(+), 298 deletions(-) diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index 1a44d7b0..fa14ee7e 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -17,7 +17,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: 4 }) + .findMany({ orderBy: { createdAt: "desc" }, take: 3 }) .catch(() => []), ]); return { hotelName, online, users, rooms, articles }; @@ -27,290 +27,550 @@ export default async function Home() { const t = await getTranslations("header"); const { hotelName, online, users, rooms, articles } = await getHotelData(); - const features = [ - { - icon: "🎨", - title: "Express Yourself", - desc: "Create a unique avatar with thousands of clothing and accessory combinations.", - }, - { - icon: "🏠", - title: "Design Rooms", - desc: "Build and decorate your own rooms with hundreds of furniture items.", - }, - { - icon: "🎮", - title: "Play Games", - desc: "Challenge friends to battles, races, and snowstorm fights.", - }, - { - icon: "💬", - title: "Make Friends", - desc: "Chat with people from all over the world in a safe environment.", - }, - ]; - return ( -
- {/* Hero */} -
+
+ {/* ── 1. Lobby — full-width hero with depth ── */} +
-
-
-

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

-

- {t("tagline")} -

-
- - ▶ Play Now - - - ✨ Create Account - + /> +
+
+
+ + {online.toLocaleString()} online now +
+

+ Your story starts{" "} + + here + +
+ at {hotelName} +

+

+ {t("tagline")} +

+
+ + Join for free + + arrow + + + + + + Enter hotel + +
+
+
+
+
+ Frank +
+

+ Hey there! 👋 +

+

+ Ready for an adventure? Create your account and let's go! +

+
+
+
-
- Frank +
+
+ + {/* ── 2. Hotel stats — reimagined as service pillars ── */} +
+
+ {[ + { + value: online.toLocaleString(), + label: "Guests online", + detail: "Exploring right now", + }, + { + value: users.toLocaleString(), + label: "Total citizens", + detail: "And counting", + }, + { + value: rooms.toLocaleString(), + label: "Rooms built", + detail: "Waiting to be explored", + }, + { + value: "∞", + label: "Adventures await", + detail: "New experiences daily", + }, + ].map((stat) => (
-

+

+
+ {stat.value} +
+
+ {stat.label} +
+
+ {stat.detail} +
+
+
+ ))} +
+
+ + {/* ── 3. Experiences — what makes the hotel special ── */} +
+
+

+ Everything{" "} + + {hotelName} + {" "} + has to offer +

+

+ From styling your avatar to building empires — it all happens here +

+
+
+ {[ + { + icon: "/assets/images/icons/star.gif", + title: "Avatar studio", + desc: "Mix, match and stand out with thousands of outfits, accessories and effects.", + }, + { + icon: "/assets/images/icons/catalog.png", + title: "Furniture catalog", + desc: "Deck out your room with an ever-growing collection of furniture and decor.", + }, + { + icon: "/assets/images/icons/navigation/community.png", + title: "Community hub", + desc: "Meet people from around the world, join groups and make lifelong friends.", + }, + { + icon: "/assets/images/icons/navigation/bb.png", + title: "Battle & play", + desc: "Compete in snowstorm, battleball, and weekly events with rewards.", + }, + ].map((item) => ( +
+
+
+
+ +
+

+ {item.title} +

+

+ {item.desc} +

+
+
+ ))} +
+
+ + {/* ── 4. Bulletin — latest articles ── */} + {articles.length > 0 && ( +
+
+
+

- Welcome to {hotelName}! 🎉 -

+ Hotel bulletin +

- Create your account now! + Stay up to date with the latest from {hotelName}

-
-
-
- - {/* Stats */} -
-
-
{online.toLocaleString()}
-
Online Now
-
-
-
{users.toLocaleString()}
-
Total Users
-
-
-
{rooms.toLocaleString()}
-
Rooms Created
-
-
-
🎮
-
Games & More
-
-
- - {/* Features */} -
- {features.map((f) => ( -
-
{f.icon}
-

- {f.title} -

-

- {f.desc} -

-
- ))} -
- - {/* News */} - {articles.length > 0 && ( -
-
-

Latest News

- - View all → + Browse all articles + + arrow + + +
-
- {articles.map((a) => ( +
+ {articles.map((a, i) => ( - {a.image ? ( -
+
+ {a.image ? ( -
- ) : ( -
- )} -
-

- {a.title} -

-

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

+ ) : ( +
+ )} +
+ {i === 0 && ( +
+

+ {a.title} +

+

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

+
+ )}
+ {i > 0 && ( +
+

+ {a.title} +

+

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

+
+ )} ))}
-
+
+ + Browse all articles → + +
+ )} - {/* CTA */} -
-

- Ready to join {hotelName}? -

-

+

- Create your free account and start your adventure today! -

-
- - ✨ Create Free Account - - - ▶ Play as Guest - +
+
+

+ The doors are open +

+

+ {hotelName} is free, forever. Come see what makes this place + special — your first room is waiting. +

+
+ + Claim your room + + arrow + + + + + + Take a look around + +
+
+
-
+
); } diff --git a/src/app/(site)/register/page.tsx b/src/app/(site)/register/page.tsx index 942a6e18..5de5a400 100644 --- a/src/app/(site)/register/page.tsx +++ b/src/app/(site)/register/page.tsx @@ -21,31 +21,61 @@ export default async function RegisterPage() { ).catch(() => 0); return ( -
- {/* Left: Info / Welcome */} -
+
+ {/* ── Left: Reception desk ── */} +
+
-
-
+
+
+
Frank
+
-

- Join{" "} +
+ + {online.toLocaleString()} here now +
+ +

+ Welcome to{" "}

+
-
-
- {online.toLocaleString()} + {[ + { icon: "🎨", text: "Unique avatar" }, + { icon: "🏠", text: "Your own room" }, + { icon: "💬", text: "Meet new people" }, + ].map((item) => ( +
+ {item.icon} + {item.text}
-
Online
-
-
-
🎉
-
Free to Play
-
+ ))}
- -
- {[ - { icon: "🎨", text: "Customize your avatar with unique looks" }, - { icon: "🏠", text: "Build and design your own rooms" }, - { icon: "💬", text: "Chat and make new friends" }, - { icon: "🎮", text: "Play games and compete" }, - ].map((item) => ( -
- {item.icon} - - {item.text} - -
- ))} -
- -

- Already have an account?{" "} - - Sign in here - -

- {/* Right: Register Form */} -
- + {/* ── Right: Check-in desk (registration form) ── */} +
+
+
+

+ Create your account +

+

+ It takes less than a minute. No email required. +

+
+ + + +

+ Already checked in?{" "} + + Sign in here + +

+
);