feat: incorporate design elements from habbo.nl, hubbly.pw, leet.ws
This commit is contained in:
1 parent
5fe01532ca
commit
8fa59d9d19
2 files changed
+492
-487
No files matched your search
+376
-383
@@ -3,62 +3,98 @@ import Link from "next/link";
|
|||||||
import { getTranslations } from "next-intl/server";
|
import { getTranslations } from "next-intl/server";
|
||||||
import { cached } from "@/lib/cache";
|
import { cached } from "@/lib/cache";
|
||||||
import { formatDate } from "@/lib/format-date";
|
import { formatDate } from "@/lib/format-date";
|
||||||
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { prisma } from "@/lib/prisma";
|
import { prisma } from "@/lib/prisma";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
export const revalidate = 120;
|
export const revalidate = 120;
|
||||||
|
|
||||||
async function getHotelData() {
|
async function getHotelData() {
|
||||||
const hotelName = await siteSettings.get("hotel_name", "Hotel");
|
const [hotelName, imagerRaw] = await Promise.all([
|
||||||
const [online, users, rooms, articles] = await Promise.all([
|
siteSettings.get("hotel_name", "Hotel"),
|
||||||
|
siteSettings.get(
|
||||||
|
"habbo_imaging_url",
|
||||||
|
"https://www.habbo.com/habbo-imaging/avatarimage",
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
const imager = imagerRaw ?? "https://www.habbo.com/habbo-imaging/avatarimage";
|
||||||
|
|
||||||
|
const [online, users, rooms, articles, recentUsers, recentPhotos] =
|
||||||
|
await Promise.all([
|
||||||
cached("online_count", 10_000, () =>
|
cached("online_count", 10_000, () =>
|
||||||
prisma.user.count({ where: { online: "1" } }),
|
prisma.user.count({ where: { online: "1" } }),
|
||||||
).catch(() => 0),
|
).catch(() => 0),
|
||||||
cached("total_users", 30_000, () => prisma.user.count()).catch(() => 0),
|
cached("total_users", 30_000, () => prisma.user.count()).catch(() => 0),
|
||||||
cached("total_rooms", 30_000, () => prisma.rooms.count()).catch(() => 0),
|
cached("total_rooms", 30_000, () => prisma.rooms.count()).catch(() => 0),
|
||||||
prisma.websiteArticles
|
prisma.websiteArticles
|
||||||
.findMany({ orderBy: { createdAt: "desc" }, take: 3 })
|
.findMany({ orderBy: { createdAt: "desc" }, take: 5 })
|
||||||
|
.catch(() => []),
|
||||||
|
prisma.user
|
||||||
|
.findMany({
|
||||||
|
where: { online: "1" },
|
||||||
|
select: { username: true, look: true },
|
||||||
|
take: 12,
|
||||||
|
})
|
||||||
|
.catch(() => []),
|
||||||
|
prisma.cameraWeb
|
||||||
|
.findMany({ orderBy: { timestamp: "desc" }, take: 4 })
|
||||||
.catch(() => []),
|
.catch(() => []),
|
||||||
]);
|
]);
|
||||||
return { hotelName, online, users, rooms, articles };
|
|
||||||
|
return {
|
||||||
|
hotelName,
|
||||||
|
imager,
|
||||||
|
online,
|
||||||
|
users,
|
||||||
|
rooms,
|
||||||
|
articles,
|
||||||
|
recentUsers,
|
||||||
|
recentPhotos,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
const t = await getTranslations("header");
|
const t = await getTranslations("header");
|
||||||
const { hotelName, online, users, rooms, articles } = await getHotelData();
|
const {
|
||||||
|
hotelName,
|
||||||
|
imager,
|
||||||
|
online,
|
||||||
|
users,
|
||||||
|
rooms,
|
||||||
|
articles,
|
||||||
|
recentUsers,
|
||||||
|
recentPhotos,
|
||||||
|
} = await getHotelData();
|
||||||
|
|
||||||
|
const featuredArticle = articles[0];
|
||||||
|
const remainingArticles = articles.slice(1, 5);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-14 pb-16">
|
<div className="flex flex-col gap-8 pb-12">
|
||||||
{/* ── 1. Lobby — full-width hero with depth ── */}
|
{/* ── Hero ── */}
|
||||||
<section>
|
<section
|
||||||
<div
|
className="relative overflow-hidden rounded-2xl border"
|
||||||
className="relative overflow-hidden rounded-[2rem] p-1"
|
|
||||||
style={{
|
style={{
|
||||||
background: `linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, var(--color-accent)))`,
|
borderColor:
|
||||||
|
"color-mix(in srgb, var(--color-primary) 30%, transparent)",
|
||||||
|
background: `linear-gradient(160deg, color-mix(in srgb, var(--color-primary) 18%, var(--color-surface)) 0%, color-mix(in srgb, var(--color-primary) 5%, var(--color-background)) 100%)`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden rounded-[1.9rem]"
|
className="absolute inset-0 opacity-[0.05]"
|
||||||
style={{
|
|
||||||
background: `linear-gradient(160deg, color-mix(in srgb, var(--color-primary) 20%, var(--color-surface)) 0%, color-mix(in srgb, var(--color-primary) 6%, var(--color-background)) 50%, var(--color-background) 100%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="absolute inset-0 opacity-[0.07]"
|
|
||||||
style={{
|
style={{
|
||||||
backgroundImage:
|
backgroundImage:
|
||||||
"radial-gradient(circle at 30% 40%, var(--color-primary) 0%, transparent 60%), radial-gradient(circle at 70% 80%, var(--color-accent) 0%, transparent 50%)",
|
"radial-gradient(circle at 30% 30%, var(--color-primary) 0%, transparent 60%)",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div className="relative grid md:grid-cols-2 gap-8 px-8 py-10 md:px-14 md:py-16 items-center">
|
<div className="relative flex flex-col md:flex-row items-center gap-6 px-6 py-8 md:px-10 md:py-10">
|
||||||
<div className="order-2 md:order-1">
|
<div className="flex-1 text-center md:text-left">
|
||||||
<div
|
<div
|
||||||
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-bold uppercase tracking-wider mb-6"
|
className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full text-xs font-bold uppercase tracking-wider mb-4"
|
||||||
style={{
|
style={{
|
||||||
background:
|
background:
|
||||||
"color-mix(in srgb, var(--color-primary) 15%, transparent)",
|
"color-mix(in srgb, var(--color-primary) 14%, transparent)",
|
||||||
color:
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -68,23 +104,20 @@ export default async function Home() {
|
|||||||
{online.toLocaleString()} online now
|
{online.toLocaleString()} online now
|
||||||
</div>
|
</div>
|
||||||
<h1
|
<h1
|
||||||
className="text-4xl md:text-5xl lg:text-6xl font-black leading-[1.08] tracking-tight mb-5"
|
className="text-3xl md:text-4xl lg:text-5xl font-black leading-tight tracking-tight mb-3"
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
>
|
>
|
||||||
Your story starts{" "}
|
Welcome to{" "}
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
color:
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
here
|
{hotelName}
|
||||||
</span>
|
</span>
|
||||||
<br />
|
|
||||||
at {hotelName}
|
|
||||||
</h1>
|
</h1>
|
||||||
<p
|
<p
|
||||||
className="text-base md:text-lg max-w-lg leading-relaxed mb-8"
|
className="text-sm md:text-base max-w-lg leading-relaxed mb-6"
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
@@ -92,217 +125,90 @@ export default async function Home() {
|
|||||||
>
|
>
|
||||||
{t("tagline")}
|
{t("tagline")}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-wrap gap-3">
|
<div className="flex flex-wrap gap-3 justify-center md:justify-start">
|
||||||
<Link
|
<Link
|
||||||
href="/register"
|
href="/register"
|
||||||
className="inline-flex items-center gap-2 font-extrabold text-base px-7 py-3.5 rounded-xl transition-all duration-200 hover:scale-105 active:scale-95"
|
className="inline-flex items-center gap-2 font-extrabold text-sm px-6 py-3 rounded-xl transition-all duration-200 hover:scale-105 active:scale-95"
|
||||||
style={{
|
style={{
|
||||||
background:
|
background:
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
"var(--color-primary-readable, var(--color-primary))",
|
||||||
color:
|
color:
|
||||||
"var(--color-primary-foreground-readable, var(--color-primary-foreground))",
|
"var(--color-primary-foreground-readable, var(--color-primary-foreground))",
|
||||||
boxShadow: `0 4px 20px color-mix(in srgb, var(--color-primary) 40%, transparent)`,
|
boxShadow:
|
||||||
|
"0 4px 16px color-mix(in srgb, var(--color-primary) 35%, transparent)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Join for free
|
<Image
|
||||||
<svg
|
src="/assets/images/EnterHubbly.png"
|
||||||
width="18"
|
alt=""
|
||||||
height="18"
|
width={22}
|
||||||
viewBox="0 0 24 24"
|
height={22}
|
||||||
fill="none"
|
unoptimized
|
||||||
stroke="currentColor"
|
className="inline-block"
|
||||||
strokeWidth="2.5"
|
/>
|
||||||
strokeLinecap="round"
|
Enter {hotelName}
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
|
||||||
<title>arrow</title>
|
|
||||||
<path d="M5 12h14" />
|
|
||||||
<path d="m12 5 7 7-7 7" />
|
|
||||||
</svg>
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href="/client"
|
href="/client"
|
||||||
className="inline-flex items-center gap-2 font-bold text-base px-7 py-3.5 rounded-xl border-2 transition-all duration-200 hover:scale-105 active:scale-95"
|
className="inline-flex items-center gap-2 font-bold text-sm px-6 py-3 rounded-xl border-2 transition-all duration-200 hover:scale-105 active:scale-95"
|
||||||
style={{
|
style={{
|
||||||
borderColor:
|
borderColor:
|
||||||
"color-mix(in srgb, var(--color-text-muted) 25%, transparent)",
|
"color-mix(in srgb, var(--color-text-muted) 25%, transparent)",
|
||||||
color: "var(--color-text-readable)",
|
color: "var(--color-text-readable)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Enter hotel
|
Play now
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="order-1 md:order-2 flex justify-center md:justify-end relative">
|
<div className="shrink-0 flex items-end gap-4">
|
||||||
<div
|
|
||||||
className="absolute -top-6 -right-6 w-72 h-72 rounded-full opacity-[0.08] blur-[80px]"
|
|
||||||
style={{ background: "var(--color-primary)" }}
|
|
||||||
/>
|
|
||||||
<div className="relative">
|
|
||||||
<Image
|
<Image
|
||||||
src="/assets/images/FrankwithBag.gif"
|
src="/assets/images/FrankwithBag.gif"
|
||||||
alt="Frank"
|
alt="Frank"
|
||||||
width={200}
|
width={120}
|
||||||
height={260}
|
height={160}
|
||||||
className="object-contain drop-shadow-2xl relative z-10"
|
className="object-contain drop-shadow-xl"
|
||||||
unoptimized
|
unoptimized
|
||||||
priority
|
priority
|
||||||
/>
|
/>
|
||||||
<div
|
<div className="hidden md:flex flex-col gap-2">
|
||||||
className="absolute -top-2 -right-4 md:-right-8 z-20 rounded-2xl px-5 py-3.5 shadow-2xl border max-w-[220px] backdrop-blur-md"
|
{recentUsers.slice(0, 4).map((u) => (
|
||||||
style={{
|
<div key={u.username} className="flex items-center gap-1.5">
|
||||||
background:
|
<Image
|
||||||
"color-mix(in srgb, var(--color-surface) 85%, transparent)",
|
src={avatarImageUrl(imager, u.look, {
|
||||||
borderColor:
|
headOnly: true,
|
||||||
"color-mix(in srgb, var(--color-primary) 30%, transparent)",
|
direction: 2,
|
||||||
}}
|
size: "s",
|
||||||
>
|
})}
|
||||||
<p
|
alt=""
|
||||||
className="text-sm font-black"
|
width={32}
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
height={38}
|
||||||
>
|
className="rounded-md"
|
||||||
Hey there! 👋
|
unoptimized
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
className="text-xs mt-1 font-semibold"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Ready for an adventure? Create your account and let's go!
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{/* ── 2. Hotel stats — reimagined as service pillars ── */}
|
|
||||||
<section>
|
|
||||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4">
|
|
||||||
{[
|
|
||||||
{
|
|
||||||
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) => (
|
|
||||||
<div
|
|
||||||
key={stat.label}
|
|
||||||
className="relative overflow-hidden rounded-2xl p-5 border transition-all duration-200 hover:-translate-y-0.5"
|
|
||||||
style={{
|
|
||||||
background:
|
|
||||||
"color-mix(in srgb, var(--color-background) 60%, var(--color-surface))",
|
|
||||||
borderColor:
|
|
||||||
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="absolute top-0 right-0 w-24 h-24 rounded-full opacity-[0.06] blur-[30px]"
|
|
||||||
style={{ background: "var(--color-primary)" }}
|
|
||||||
/>
|
/>
|
||||||
<div className="relative">
|
<span
|
||||||
<div
|
className="text-xs font-bold truncate max-w-[80px]"
|
||||||
className="text-3xl md:text-4xl font-black tracking-tight mb-1"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{stat.value}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="text-sm font-extrabold"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
>
|
>
|
||||||
{stat.label}
|
{u.username}
|
||||||
</div>
|
</span>
|
||||||
<div
|
|
||||||
className="text-xs font-semibold mt-0.5"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{stat.detail}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{/* ── 3. Experiences — what makes the hotel special ── */}
|
{/* ── Stats bar ── */}
|
||||||
<section>
|
<div className="grid grid-cols-3 gap-3">
|
||||||
<div className="text-center mb-8">
|
|
||||||
<h2
|
|
||||||
className="text-2xl md:text-3xl font-black tracking-tight"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
Everything{" "}
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
color: "var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{hotelName}
|
|
||||||
</span>{" "}
|
|
||||||
has to offer
|
|
||||||
</h2>
|
|
||||||
<p
|
|
||||||
className="text-sm md:text-base mt-2 max-w-lg mx-auto"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
From styling your avatar to building empires — it all happens here
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
||||||
{[
|
{[
|
||||||
{
|
{ value: online.toLocaleString(), label: "Guests online" },
|
||||||
icon: "/assets/images/icons/star.gif",
|
{ value: users.toLocaleString(), label: "Total citizens" },
|
||||||
title: "Avatar studio",
|
{ value: rooms.toLocaleString(), label: "Rooms built" },
|
||||||
desc: "Mix, match and stand out with thousands of outfits, accessories and effects.",
|
].map((s) => (
|
||||||
},
|
|
||||||
{
|
|
||||||
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) => (
|
|
||||||
<div
|
<div
|
||||||
key={item.title}
|
key={s.label}
|
||||||
className="group relative overflow-hidden rounded-2xl p-6 border transition-all duration-300 hover:-translate-y-1"
|
className="rounded-xl border p-4 text-center transition-all duration-200 hover:-translate-y-0.5"
|
||||||
style={{
|
style={{
|
||||||
background:
|
background:
|
||||||
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
@@ -311,102 +217,34 @@ export default async function Home() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300"
|
className="text-xl md:text-2xl font-black tracking-tight"
|
||||||
style={{
|
|
||||||
background: `linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 8%, transparent), transparent 60%)`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div className="relative">
|
|
||||||
<div
|
|
||||||
className="w-12 h-12 rounded-xl mb-4 flex items-center justify-center overflow-hidden"
|
|
||||||
style={{
|
|
||||||
background:
|
|
||||||
"color-mix(in srgb, var(--color-primary) 14%, var(--color-surface))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Image
|
|
||||||
src={item.icon}
|
|
||||||
alt=""
|
|
||||||
width={28}
|
|
||||||
height={28}
|
|
||||||
className="object-contain"
|
|
||||||
unoptimized
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<h3
|
|
||||||
className="text-base font-extrabold mb-2"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
{item.title}
|
|
||||||
</h3>
|
|
||||||
<p
|
|
||||||
className="text-sm leading-relaxed"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{item.desc}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{/* ── 4. Bulletin — latest articles ── */}
|
|
||||||
{articles.length > 0 && (
|
|
||||||
<section>
|
|
||||||
<div className="flex items-end justify-between mb-6">
|
|
||||||
<div>
|
|
||||||
<h2
|
|
||||||
className="text-2xl md:text-3xl font-black tracking-tight"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
Hotel bulletin
|
|
||||||
</h2>
|
|
||||||
<p
|
|
||||||
className="text-sm mt-1"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Stay up to date with the latest from {hotelName}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Link
|
|
||||||
href="/news"
|
|
||||||
className="hidden sm:inline-flex items-center gap-1.5 text-sm font-extrabold hover:underline shrink-0"
|
|
||||||
style={{
|
style={{
|
||||||
color: "var(--color-primary-readable, var(--color-primary))",
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Browse all articles
|
{s.value}
|
||||||
<svg
|
|
||||||
width="16"
|
|
||||||
height="16"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="2.5"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
|
||||||
<title>arrow</title>
|
|
||||||
<path d="M5 12h14" />
|
|
||||||
<path d="m12 5 7 7-7 7" />
|
|
||||||
</svg>
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="grid md:grid-cols-3 gap-4">
|
<div
|
||||||
{articles.map((a, i) => (
|
className="text-xs font-bold uppercase mt-0.5 tracking-wider"
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{s.label}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* ── Main content: News + Sidebar ── */}
|
||||||
|
<div className="grid lg:grid-cols-3 gap-6">
|
||||||
|
{/* News feed (left, 2/3) */}
|
||||||
|
<div className="lg:col-span-2 space-y-5">
|
||||||
|
{featuredArticle && (
|
||||||
<Link
|
<Link
|
||||||
key={a.slug}
|
href={`/news/${featuredArticle.slug}`}
|
||||||
href={`/news/${a.slug}`}
|
className="group block overflow-hidden rounded-2xl border transition-all duration-300 hover:-translate-y-0.5"
|
||||||
className={`group relative overflow-hidden rounded-2xl border transition-all duration-300 hover:-translate-y-1 ${
|
|
||||||
i === 0 ? "md:col-span-2 md:row-span-1" : ""
|
|
||||||
}`}
|
|
||||||
style={{
|
style={{
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
background:
|
background:
|
||||||
@@ -415,14 +253,10 @@ export default async function Home() {
|
|||||||
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div className="relative h-48 md:h-56 overflow-hidden">
|
||||||
className={`relative overflow-hidden ${
|
{featuredArticle.image ? (
|
||||||
i === 0 ? "h-52 md:h-72" : "h-36"
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
{a.image ? (
|
|
||||||
<Image
|
<Image
|
||||||
src={a.image}
|
src={featuredArticle.image}
|
||||||
alt=""
|
alt=""
|
||||||
fill
|
fill
|
||||||
className="object-cover group-hover:scale-105 transition-transform duration-500"
|
className="object-cover group-hover:scale-105 transition-transform duration-500"
|
||||||
@@ -432,29 +266,60 @@ export default async function Home() {
|
|||||||
<div
|
<div
|
||||||
className="w-full h-full"
|
className="w-full h-full"
|
||||||
style={{
|
style={{
|
||||||
background: `linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 20%, var(--color-surface)), color-mix(in srgb, var(--color-accent) 20%, var(--color-surface)))`,
|
background: `linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 25%, var(--color-surface)), color-mix(in srgb, var(--color-accent) 20%, var(--color-surface)))`,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="absolute inset-0 bg-gradient-to-t from-black/50 to-transparent" />
|
<div className="absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent" />
|
||||||
{i === 0 && (
|
|
||||||
<div className="absolute bottom-4 left-4 right-4">
|
<div className="absolute bottom-4 left-4 right-4">
|
||||||
<h3
|
<h2
|
||||||
className="text-xl font-black text-white drop-shadow-lg"
|
className="text-xl md:text-2xl font-black text-white drop-shadow-lg"
|
||||||
style={{
|
style={{ textShadow: "0 2px 8px rgba(0,0,0,0.5)" }}
|
||||||
textShadow: "0 2px 8px rgba(0,0,0,0.5)",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{a.title}
|
{featuredArticle.title}
|
||||||
</h3>
|
</h2>
|
||||||
<p className="text-xs font-semibold text-white/80 mt-1">
|
<p className="text-xs font-semibold text-white/80 mt-1">
|
||||||
{formatDate(a.createdAt, "date", "")}
|
{formatDate(featuredArticle.createdAt, "date", "")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{remainingArticles.length > 0 && (
|
||||||
|
<div className="space-y-3">
|
||||||
|
{remainingArticles.map((a) => (
|
||||||
|
<Link
|
||||||
|
key={a.slug}
|
||||||
|
href={`/news/${a.slug}`}
|
||||||
|
className="group flex gap-4 items-start rounded-xl border p-3.5 transition-all duration-200 hover:-translate-y-0.5"
|
||||||
|
style={{
|
||||||
|
textDecoration: "none",
|
||||||
|
background:
|
||||||
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
|
borderColor:
|
||||||
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="relative w-16 h-16 shrink-0 rounded-lg overflow-hidden">
|
||||||
|
{a.image ? (
|
||||||
|
<Image
|
||||||
|
src={a.image}
|
||||||
|
alt=""
|
||||||
|
fill
|
||||||
|
className="object-cover"
|
||||||
|
unoptimized
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div
|
||||||
|
className="w-full h-full"
|
||||||
|
style={{
|
||||||
|
background: `color-mix(in srgb, var(--color-primary) 15%, var(--color-surface))`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{i > 0 && (
|
<div className="min-w-0 flex-1">
|
||||||
<div className="p-4">
|
|
||||||
<h3
|
<h3
|
||||||
className="text-sm font-extrabold leading-snug"
|
className="text-sm font-extrabold leading-snug"
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
@@ -462,7 +327,7 @@ export default async function Home() {
|
|||||||
{a.title}
|
{a.title}
|
||||||
</h3>
|
</h3>
|
||||||
<p
|
<p
|
||||||
className="text-xs font-semibold mt-1.5"
|
className="text-xs font-semibold mt-1"
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
@@ -471,14 +336,14 @@ export default async function Home() {
|
|||||||
{formatDate(a.createdAt, "date", "")}
|
{formatDate(a.createdAt, "date", "")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 text-center sm:hidden">
|
)}
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
href="/news"
|
href="/news"
|
||||||
className="inline-flex items-center gap-1.5 text-sm font-extrabold"
|
className="inline-flex items-center gap-1.5 text-sm font-extrabold hover:underline"
|
||||||
style={{
|
style={{
|
||||||
color: "var(--color-primary-readable, var(--color-primary))",
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
}}
|
}}
|
||||||
@@ -486,90 +351,218 @@ export default async function Home() {
|
|||||||
Browse all articles →
|
Browse all articles →
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* ── 5. Final CTA — doors are open ── */}
|
{/* Sidebar (right, 1/3) */}
|
||||||
<section>
|
<aside className="space-y-4">
|
||||||
|
{/* Quick features */}
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden rounded-[2rem] p-1"
|
className="rounded-xl border p-4"
|
||||||
style={{
|
style={{
|
||||||
background: `linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, var(--color-accent)))`,
|
background:
|
||||||
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
|
borderColor:
|
||||||
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<h3
|
||||||
className="relative overflow-hidden rounded-[1.9rem] px-8 py-12 md:py-16 text-center"
|
className="text-xs font-extrabold uppercase tracking-wider mb-3"
|
||||||
style={{
|
|
||||||
background: `linear-gradient(160deg, color-mix(in srgb, var(--color-primary) 18%, var(--color-surface)) 0%, var(--color-surface) 60%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="absolute inset-0 opacity-[0.05]"
|
|
||||||
style={{
|
|
||||||
backgroundImage:
|
|
||||||
"radial-gradient(circle at 50% 50%, var(--color-primary) 0%, transparent 70%)",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div className="relative max-w-xl mx-auto">
|
|
||||||
<h2
|
|
||||||
className="text-3xl md:text-4xl font-black tracking-tight mb-4"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
The doors are open
|
|
||||||
</h2>
|
|
||||||
<p
|
|
||||||
className="text-base md:text-lg leading-relaxed mb-8 max-w-md mx-auto"
|
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{hotelName} is free, forever. Come see what makes this place
|
Quick actions
|
||||||
special — your first room is waiting.
|
</h3>
|
||||||
</p>
|
<div className="space-y-2">
|
||||||
<div className="flex flex-wrap gap-3 justify-center">
|
{[
|
||||||
|
{
|
||||||
|
icon: "/assets/images/icons/navigation/me.png",
|
||||||
|
label: "My dashboard",
|
||||||
|
href: "/me",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "/assets/images/icons/navigation/community.png",
|
||||||
|
label: "Community",
|
||||||
|
href: "/community",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "/assets/images/icons/navigation/shop.png",
|
||||||
|
label: "Shop",
|
||||||
|
href: "/shop",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "/assets/images/icons/navigation/leaderboards.png",
|
||||||
|
label: "Leaderboards",
|
||||||
|
href: "/leaderboard",
|
||||||
|
},
|
||||||
|
].map((item) => (
|
||||||
<Link
|
<Link
|
||||||
href="/register"
|
key={item.label}
|
||||||
className="inline-flex items-center gap-2 font-extrabold text-base px-8 py-3.5 rounded-xl transition-all duration-200 hover:scale-105 active:scale-95"
|
href={item.href}
|
||||||
|
className="flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm font-bold transition-colors hover:underline"
|
||||||
|
style={{
|
||||||
|
color: "var(--color-text-readable)",
|
||||||
|
textDecoration: "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src={item.icon}
|
||||||
|
alt=""
|
||||||
|
width={20}
|
||||||
|
height={20}
|
||||||
|
unoptimized
|
||||||
|
className="shrink-0"
|
||||||
|
/>
|
||||||
|
{item.label}
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Recent users */}
|
||||||
|
{recentUsers.length > 0 && (
|
||||||
|
<div
|
||||||
|
className="rounded-xl border p-4"
|
||||||
style={{
|
style={{
|
||||||
background:
|
background:
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
color:
|
borderColor:
|
||||||
"var(--color-primary-foreground-readable, var(--color-primary-foreground))",
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
boxShadow: `0 4px 20px color-mix(in srgb, var(--color-primary) 40%, transparent)`,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Claim your room
|
<h3
|
||||||
<svg
|
className="text-xs font-extrabold uppercase tracking-wider mb-3"
|
||||||
width="18"
|
style={{
|
||||||
height="18"
|
color:
|
||||||
viewBox="0 0 24 24"
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
fill="none"
|
}}
|
||||||
stroke="currentColor"
|
|
||||||
strokeWidth="2.5"
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
>
|
>
|
||||||
<title>arrow</title>
|
Online now
|
||||||
<path d="M5 12h14" />
|
</h3>
|
||||||
<path d="m12 5 7 7-7 7" />
|
<div className="grid grid-cols-3 gap-2">
|
||||||
</svg>
|
{recentUsers.slice(0, 9).map((u) => (
|
||||||
</Link>
|
<div
|
||||||
|
key={u.username}
|
||||||
|
className="flex flex-col items-center gap-0.5"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src={avatarImageUrl(imager, u.look, {
|
||||||
|
headOnly: true,
|
||||||
|
direction: 2,
|
||||||
|
size: "s",
|
||||||
|
})}
|
||||||
|
alt=""
|
||||||
|
width={36}
|
||||||
|
height={42}
|
||||||
|
className="rounded-md"
|
||||||
|
unoptimized
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className="text-[10px] font-bold truncate w-full text-center leading-tight"
|
||||||
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
|
>
|
||||||
|
{u.username}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
className="w-1.5 h-1.5 rounded-full"
|
||||||
|
style={{ background: "var(--color-success)" }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Recent photos */}
|
||||||
|
{recentPhotos.length > 0 && (
|
||||||
|
<div
|
||||||
|
className="rounded-xl border p-4"
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
|
borderColor:
|
||||||
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<h3
|
||||||
|
className="text-xs font-extrabold uppercase tracking-wider mb-3"
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Recent photos
|
||||||
|
</h3>
|
||||||
|
<div className="grid grid-cols-2 gap-2">
|
||||||
|
{recentPhotos.map((p) => (
|
||||||
<Link
|
<Link
|
||||||
href="/client"
|
key={p.id}
|
||||||
className="inline-flex items-center gap-2 font-bold text-base px-8 py-3.5 rounded-xl border-2 transition-all duration-200 hover:scale-105 active:scale-95"
|
href="/photos"
|
||||||
|
className="block rounded-lg overflow-hidden aspect-square"
|
||||||
|
style={{ textDecoration: "none" }}
|
||||||
|
>
|
||||||
|
<div className="relative w-full h-full">
|
||||||
|
<Image
|
||||||
|
src={p.url}
|
||||||
|
alt=""
|
||||||
|
fill
|
||||||
|
className="object-cover hover:scale-105 transition-transform duration-300"
|
||||||
|
unoptimized
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* ── CTA ── */}
|
||||||
|
<section
|
||||||
|
className="rounded-2xl border text-center px-6 py-8"
|
||||||
style={{
|
style={{
|
||||||
borderColor:
|
borderColor:
|
||||||
"color-mix(in srgb, var(--color-text-muted) 25%, transparent)",
|
"color-mix(in srgb, var(--color-primary) 25%, transparent)",
|
||||||
color: "var(--color-text-readable)",
|
background: `linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 12%, var(--color-surface)), color-mix(in srgb, var(--color-primary) 4%, var(--color-background)))`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Take a look around
|
<h2
|
||||||
|
className="text-2xl font-black tracking-tight mb-2"
|
||||||
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
|
>
|
||||||
|
See you inside!
|
||||||
|
</h2>
|
||||||
|
<p
|
||||||
|
className="text-sm mb-5 max-w-md mx-auto"
|
||||||
|
style={{
|
||||||
|
color: "var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{hotelName} is free, forever. Create your account and start your
|
||||||
|
adventure today.
|
||||||
|
</p>
|
||||||
|
<Link
|
||||||
|
href="/register"
|
||||||
|
className="inline-flex items-center gap-2 font-extrabold text-sm px-7 py-3 rounded-xl transition-all duration-200 hover:scale-105 active:scale-95"
|
||||||
|
style={{
|
||||||
|
background: "var(--color-primary-readable, var(--color-primary))",
|
||||||
|
color:
|
||||||
|
"var(--color-primary-foreground-readable, var(--color-primary-foreground))",
|
||||||
|
boxShadow:
|
||||||
|
"0 4px 16px color-mix(in srgb, var(--color-primary) 35%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/assets/images/EnterHubbly.png"
|
||||||
|
alt=""
|
||||||
|
width={22}
|
||||||
|
height={22}
|
||||||
|
unoptimized
|
||||||
|
className="inline-block"
|
||||||
|
/>
|
||||||
|
Join for free
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+116
-104
@@ -4,89 +4,73 @@ import Link from "next/link";
|
|||||||
import { getTranslations } from "next-intl/server";
|
import { getTranslations } from "next-intl/server";
|
||||||
import { RegisterForm } from "@/components/auth/register-form";
|
import { RegisterForm } from "@/components/auth/register-form";
|
||||||
import { cached } from "@/lib/cache";
|
import { cached } from "@/lib/cache";
|
||||||
|
import { avatarImageUrl } from "@/lib/format";
|
||||||
import { prisma } from "@/lib/prisma";
|
import { prisma } from "@/lib/prisma";
|
||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
|
||||||
export default async function RegisterPage() {
|
export default async function RegisterPage() {
|
||||||
const t = await getTranslations("header");
|
const t = await getTranslations("header");
|
||||||
const [hotelName, cfg] = await Promise.all([
|
const [hotelName, imagerRaw, cfg] = await Promise.all([
|
||||||
siteSettings.get("hotel_name", "Hotel"),
|
siteSettings.get("hotel_name", "Hotel"),
|
||||||
|
siteSettings.get(
|
||||||
|
"habbo_imaging_url",
|
||||||
|
"https://www.habbo.com/habbo-imaging/avatarimage",
|
||||||
|
),
|
||||||
captchaConfig(),
|
captchaConfig(),
|
||||||
]);
|
]);
|
||||||
|
const imager = imagerRaw ?? "https://www.habbo.com/habbo-imaging/avatarimage";
|
||||||
const nonce = (await headers()).get("x-nonce") ?? undefined;
|
const nonce = (await headers()).get("x-nonce") ?? undefined;
|
||||||
|
|
||||||
const online = await cached("online_count", 10_000, () =>
|
const [online, recentUsers] = await Promise.all([
|
||||||
|
cached("online_count", 10_000, () =>
|
||||||
prisma.user.count({ where: { online: "1" } }),
|
prisma.user.count({ where: { online: "1" } }),
|
||||||
).catch(() => 0);
|
).catch(() => 0),
|
||||||
|
prisma.user
|
||||||
|
.findMany({
|
||||||
|
where: { online: "1" },
|
||||||
|
select: { username: true, look: true },
|
||||||
|
take: 8,
|
||||||
|
})
|
||||||
|
.catch(() => []),
|
||||||
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col lg:flex-row gap-0 lg:gap-8 min-h-[600px]">
|
<div className="flex flex-col lg:flex-row gap-8">
|
||||||
{/* ── Left: Reception desk ── */}
|
{/* ── Left panel: Frank + avatars ── */}
|
||||||
<div className="relative lg:w-96 shrink-0 overflow-hidden rounded-none lg:rounded-[2rem] p-1 self-start lg:self-stretch">
|
<div className="lg:w-80 shrink-0 space-y-4">
|
||||||
<div
|
<div
|
||||||
className="absolute inset-0 rounded-none lg:rounded-[2rem]"
|
className="rounded-2xl border p-6 text-center"
|
||||||
style={{
|
style={{
|
||||||
background: `linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, var(--color-accent)))`,
|
borderColor:
|
||||||
}}
|
"color-mix(in srgb, var(--color-primary) 25%, transparent)",
|
||||||
/>
|
background: `linear-gradient(160deg, color-mix(in srgb, var(--color-primary) 16%, var(--color-surface)) 0%, color-mix(in srgb, var(--color-primary) 5%, var(--color-background)) 100%)`,
|
||||||
<div
|
|
||||||
className="relative h-full rounded-none lg:rounded-[1.9rem] flex flex-col items-center text-center px-6 py-10 lg:py-14"
|
|
||||||
style={{
|
|
||||||
background: `linear-gradient(160deg, color-mix(in srgb, var(--color-primary) 22%, var(--color-surface)) 0%, color-mix(in srgb, var(--color-primary) 8%, var(--color-background)) 100%)`,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
|
||||||
className="absolute inset-0 opacity-[0.06]"
|
|
||||||
style={{
|
|
||||||
backgroundImage:
|
|
||||||
"radial-gradient(circle at 50% 30%, var(--color-primary) 0%, transparent 60%)",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div className="relative flex flex-col items-center gap-5">
|
|
||||||
<div className="relative w-40 h-44">
|
|
||||||
<Image
|
<Image
|
||||||
src="/assets/images/FrankwithBag.gif"
|
src="/assets/images/FrankwithBag.gif"
|
||||||
alt="Frank"
|
alt="Frank"
|
||||||
fill
|
width={140}
|
||||||
className="object-contain object-bottom drop-shadow-2xl"
|
height={180}
|
||||||
|
className="object-contain mx-auto drop-shadow-xl"
|
||||||
unoptimized
|
unoptimized
|
||||||
priority
|
priority
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div
|
|
||||||
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-bold uppercase tracking-wider mb-4"
|
|
||||||
style={{
|
|
||||||
background:
|
|
||||||
"color-mix(in srgb, var(--color-primary) 18%, transparent)",
|
|
||||||
color: "var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className="w-2 h-2 rounded-full animate-pulse"
|
|
||||||
style={{ background: "var(--color-success)" }}
|
|
||||||
/>
|
|
||||||
{online.toLocaleString()} here now
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1
|
<h1
|
||||||
className="text-2xl md:text-3xl font-black tracking-tight"
|
className="text-xl font-black mt-3"
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
>
|
>
|
||||||
Welcome to{" "}
|
Join{" "}
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
color:
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
"var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{hotelName}
|
{hotelName}
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
<p
|
<p
|
||||||
className="text-sm mt-2 max-w-xs mx-auto leading-relaxed"
|
className="text-xs mt-1 max-w-[200px] mx-auto leading-relaxed"
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
@@ -94,57 +78,105 @@ export default async function RegisterPage() {
|
|||||||
>
|
>
|
||||||
{t("tagline")}
|
{t("tagline")}
|
||||||
</p>
|
</p>
|
||||||
|
<div
|
||||||
|
className="inline-flex items-center gap-1.5 mt-3 text-xs font-bold"
|
||||||
|
style={{ color: "var(--color-success)" }}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="w-2 h-2 rounded-full animate-pulse"
|
||||||
|
style={{ background: "var(--color-success)" }}
|
||||||
|
/>
|
||||||
|
{online.toLocaleString()} online now
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{recentUsers.length > 0 && (
|
||||||
<div
|
<div
|
||||||
className="w-full max-w-[220px] space-y-2.5 py-4 mt-2 rounded-2xl border"
|
className="rounded-xl border p-4"
|
||||||
style={{
|
style={{
|
||||||
borderColor:
|
|
||||||
"color-mix(in srgb, var(--color-primary) 20%, transparent)",
|
|
||||||
background:
|
background:
|
||||||
"color-mix(in srgb, var(--color-primary) 8%, transparent)",
|
"color-mix(in srgb, var(--color-background) 50%, var(--color-surface))",
|
||||||
|
borderColor:
|
||||||
|
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{[
|
<h3
|
||||||
{ icon: "🎨", text: "Unique avatar" },
|
className="text-xs font-extrabold uppercase tracking-wider mb-2.5"
|
||||||
{ icon: "🏠", text: "Your own room" },
|
|
||||||
{ icon: "💬", text: "Meet new people" },
|
|
||||||
].map((item) => (
|
|
||||||
<div
|
|
||||||
key={item.text}
|
|
||||||
className="flex items-center gap-2.5 px-4 text-sm font-bold"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
<span>{item.icon}</span>
|
|
||||||
<span>{item.text}</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* ── Right: Check-in desk (registration form) ── */}
|
|
||||||
<div className="flex-1 flex flex-col justify-center pt-8 lg:pt-0">
|
|
||||||
<div className="max-w-[520px] mx-auto w-full">
|
|
||||||
<div className="mb-6 text-center lg:text-left">
|
|
||||||
<h2
|
|
||||||
className="text-2xl font-black tracking-tight"
|
|
||||||
style={{ color: "var(--color-text-readable)" }}
|
|
||||||
>
|
|
||||||
Create your account
|
|
||||||
</h2>
|
|
||||||
<p
|
|
||||||
className="text-sm mt-1"
|
|
||||||
style={{
|
style={{
|
||||||
color:
|
color:
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
It takes less than a minute. No email required.
|
Who's online
|
||||||
|
</h3>
|
||||||
|
<div className="grid grid-cols-4 gap-1.5">
|
||||||
|
{recentUsers.map((u) => (
|
||||||
|
<div
|
||||||
|
key={u.username}
|
||||||
|
className="flex flex-col items-center gap-0.5"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src={avatarImageUrl(imager, u.look, {
|
||||||
|
headOnly: true,
|
||||||
|
direction: 2,
|
||||||
|
size: "s",
|
||||||
|
})}
|
||||||
|
alt=""
|
||||||
|
width={30}
|
||||||
|
height={36}
|
||||||
|
className="rounded-md"
|
||||||
|
unoptimized
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
className="text-[9px] font-bold truncate w-full text-center leading-tight"
|
||||||
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
|
>
|
||||||
|
{u.username}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<p
|
||||||
|
className="text-xs text-center"
|
||||||
|
style={{
|
||||||
|
color: "var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Already have an account?{" "}
|
||||||
|
<Link
|
||||||
|
href="/login"
|
||||||
|
className="font-extrabold hover:underline"
|
||||||
|
style={{
|
||||||
|
color: "var(--color-primary-readable, var(--color-primary))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Sign in
|
||||||
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* ── Right: Registration form ── */}
|
||||||
|
<div className="flex-1">
|
||||||
|
<div className="mb-5">
|
||||||
|
<h2
|
||||||
|
className="text-xl font-black tracking-tight"
|
||||||
|
style={{ color: "var(--color-text-readable)" }}
|
||||||
|
>
|
||||||
|
Create your account
|
||||||
|
</h2>
|
||||||
|
<p
|
||||||
|
className="text-sm mt-0.5"
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
"var(--color-text-muted-readable, var(--color-text-muted))",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Free and takes less than a minute
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<RegisterForm
|
<RegisterForm
|
||||||
hotelName={hotelName ?? "Hotel"}
|
hotelName={hotelName ?? "Hotel"}
|
||||||
captcha={{
|
captcha={{
|
||||||
@@ -153,26 +185,6 @@ export default async function RegisterPage() {
|
|||||||
}}
|
}}
|
||||||
nonce={nonce}
|
nonce={nonce}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p
|
|
||||||
className="text-sm text-center mt-6"
|
|
||||||
style={{
|
|
||||||
color:
|
|
||||||
"var(--color-text-muted-readable, var(--color-text-muted))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Already checked in?{" "}
|
|
||||||
<Link
|
|
||||||
href="/login"
|
|
||||||
className="font-extrabold hover:underline"
|
|
||||||
style={{
|
|
||||||
color: "var(--color-primary-readable, var(--color-primary))",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Sign in here
|
|
||||||
</Link>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user