Merge branch 'main' of https://gitlab.epicnabbo.nl/remco/EpicNext-Cms into codex/housekeeping-complete

This commit is contained in:
Simo committed 2026-08-30 00:17:38 +02:00
commit bdab924bdf
27 files changed
+319 -385

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@
"motion": "13.1.1",
"music-metadata": "11.15.0",
"mysql2": "3.23.4",
"next": "16.3.2",
"next": "16.3.3",
"next-auth": "5.0.0-beta.32",
"next-intl": "4.13.7",
"otplib": "13.4.1",
+47 -47
View File
@@ -92,14 +92,14 @@ importers:
specifier: 3.23.4
version: 3.23.4(@types/[email protected])
next:
specifier: 16.3.2
version: 16.3.2(@types/[email protected])([email protected]([email protected]))([email protected])
specifier: 16.3.3
version: 16.3.3(@types/[email protected])([email protected]([email protected]))([email protected])
next-auth:
specifier: 5.0.0-beta.32
version: 5.0.0-beta.32([email protected].2(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])
version: 5.0.0-beta.32([email protected].3(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])
next-intl:
specifier: 4.13.7
version: 4.13.7(@swc/[email protected])([email protected].2(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
version: 4.13.7(@swc/[email protected])([email protected].3(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected])
otplib:
specifier: 13.4.1
version: 13.4.1
@@ -815,57 +815,57 @@ packages:
'@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4
'@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4
'@next/[email protected].2':
resolution: {integrity: sha512-8k4YoG8cM7LWlkfzGNYCRBbFNlernLiMw4s0btVl+CmmWqn3VpYypA72/5Feb1UWdxe6tHqr5KHP4p4Y4m9luA==}
'@next/[email protected].3':
resolution: {integrity: sha512-U2eYQRwXj+dsqxV79zFqExDdatnNY/ZWc2nsJU1p/OgT7fd3dXwlF6OjYaFQCfMoeTA19PWq+wVmYgimVA+V+g==}
'@next/[email protected].2':
resolution: {integrity: sha512-ib5Llm93YCKoKWDh6ZaHq6QWTuOZ2bRkSnUwMmX8dsRIOkBNL1vVlSiUKSfixPL9SSh9pvukzqajk/klkn5vqg==}
'@next/[email protected].3':
resolution: {integrity: sha512-8Hiv32QJPwdV6KYJ8meR9SBA061tQqnIKTJDocvOXlEQqib0xMFpzArosuffFUUc0sslbh7QQ8a3Yey1QV8EIw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
'@next/[email protected].2':
resolution: {integrity: sha512-qd98fX2+I5nYJDioW2o7nSjoxM5KvWdeDefM80igia4+C/qSIEhH4MhTE+hO/7qKM7W37/Mq+dOWp8UePSyLHw==}
'@next/[email protected].3':
resolution: {integrity: sha512-A1lgKgwVchRYmSe467zdwhxT9040dd8lH+o65sL5Jet8fjB4kegw/rDyPIpYVRb6jAqwXFOJpjIXJLxQKLiE3A==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
'@next/[email protected].2':
resolution: {integrity: sha512-vqsgb6FAOzcrCccsLXiKtAy5t8EzO+uOazuFaSkQxeY0tNONG3vpHYy8pyBafcI5SNFPTeyard6yTr6SzNGo2A==}
'@next/[email protected].3':
resolution: {integrity: sha512-bf0FIssMFueU2dm7vQEWWxk0c8UjKTdW0yzuh0sQsD8pf1+KCLDdaqhYZNMYGmXwEOiHAUzgBKudovIlcvvBjg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@next/[email protected].2':
resolution: {integrity: sha512-xIe1eujfHUB2XcxHGddxJyu6TJRPjC5NpIkQYB/32ESkt5VkQyIAjmLRS38c+s6QY+qjtY/4KarVDzXRuD7lZQ==}
'@next/[email protected].3':
resolution: {integrity: sha512-W7viwCk9JY/cAkdz/A273rd5bb3RgT/IHwR7Upv90tunjBWNtAAhGhoecHh+teRNRSinuAFmE+l7fwZ4YKkrXg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@next/[email protected].2':
resolution: {integrity: sha512-Fe0SA2j8X0kmc3aveuHD7UktO3AE2+mH3LguP60vGbz7u0z+MrDXbeb5iZFYAwR7EzzzXJ2Yk966w9mGTFMqfA==}
'@next/[email protected].3':
resolution: {integrity: sha512-0W46zw1N3ODpI6n0GeivHvvob1pooozgZVqy65k0mh4/7vr+FbY9+WpHzNVXjHipJf/A3FDheBG19H1s5A25rA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@next/[email protected].2':
resolution: {integrity: sha512-TFBipb+gyesI/2Ve4zVu7kGltBWN/R466G5/1gtt2lECfc22G1pjkTxu68Q9aFcOaXiRGTQfvDbQQFe7mYgxiQ==}
'@next/[email protected].3':
resolution: {integrity: sha512-H4mBso8ZTMBPtdT0PN0pBx2ayTvQuTuvS6qT13d77yVFJXAPCxkyIhLTmdMaGTJs0krQYI/qpzdHijCeihXhbg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [musl]
'@next/[email protected].2':
resolution: {integrity: sha512-rVtmnNpBYIosDnKD/96dKxFsJnwnn1WRGG/HioSe8XCm2ksSHNrd2R6+hSjvTBxeMNhJ9pYeu/90cWB1nQLuNA==}
'@next/[email protected].3':
resolution: {integrity: sha512-cTMUJpcEGmeywofCUfhR+rSsoE33+rVPnPEYNTNdLNlsOeEg/vktOsKUSTb28vUGqD2jkm4Zaskcwn7OCI6FQg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
'@next/[email protected].2':
resolution: {integrity: sha512-H4Y2o2/JcHu8LtwzD5CXfHhwxwz8gfsx2HXDEw46Mtev5xHnEmB7HNtZtmriw5ReUOjRtcDqo7XSbU01FT9NlA==}
'@next/[email protected].3':
resolution: {integrity: sha512-2VR4cTBzHXaBjnGsuH6GyJjENzQOmHeAh11uY1iUhjm3j5dEUrVJuUj+VL78jaGi/Dik8xS76zEj18BsFhlVZQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -2544,8 +2544,8 @@ packages:
typescript:
optional: true
[email protected].2:
resolution: {integrity: sha512-/ZCaubUy17Lld1SiPWxuPbCk2ihqAxF2QNQaPZeEaEb7t1I58qhsJN187D7AfpapHAqUPXH0f/thtdW9dWgWFg==}
[email protected].3:
resolution: {integrity: sha512-tuRTx1nQ/yVw83cwJBo9F+njGUgMn3UHQycreWHB8XsStvvAh1AthbI8/4IpKnFaF58F+iSiHejYOlMQ/eq83g==}
engines: {node: '>=20.9.0'}
hasBin: true
peerDependencies:
@@ -3444,30 +3444,30 @@ snapshots:
'@tybys/wasm-util': 0.10.3
optional: true
'@next/[email protected].2': {}
'@next/[email protected].3': {}
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@next/[email protected].2':
'@next/[email protected].3':
optional: true
'@noble/[email protected]': {}
@@ -4664,22 +4664,22 @@ snapshots:
dependencies:
content-type: 2.1.0
[email protected]([email protected].2(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]):
[email protected]([email protected].3(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]):
dependencies:
'@auth/core': 0.41.3
next: 16.3.2(@types/[email protected])([email protected]([email protected]))([email protected])
next: 16.3.3(@types/[email protected])([email protected]([email protected]))([email protected])
react: 19.2.8
[email protected]: {}
[email protected](@swc/[email protected])([email protected].2(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
[email protected](@swc/[email protected])([email protected].3(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]):
dependencies:
'@formatjs/intl-localematcher': 0.8.13
'@parcel/watcher': 2.6.0
'@swc/core': 1.15.47(@swc/[email protected])
icu-minify: 4.13.7
negotiator: 1.1.0
next: 16.3.2(@types/[email protected])([email protected]([email protected]))([email protected])
next: 16.3.3(@types/[email protected])([email protected]([email protected]))([email protected])
next-intl-swc-plugin-extractor: 4.13.7
po-parser: 2.2.0
react: 19.2.8
@@ -4689,9 +4689,9 @@ snapshots:
transitivePeerDependencies:
- '@swc/helpers'
[email protected].2(@types/[email protected])([email protected]([email protected]))([email protected]):
[email protected].3(@types/[email protected])([email protected]([email protected]))([email protected]):
dependencies:
'@next/env': 16.3.2
'@next/env': 16.3.3
'@swc/helpers': 0.5.23
baseline-browser-mapping: 2.11.16
caniuse-lite: 1.0.30001809
@@ -4700,14 +4700,14 @@ snapshots:
react-dom: 19.2.8([email protected])
styled-jsx: 5.1.6([email protected])
optionalDependencies:
'@next/swc-darwin-arm64': 16.3.2
'@next/swc-darwin-x64': 16.3.2
'@next/swc-linux-arm64-gnu': 16.3.2
'@next/swc-linux-arm64-musl': 16.3.2
'@next/swc-linux-x64-gnu': 16.3.2
'@next/swc-linux-x64-musl': 16.3.2
'@next/swc-win32-arm64-msvc': 16.3.2
'@next/swc-win32-x64-msvc': 16.3.2
'@next/swc-darwin-arm64': 16.3.3
'@next/swc-darwin-x64': 16.3.3
'@next/swc-linux-arm64-gnu': 16.3.3
'@next/swc-linux-arm64-musl': 16.3.3
'@next/swc-linux-x64-gnu': 16.3.3
'@next/swc-linux-x64-musl': 16.3.3
'@next/swc-win32-arm64-msvc': 16.3.3
'@next/swc-win32-x64-msvc': 16.3.3
sharp: 0.35.3(@types/[email protected])
transitivePeerDependencies:
- '@babel/core'
+192 -290
View File
@@ -29,57 +29,43 @@ async function getHotelData() {
siteSettings.get("cms_logo", ""),
]);
const [
online,
users,
rooms,
articles,
recentUsers,
recentPhotos,
latestUsers,
] = await Promise.all([
cached("online_count", 10_000, () =>
db
.select({ total: count() })
.from(User)
.where(eq(User.online, "1"))
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
cached("total_users", 300_000, () =>
db
.select({ total: count() })
.from(User)
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
cached("total_rooms", 300_000, () =>
db
.select({ total: count() })
.from(Rooms)
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
getNewsList(4),
cached("home_online_users", 15_000, () =>
db
.select({ username: User.username, look: User.look })
.from(User)
.where(eq(User.online, "1"))
.limit(30),
).catch(() => []),
cached("home_recent_photos", 60_000, () =>
db
.select({ id: CameraWeb.id, url: CameraWeb.url })
.from(CameraWeb)
.orderBy(desc(CameraWeb.timestamp))
.limit(4),
).catch(() => []),
cached("home_latest_users", 60_000, () =>
db
.select({ username: User.username, look: User.look })
.from(User)
.orderBy(desc(User.accountCreated))
.limit(8),
).catch(() => []),
]);
const [online, users, rooms, articles, recentUsers, recentPhotos] =
await Promise.all([
cached("online_count", 10_000, () =>
db
.select({ total: count() })
.from(User)
.where(eq(User.online, "1"))
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
cached("total_users", 300_000, () =>
db
.select({ total: count() })
.from(User)
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
cached("total_rooms", 300_000, () =>
db
.select({ total: count() })
.from(Rooms)
.then((rows) => rows[0]?.total ?? 0),
).catch(() => 0),
getNewsList(4),
cached("home_online_users", 15_000, () =>
db
.select({ username: User.username, look: User.look })
.from(User)
.where(eq(User.online, "1"))
.limit(12),
).catch(() => []),
cached("home_recent_photos", 60_000, () =>
db
.select({ id: CameraWeb.id, url: CameraWeb.url })
.from(CameraWeb)
.orderBy(desc(CameraWeb.timestamp))
.limit(4),
).catch(() => []),
]);
return {
hotelName,
@@ -89,7 +75,6 @@ async function getHotelData() {
articles,
recentUsers,
recentPhotos,
latestUsers,
logo,
};
}
@@ -108,13 +93,30 @@ export default async function Home() {
articles,
recentUsers,
recentPhotos,
latestUsers,
logo,
} = await getHotelData();
const captcha = await captchaConfig();
const nonce = (await headers()).get("x-nonce") ?? undefined;
const features = [
{
title: tp("featuresAvatar"),
desc: tp("featuresAvatarDesc"),
icon: "/assets/images/icons/friends.png",
},
{
title: tp("featuresFurniture"),
desc: tp("featuresFurnitureDesc"),
icon: "/assets/images/icons/catalog.png",
},
{
title: tp("featuresCommunity"),
desc: tp("featuresCommunityDesc"),
icon: "/assets/images/icons/navigation/goody.png",
},
];
return (
<div className="mx-auto w-full max-w-6xl flex flex-col gap-8 pb-16">
{/* ── Top Bar ── */}
@@ -212,104 +214,119 @@ export default async function Home() {
/>
<AmbientOrbs />
<div
className="relative flex flex-col items-center gap-8 px-6 py-12 md:flex-row md:px-12 md:py-16"
className="relative flex flex-col items-center gap-8 px-6 py-12 text-center md:px-12 md:py-20"
style={{ zIndex: 2 }}
>
<div className="flex-1 text-center md:text-left">
<div
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-bold uppercase tracking-widest mb-5 border backdrop-blur-sm"
style={{
background:
"color-mix(in srgb, var(--color-primary) 12%, transparent)",
borderColor:
"color-mix(in srgb, var(--color-primary) 20%, transparent)",
color: "var(--color-primary-readable, var(--color-primary))",
}}
>
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
<span className="relative inline-flex rounded-full h-2 w-2 bg-green-500" />
</span>
{th("online", { count: online, hotel: hotelName })}
</div>
<h1
className="text-4xl font-black leading-[1.05] tracking-tight mb-3 md:text-5xl lg:text-6xl"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
<TypewriterText text={tp("welcome", { hotelName })} />
</h1>
<p
className="text-base leading-relaxed max-w-xl mb-7 md:text-lg"
style={{ color: "var(--color-text-muted)" }}
>
{th("tagline")}
</p>
<div className="flex flex-wrap gap-3 justify-center md:justify-start">
<Link
href="/register"
className="inline-flex items-center gap-2.5 font-extrabold text-sm px-7 py-3.5 rounded-xl transition-all duration-200 hover:scale-[1.03] active:scale-95 shadow-lg"
style={{
background: "var(--color-primary)",
color: "var(--color-primary-foreground)",
boxShadow:
"0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)",
}}
>
<Image
src="/assets/images/EnterHubbly.png"
alt=""
width={20}
height={20}
unoptimized
/>
{tp("register")}
</Link>
<Link
href="/login"
className="inline-flex items-center gap-2 font-bold text-sm px-7 py-3.5 rounded-xl border-2 transition-all duration-200 hover:scale-[1.03] active:scale-95 backdrop-blur-sm"
style={{
borderColor:
"color-mix(in srgb, var(--color-text-muted) 20%, transparent)",
color: "var(--color-text-readable)",
background:
"color-mix(in srgb, var(--color-surface) 50%, transparent)",
}}
>
{th("login")}
</Link>
</div>
<div
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-bold uppercase tracking-widest mb-2 border backdrop-blur-sm"
style={{
background:
"color-mix(in srgb, var(--color-primary) 12%, transparent)",
borderColor:
"color-mix(in srgb, var(--color-primary) 20%, transparent)",
color: "var(--color-primary-readable, var(--color-primary))",
}}
>
<span className="relative flex h-2 w-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
<span className="relative inline-flex rounded-full h-2 w-2 bg-green-500" />
</span>
{th("online", { count: online, hotel: hotelName })}
</div>
<div className="shrink-0 relative animate-float">
<div
className="absolute -bottom-4 -left-4 w-48 h-48 rounded-full opacity-[0.15] blur-[60px]"
style={{ background: "var(--color-primary)" }}
/>
<Image
src="/assets/images/FrankwithBag.gif"
alt="Frank"
width={170}
height={230}
className="object-contain drop-shadow-2xl relative"
unoptimized
priority
/>
<h1
className="text-4xl font-black leading-[1.05] tracking-tight mb-3 md:text-5xl lg:text-6xl"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
<TypewriterText text={tp("welcome", { hotelName })} />
</h1>
<p
className="text-base leading-relaxed max-w-2xl mb-8 md:text-lg"
style={{ color: "var(--color-text-muted)" }}
>
{tp("welcomeBody")}
</p>
<div className="flex flex-wrap gap-3 justify-center">
<Link
href="/register"
className="inline-flex items-center gap-2.5 font-extrabold text-sm px-8 py-4 rounded-xl transition-all duration-200 hover:scale-[1.03] active:scale-95 shadow-lg"
style={{
background: "var(--color-primary)",
color: "var(--color-primary-foreground)",
boxShadow:
"0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)",
}}
>
<Image
src="/assets/images/EnterHubbly.png"
alt=""
width={20}
height={20}
unoptimized
/>
{tp("register")}
</Link>
<Link
href="/login"
className="inline-flex items-center gap-2 font-bold text-sm px-8 py-4 rounded-xl border-2 transition-all duration-200 hover:scale-[1.03] active:scale-95 backdrop-blur-sm"
style={{
borderColor:
"color-mix(in srgb, var(--color-text-muted) 20%, transparent)",
color: "var(--color-text-readable)",
background:
"color-mix(in srgb, var(--color-surface) 50%, transparent)",
}}
>
{th("login")}
</Link>
</div>
</div>
</div>
</Reveal>
{/* ── Stats ── */}
{/* ── Features ── */}
<Reveal>
<div className="grid grid-cols-3 gap-4 stagger-children">
<div className="grid grid-cols-1 gap-4 sm:grid-cols-3">
{features.map((f) => (
<SurfaceCard
key={f.title}
className="relative p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
>
<div
className="mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl"
style={{
background:
"color-mix(in srgb, var(--color-primary) 14%, transparent)",
}}
>
<Image src={f.icon} alt="" width={26} height={26} unoptimized />
</div>
<h3
className="text-base font-extrabold mb-1"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
{f.title}
</h3>
<p
className="text-sm leading-relaxed"
style={{ color: "var(--color-text-muted)" }}
>
{f.desc}
</p>
</SurfaceCard>
))}
</div>
</Reveal>
{/* ── Stats + Login ── */}
<Reveal>
<div className="grid grid-cols-1 gap-4 md:grid-cols-4">
{[
{
value: online,
label: tp("statsOnline"),
icon: "/assets/images/icons/online-friends.png",
},
{
value: users,
label: tp("statsCitizens"),
@@ -320,52 +337,38 @@ export default async function Home() {
label: tp("statsRooms"),
icon: "/assets/images/icons/catalog.png",
},
{
value: online,
label: tp("statsOnline"),
icon: "/assets/images/icons/navigation/me.png",
},
{
value: articles.length,
label: tp("statsArticles"),
icon: "/assets/images/icons/article.gif",
},
].map((s) => (
<SurfaceCard
key={s.label}
className="relative p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
>
<div className="mb-0.5 text-3xl font-black tracking-tight md:text-4xl">
<AnimatedCounter value={s.value} />
</div>
<div
className="absolute -top-6 -right-6 w-20 h-20 rounded-full opacity-[0.06]"
style={{ background: "var(--color-primary)" }}
/>
<div className="relative">
<div
className="mx-auto mb-2.5 flex h-10 w-10 items-center justify-center rounded-xl"
style={{
background:
"color-mix(in srgb, var(--color-primary) 14%, transparent)",
}}
>
<Image
src={s.icon}
alt=""
width={24}
height={24}
unoptimized
/>
</div>
<div
className="mb-0.5 text-3xl font-black tracking-tight md:text-4xl"
style={{ color: "var(--color-primary)" }}
>
<AnimatedCounter value={s.value} />
</div>
<div
className="text-xs font-bold uppercase tracking-widest"
style={{ color: "var(--color-text-muted)" }}
>
{s.label}
</div>
className="text-xs font-bold uppercase tracking-widest flex items-center justify-center gap-1.5"
style={{ color: "var(--color-text-muted)" }}
>
<Image src={s.icon} alt="" width={14} height={14} unoptimized />
{s.label}
</div>
</SurfaceCard>
))}
</div>
</Reveal>
{/* ── Login + News ── */}
{/* ── Login + Online users ── */}
<div className="flex flex-col gap-4 md:flex-row">
{/* Left: Login & Register */}
<Reveal className="flex w-full flex-col gap-4 md:w-1/3 md:flex-shrink-0">
<SurfaceCard
title={th("login")}
@@ -382,48 +385,32 @@ export default async function Home() {
/>
</SurfaceCard>
<Link href="/register" className="relative block group">
<SurfaceCard className="transition-all duration-200 group-hover:shadow-lg">
<Image
src="/assets/images/EnterHubbly.png"
alt="Register"
width={300}
height={100}
className="block w-full"
unoptimized
/>
</SurfaceCard>
<span
className="pointer-events-none absolute inset-0 flex items-center text-2xl font-extrabold text-white md:text-3xl"
style={{
marginLeft: "18px",
fontFamily: "var(--font-nunito)",
textShadow: "0 2px 8px rgba(0,0,0,0.6)",
}}
>
{tp("register")}
</span>
</Link>
{latestUsers.length > 0 && (
{recentUsers.length > 0 && (
<SurfaceCard
title={tp("latestUsers", { count: users.toLocaleString() })}
title={tp("recentUsers")}
icon="/assets/images/icons/navigation/goody.png"
actionHref="/community"
actionLabel={tp("allUsers")}
bodyClassName="p-4"
>
<div className="grid grid-cols-4 gap-2">
{latestUsers.map((u) => (
{recentUsers.map((u) => (
<div
key={u.username}
className="flex flex-col items-center gap-1"
className="flex flex-col items-center gap-0.5 rounded-lg px-1 py-1"
style={{
background:
"color-mix(in srgb, var(--color-primary) 5%, transparent)",
}}
>
<UserAvatarThumbnail
figure={u.look}
alt={u.username}
options={{ direction: 3 }}
options={{ direction: 2 }}
className="rounded-md"
/>
<span
className="max-w-[64px] truncate text-center text-[11px] font-bold leading-tight"
className="max-w-[64px] truncate text-center text-[10px] font-bold leading-tight"
style={{ color: "var(--color-text-readable)" }}
>
{u.username}
@@ -435,7 +422,7 @@ export default async function Home() {
)}
</Reveal>
{/* Right: News */}
{/* News */}
<Reveal delay={0.15} className="flex w-full flex-col gap-4 md:w-2/3">
<SurfaceCard
title={tp("latestNews")}
@@ -501,91 +488,6 @@ export default async function Home() {
</Reveal>
</div>
{/* ── Online users ── */}
{recentUsers.length > 0 && (
<Reveal>
<SurfaceCard
title={tp("recentUsers")}
icon="/assets/images/icons/navigation/goody.png"
actionHref="/community"
actionLabel={tp("allUsers")}
>
<div className="flex flex-wrap justify-center gap-2">
{recentUsers.slice(0, 12).map((u) => (
<div
key={u.username}
className="flex flex-col items-center gap-0.5 rounded-lg px-2 py-1.5 transition-all duration-200 hover:scale-110 hover:shadow-md"
style={{
background:
"color-mix(in srgb, var(--color-primary) 5%, transparent)",
}}
>
<UserAvatarThumbnail
figure={u.look}
alt={u.username}
options={{ direction: 2 }}
className="rounded-md"
/>
<span
className="max-w-[50px] truncate text-center text-[9px] font-bold leading-tight"
style={{ color: "var(--color-text-readable)" }}
>
{u.username}
</span>
</div>
))}
</div>
</SurfaceCard>
</Reveal>
)}
{/* ── Bottom CTA ── */}
<Reveal>
<div
className="relative overflow-hidden rounded-3xl border px-6 py-12 text-center"
style={{
background: `linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)), color-mix(in srgb, var(--color-surface) 70%, transparent))`,
borderColor:
"color-mix(in srgb, var(--color-primary) 15%, transparent)",
}}
>
<h2
className="mb-2 text-2xl font-black tracking-tight md:text-3xl"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
{tp("joinNow", { hotelName })}
</h2>
<p
className="mb-6 max-w-sm mx-auto text-sm"
style={{ color: "var(--color-text-muted)" }}
>
{tp("welcomeBody")}
</p>
<Link
href="/register"
className="inline-flex items-center gap-2.5 font-extrabold text-sm px-8 py-3.5 rounded-xl transition-all duration-200 hover:scale-[1.03] active:scale-95 shadow-lg"
style={{
background: "var(--color-primary)",
color: "var(--color-primary-foreground)",
boxShadow:
"0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)",
}}
>
<Image
src="/assets/images/EnterHubbly.png"
alt=""
width={20}
height={20}
unoptimized
/>
{tp("register")}
</Link>
</div>
</Reveal>
{/* ── Recent photos ── */}
{recentPhotos.length > 0 && (
<Reveal>
@@ -593,7 +495,7 @@ export default async function Home() {
title={tp("recentPhotos")}
icon="/assets/images/icons/camera.png"
>
<div className="mx-auto grid max-w-sm grid-cols-4 gap-2">
<div className="mx-auto grid max-w-md grid-cols-4 gap-2">
{recentPhotos.slice(0, 4).map((p) => (
<Link
key={p.id}
+56 -46
View File
@@ -17,7 +17,6 @@ import { captchaConfig } from "@/lib/services/captcha";
import { siteSettings } from "@/lib/services/site-settings";
export default async function RegisterPage() {
const th = await getTranslations("header");
const tpr = await getTranslations("pages.register");
const [hotelName, cfg, logo] = await Promise.all([
resolveHotelName(),
@@ -122,63 +121,74 @@ export default async function RegisterPage() {
</Reveal>
<Reveal>
<div className="flex flex-col gap-8 lg:flex-row">
{/* Left panel */}
<div className="lg:w-80 shrink-0 space-y-4">
<div className="flex flex-col gap-8 lg:flex-row lg:items-start">
{/* Left: intro panel */}
<div className="lg:w-96 shrink-0 space-y-4">
<SurfaceCard
className="relative p-6 text-center"
className="relative overflow-hidden p-6"
style={{
borderColor:
"color-mix(in srgb, var(--color-primary) 20%, transparent)",
background: `url(/assets/images/background.png) center/cover no-repeat`,
}}
>
<div
className="absolute inset-0"
style={{
background: `url(/assets/images/background.png) center/cover no-repeat`,
}}
/>
<div
className="absolute inset-0"
style={{
background:
"linear-gradient(135deg, color-mix(in srgb, var(--color-surface) 85%, transparent) 0%, color-mix(in srgb, var(--color-surface) 40%, transparent) 100%)",
"linear-gradient(135deg, color-mix(in srgb, var(--color-surface) 88%, transparent) 0%, color-mix(in srgb, var(--color-surface) 35%, transparent) 100%)",
}}
/>
<div className="relative">
<Image
src="/assets/images/FrankwithBag.gif"
alt="Frank"
width={130}
height={170}
className="object-contain mx-auto drop-shadow-xl animate-float"
unoptimized
priority
/>
<div
className="inline-flex items-center gap-2 px-3.5 py-1 rounded-full text-xs font-bold uppercase tracking-wider mt-4 mb-3 border"
style={{
borderColor:
"color-mix(in srgb, var(--color-primary) 18%, transparent)",
background:
"color-mix(in srgb, var(--color-primary) 10%, transparent)",
color:
"var(--color-primary-readable, var(--color-primary))",
}}
>
<span className="w-2 h-2 rounded-full bg-green-500" />
{tpr("usersOnline", { count: online })}
<div className="flex items-center gap-4">
<div className="shrink-0 animate-float">
<Image
src="/assets/images/FrankwithBag.gif"
alt="Frank"
width={110}
height={145}
className="object-contain drop-shadow-xl"
unoptimized
priority
/>
</div>
<div className="flex-1">
<div
className="inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider mb-2 border"
style={{
borderColor:
"color-mix(in srgb, var(--color-primary) 18%, transparent)",
background:
"color-mix(in srgb, var(--color-primary) 10%, transparent)",
color:
"var(--color-primary-readable, var(--color-primary))",
}}
>
<span className="w-2 h-2 rounded-full bg-green-500" />
{tpr("usersOnline", { count: online })}
</div>
<h1
className="text-lg font-black leading-tight"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
{tpr("title")} — {hotelName}
</h1>
<p
className="text-xs mt-1.5 leading-relaxed"
style={{ color: "var(--color-text-muted)" }}
>
{tpr("subtitle")}
</p>
</div>
</div>
<h1
className="text-xl font-black"
style={{
color: "var(--color-text-readable)",
fontFamily: "var(--font-nunito)",
}}
>
{tpr("title")} — {hotelName}
</h1>
<p
className="text-xs mt-1 mx-auto max-w-[200px] leading-relaxed"
style={{ color: "var(--color-text-muted)" }}
>
{th("tagline")}
</p>
</div>
</SurfaceCard>
@@ -251,7 +261,7 @@ export default async function RegisterPage() {
)}
<p
className="text-xs text-center"
className="text-sm text-center"
style={{ color: "var(--color-text-muted)" }}
>
{tpr("alreadyHaveAccountPre")}{" "}
@@ -268,7 +278,7 @@ export default async function RegisterPage() {
</div>
{/* Right: form */}
<div className="flex-1">
<div className="flex-1 lg:sticky lg:top-6">
<SurfaceCard
title={tpr("title")}
icon="/assets/images/icons/navigation/me.png"
@@ -10,7 +10,7 @@ const compactCallSites = new Map<string, number>([
["src/app/(site)/login/page.tsx", 2],
["src/app/(site)/me/page.tsx", 1],
["src/app/(site)/messages/page.tsx", 2],
["src/app/(site)/page.tsx", 2],
["src/app/(site)/page.tsx", 1],
["src/app/(site)/radio/leaderboard/page.tsx", 1],
["src/app/(site)/radio/shouts/page.tsx", 1],
["src/app/(site)/rankings/page.tsx", 1],
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Онлайн",
"statsCitizens": "Граждани",
"statsRooms": "Стаи",
"statsArticles": "Статии",
"featuresAvatar": "Аватар",
"featuresAvatarDesc": "Създай своя уникален външен вид",
"featuresFurniture": "Мебели",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Občané",
"statsRooms": "Pokoje",
"statsArticles": "Články",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Vytvoř si svůj jedinečný vzhled",
"featuresFurniture": "Nábytek",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Borgere",
"statsRooms": "Værelser",
"statsArticles": "Artikler",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Skab dit unikke look",
"featuresFurniture": "Møbler",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Bürger",
"statsRooms": "Räume",
"statsArticles": "Artikel",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Erstelle deinen einzigartigen Look",
"featuresFurniture": "Möbel",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Συνδεδεμένοι",
"statsCitizens": "Πολίτες",
"statsRooms": "Δωμάτια",
"statsArticles": "Άρθρα",
"featuresAvatar": "Άβαταρ",
"featuresAvatarDesc": "Δημιούργησε τη μοναδική σου εμφάνιση",
"featuresFurniture": "Έπιπλα",
+1
View File
@@ -236,6 +236,7 @@
"statsOnline": "Online",
"statsCitizens": "Citizens",
"statsRooms": "Rooms",
"statsArticles": "Articles",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Create your unique look",
"featuresFurniture": "Furniture",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "En línea",
"statsCitizens": "Ciudadanos",
"statsRooms": "Salas",
"statsArticles": "Artículos",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Crea tu look único",
"featuresFurniture": "Muebles",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "En ligne",
"statsCitizens": "Citoyens",
"statsRooms": "Salons",
"statsArticles": "Articles",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Crée ton look unique",
"featuresFurniture": "Meubles",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Građani",
"statsRooms": "Sobe",
"statsArticles": "Članci",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Stvori svoj jedinstveni izgled",
"featuresFurniture": "Namještaj",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Polgárok",
"statsRooms": "Szobák",
"statsArticles": "Cikkek",
"featuresAvatar": "Avatár",
"featuresAvatarDesc": "Hozd létre egyedi megjelenésed",
"featuresFurniture": "Bútorok",
+1
View File
@@ -236,6 +236,7 @@
"statsOnline": "Online",
"statsCitizens": "Cittadini",
"statsRooms": "Stanze",
"statsArticles": "Articoli",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Crea il tuo look unico",
"featuresFurniture": "Arredi",
+1
View File
@@ -234,6 +234,7 @@
"statsOnline": "Online",
"statsCitizens": "Burgers",
"statsRooms": "Kamers",
"statsArticles": "Artikelen",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Maak je eigen unieke look",
"featuresFurniture": "Meubels",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Innbyggere",
"statsRooms": "Rom",
"statsArticles": "Artikler",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Skap ditt unike utseende",
"featuresFurniture": "Møbler",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Obywatele",
"statsRooms": "Pokoje",
"statsArticles": "Artykuły",
"featuresAvatar": "Awatar",
"featuresAvatarDesc": "Stwórz swój niepowtarzalny wygląd",
"featuresFurniture": "Meble",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Cidadãos",
"statsRooms": "Salas",
"statsArticles": "Artigos",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Crie seu visual único",
"featuresFurniture": "Móveis",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Cetățeni",
"statsRooms": "Camere",
"statsArticles": "Articole",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Creează-ți aspectul unic",
"featuresFurniture": "Mobilier",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Онлайн",
"statsCitizens": "Граждане",
"statsRooms": "Комнаты",
"statsArticles": "Статьи",
"featuresAvatar": "Аватар",
"featuresAvatarDesc": "Создай свой уникальный образ",
"featuresFurniture": "Мебель",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Občania",
"statsRooms": "Izby",
"statsArticles": "Články",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Vytvor si svoj jedinečný vzhľad",
"featuresFurniture": "Nábytok",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Онлајн",
"statsCitizens": "Грађани",
"statsRooms": "Собе",
"statsArticles": "Чланци",
"featuresAvatar": "Аватар",
"featuresAvatarDesc": "Направи свој јединствени изглед",
"featuresFurniture": "Намештај",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Online",
"statsCitizens": "Medborgare",
"statsRooms": "Rum",
"statsArticles": "Artiklar",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Skapa din unika look",
"featuresFurniture": "Möbler",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Çevrimiçi",
"statsCitizens": "Vatandaşlar",
"statsRooms": "Odalar",
"statsArticles": "Makaleler",
"featuresAvatar": "Avatar",
"featuresAvatarDesc": "Kendine özgü görünümünü oluştur",
"featuresFurniture": "Mobilya",
+1
View File
@@ -194,6 +194,7 @@
"statsOnline": "Онлайн",
"statsCitizens": "Громадяни",
"statsRooms": "Кімнати",
"statsArticles": "Статті",
"featuresAvatar": "Аватар",
"featuresAvatarDesc": "Створи свій унікальний вигляд",
"featuresFurniture": "Меблі",