Premium index page redesign with hubbly icons, Habbo gradient headers, login sidebar, scroll animations
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m58s

This commit is contained in:
openhands committed 2026-07-23 16:52:08 +02:00
1 parent 24c4279a7e
commit 4457117fa9
1 file changed
+235 -188
+235 -188
View File
@@ -1,6 +1,7 @@
import Image from "next/image"; import Image from "next/image";
import Link from "next/link"; import Link from "next/link";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import { headers } from "next/headers";
import { getTranslations } from "next-intl/server"; import { getTranslations } from "next-intl/server";
import { cached } from "@/lib/cache"; import { cached } from "@/lib/cache";
import { avatarImageUrl } from "@/lib/format"; import { avatarImageUrl } from "@/lib/format";
@@ -8,9 +9,12 @@ import { formatDate } from "@/lib/format-date";
import { prisma } from "@/lib/prisma"; import { prisma } from "@/lib/prisma";
import { resolveHotelName } from "@/lib/hotel-name"; import { resolveHotelName } from "@/lib/hotel-name";
import { siteSettings } from "@/lib/services/site-settings"; import { siteSettings } from "@/lib/services/site-settings";
import { captchaConfig } from "@/lib/services/captcha";
import { auth } from "@/lib/auth"; import { auth } from "@/lib/auth";
import { ThemeSwitcher } from "@/components/theme-switcher"; import { ThemeSwitcher } from "@/components/theme-switcher";
import { LanguageSwitcher } from "@/components/language-switcher"; import { LanguageSwitcher } from "@/components/language-switcher";
import { HomeLoginForm } from "@/components/auth/home-login-form";
import { Reveal } from "@/components/motion-reveal";
export const revalidate = 120; export const revalidate = 120;
@@ -53,17 +57,7 @@ async function getHotelData() {
.catch(() => []), .catch(() => []),
]); ]);
return { return { hotelName, imager, online, users, rooms, articles, recentUsers, recentPhotos, latestUsers };
hotelName,
imager,
online,
users,
rooms,
articles,
recentUsers,
recentPhotos,
latestUsers,
};
} }
export default async function Home() { export default async function Home() {
@@ -72,77 +66,32 @@ export default async function Home() {
const tp = await getTranslations("pages.home"); const tp = await getTranslations("pages.home");
const th = await getTranslations("header"); const th = await getTranslations("header");
const { const { hotelName, imager, online, users, rooms, articles, recentUsers, recentPhotos, latestUsers } = await getHotelData();
hotelName,
imager, const captcha = await captchaConfig();
online, const nonce = (await headers()).get("x-nonce") ?? undefined;
users,
rooms,
articles,
recentUsers,
recentPhotos,
latestUsers,
} = await getHotelData();
return ( return (
<div className="flex flex-col gap-14 pb-14"> <div className="flex flex-col gap-10 pb-14">
<style>{`
@keyframes hero-glow { {/* ── Hero ── */}
0%, 100% { opacity: 0.08; transform: scale(1); } <Reveal>
50% { opacity: 0.15; transform: scale(1.05); }
}
.hero-glow {
animation: hero-glow 6s ease-in-out infinite;
}
`}</style>
{/* ── Toolbar ── */}
<div className="relative">
<div <div
className="absolute -inset-6 rounded-full opacity-[0.06] blur-[40px]" className="relative overflow-hidden rounded-2xl border"
style={{ background: "var(--color-primary)" }}
/>
<div
className="relative flex items-center justify-between rounded-2xl border px-5 py-3"
style={{
background: "color-mix(in srgb, var(--color-surface) 50%, transparent)",
backdropFilter: "blur(12px)",
WebkitBackdropFilter: "blur(12px)",
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
}}
>
<span className="text-xs font-bold uppercase tracking-[0.15em] opacity-40" style={{ color: "var(--color-text-muted)" }}>
{hotelName}
</span>
<div className="flex items-center gap-1">
<LanguageSwitcher />
<div className="w-px h-5 mx-1" style={{ background: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)" }} />
<ThemeSwitcher />
</div>
</div>
</div>
{/* ── 1. Hero ── */}
<div
className="relative overflow-hidden rounded-3xl border px-6 py-10 md:px-10 md:py-14 lg:py-16"
style={{ style={{
background: `url(/assets/images/next_header.jpg) center/cover no-repeat`, background: `url(/assets/images/next_header.jpg) center/cover no-repeat`,
backgroundPosition: "center 20%",
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)", borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
}} }}
> >
<div
className="absolute inset-0 hero-glow"
style={{
background: "radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--color-primary) 20%, transparent) 0%, transparent 60%)",
}}
/>
<div <div
className="absolute inset-0" className="absolute inset-0"
style={{ style={{
background: background: "linear-gradient(135deg, color-mix(in srgb, var(--color-surface) 90%, transparent) 0%, color-mix(in srgb, var(--color-surface) 35%, transparent) 50%, color-mix(in srgb, var(--color-surface) 10%, transparent) 100%)",
"linear-gradient(135deg, color-mix(in srgb, var(--color-surface) 85%, transparent) 0%, color-mix(in srgb, var(--color-surface) 40%, transparent) 50%, color-mix(in srgb, var(--color-surface) 15%, transparent) 100%)",
}} }}
/> />
<div className="relative flex flex-col lg:flex-row items-center gap-8 lg:gap-14"> <div className="relative flex flex-col md:flex-row items-center gap-8 px-6 py-10 md:px-10 md:py-14">
<div className="flex-1 text-center lg:text-left"> <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-widest mb-5 border backdrop-blur-sm" 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={{ style={{
@@ -158,18 +107,18 @@ export default async function Home() {
{th("online", { count: online, hotel: hotelName })} {th("online", { count: online, hotel: hotelName })}
</div> </div>
<h1 <h1
className="text-4xl md:text-5xl lg:text-6xl font-black leading-[1.05] tracking-tight mb-4" className="text-4xl md:text-5xl lg:text-6xl font-black leading-[1.05] tracking-tight mb-3"
style={{ color: "var(--color-text-readable)" }} style={{ color: "var(--color-text-readable)" }}
> >
{tp("welcome", { hotelName })} {tp("welcome", { hotelName })}
</h1> </h1>
<p <p
className="text-base md:text-lg leading-relaxed max-w-xl mb-8" className="text-base md:text-lg leading-relaxed max-w-xl mb-7"
style={{ color: "var(--color-text-muted)" }} style={{ color: "var(--color-text-muted)" }}
> >
{th("tagline")} {th("tagline")}
</p> </p>
<div className="flex flex-wrap gap-3 justify-center lg:justify-start"> <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.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" 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"
@@ -203,8 +152,8 @@ export default async function Home() {
<Image <Image
src="/assets/images/FrankwithBag.gif" src="/assets/images/FrankwithBag.gif"
alt="Frank" alt="Frank"
width={180} width={170}
height={240} height={230}
className="object-contain drop-shadow-2xl relative" className="object-contain drop-shadow-2xl relative"
unoptimized unoptimized
priority priority
@@ -212,8 +161,10 @@ export default async function Home() {
</div> </div>
</div> </div>
</div> </div>
</Reveal>
{/* ── 2. Stats ── */} {/* ── Stats ── */}
<Reveal>
<div className="grid grid-cols-3 gap-4"> <div className="grid grid-cols-3 gap-4">
{[ {[
{ value: online.toLocaleString(), label: tp("statsOnline"), icon: "/assets/images/icons/navigation/home.png" }, { value: online.toLocaleString(), label: tp("statsOnline"), icon: "/assets/images/icons/navigation/home.png" },
@@ -222,7 +173,7 @@ export default async function Home() {
].map((s) => ( ].map((s) => (
<div <div
key={s.label} key={s.label}
className="relative overflow-hidden rounded-2xl border p-5 text-center transition-all duration-200 hover:-translate-y-0.5" className="relative overflow-hidden rounded-xl border p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
style={{ style={{
background: "color-mix(in srgb, var(--color-surface) 70%, transparent)", background: "color-mix(in srgb, var(--color-surface) 70%, transparent)",
backdropFilter: "blur(8px)", backdropFilter: "blur(8px)",
@@ -235,7 +186,12 @@ export default async function Home() {
style={{ background: "var(--color-primary)" }} style={{ background: "var(--color-primary)" }}
/> />
<div className="relative"> <div className="relative">
<Image src={s.icon} alt="" width={28} height={28} className="mx-auto mb-1.5 opacity-50" unoptimized /> <div
className="w-10 h-10 rounded-xl flex items-center justify-center mx-auto mb-2.5"
style={{ background: "color-mix(in srgb, var(--color-primary) 14%, transparent)" }}
>
<Image src={s.icon} alt="" width={24} height={24} unoptimized />
</div>
<div className="text-3xl md:text-4xl font-black tracking-tight mb-0.5" style={{ color: "var(--color-primary)" }}> <div className="text-3xl md:text-4xl font-black tracking-tight mb-0.5" style={{ color: "var(--color-primary)" }}>
{s.value} {s.value}
</div> </div>
@@ -246,9 +202,164 @@ export default async function Home() {
</div> </div>
))} ))}
</div> </div>
</Reveal>
{/* ── 3. Features ── */} {/* ── Login + News ── */}
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-4"> <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">
<div
className="overflow-hidden rounded-xl border"
style={{
borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
}}
>
<div
className="flex items-center gap-2.5 px-4 py-3"
style={{
background: "linear-gradient(140deg, #1a3a5c 0%, #1e4a6e 20%, #2a5a80 40%, #3a6a90 60%, #4a7aa0 75%, #3a6a90 90%, #2a5a80 100%)",
}}
>
<Image src="/assets/images/icons/navigation/me.png" alt="" width={18} height={18} unoptimized />
<h2 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
Login
</h2>
</div>
<div className="p-3" style={{ backgroundColor: "var(--color-surface)" }}>
<HomeLoginForm captcha={{ provider: captcha.provider, siteKey: captcha.siteKey || undefined, field: captcha.field || undefined }} nonce={nonce} />
</div>
</div>
<Link href="/register" className="relative block group">
<div className="overflow-hidden rounded-xl border transition-all duration-200 group-hover:shadow-lg" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)" }}>
<Image src="/assets/images/EnterHubbly.png" alt="Register" width={300} height={100} className="block w-full" unoptimized />
</div>
<span className="pointer-events-none absolute inset-0 flex items-center text-2xl md:text-3xl font-extrabold text-white text-shadow" style={{ marginLeft: "18px" }}>
{tp("register")}
</span>
</Link>
{latestUsers.length > 0 && (
<div className="overflow-hidden rounded-xl border" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)", backgroundColor: "var(--color-surface)" }}>
<div
className="flex items-center gap-2.5 px-4 py-3"
style={{
background: "linear-gradient(140deg, #0A1F0A 0%, #0F2D0F 20%, #153C15 40%, #1B4A1B 60%, #205820 75%, #1A4A1A 90%, #143814 100%)",
}}
>
<Image src="/assets/images/icons/navigation/goody.png" alt="" width={18} height={18} unoptimized />
<h2 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
{tp("latestUsers", { count: users.toLocaleString() })}
</h2>
</div>
<div className="grid grid-cols-4 sm:grid-cols-6 gap-2 p-3">
{latestUsers.map((u) => (
<div key={u.username} className="flex flex-col items-center gap-1">
<div className="relative overflow-visible">
<Image
src={avatarImageUrl(imager, u.look, { headOnly: true, direction: 3 })}
alt={u.username}
width={42}
height={52}
style={{ marginTop: "-6px" }}
unoptimized
/>
</div>
<span className="text-[9px] font-bold truncate max-w-[48px] text-center leading-tight" style={{ color: "var(--color-text-readable)" }}>
{u.username}
</span>
</div>
))}
</div>
</div>
)}
</Reveal>
{/* Right: News */}
<Reveal delay={0.15} className="flex w-full flex-col gap-4 md:w-2/3">
<div className="overflow-hidden rounded-xl border" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)", backgroundColor: "var(--color-surface)" }}>
<div
className="flex items-center justify-between px-4 py-3"
style={{
background: "linear-gradient(140deg, #1a3a5c 0%, #1e4a6e 20%, #2a5a80 40%, #3a6a90 60%, #4a7aa0 75%, #3a6a90 90%, #2a5a80 100%)",
}}
>
<div className="flex items-center gap-2.5">
<Image src="/assets/images/icons/article.gif" alt="" width={18} height={18} unoptimized />
<h2 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
{tp("latestNews")}
</h2>
</div>
<Link href="/news" className="text-xs font-bold text-white/80 hover:text-white hover:underline">
{tp("allNews")}
</Link>
</div>
<div className="p-4">
{articles.length > 0 ? (
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
{articles.slice(0, 4).map((a) => (
<Link
key={a.slug}
href={`/news/${a.slug}`}
className="group relative w-full overflow-hidden rounded-lg transition-all duration-200"
style={{
height: "200px",
backgroundColor: "var(--color-background)",
border: "1px solid color-mix(in srgb, var(--color-text-muted) 10%, transparent)",
}}
>
<div className="relative h-full w-full overflow-hidden rounded-lg">
<Image
src={a.image}
alt={a.title}
fill
className="rounded-lg object-cover transition-all duration-300 group-hover:scale-105"
unoptimized
/>
<div
className="absolute left-0 w-full p-2.5"
style={{
bottom: 0,
background: "linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%)",
}}
>
<h3 className="truncate text-base font-bold text-white text-shadow-sm">
{a.title}
</h3>
<p className="text-[11px] font-semibold mt-0.5 opacity-80" style={{ color: "var(--color-text-muted)" }}>
{formatDate(a.createdAt, "date", "")}
</p>
</div>
</div>
</Link>
))}
</div>
) : (
<p className="py-8 text-center text-sm" style={{ color: "var(--color-text-muted)" }}>
{tp("noArticles")}
</p>
)}
</div>
</div>
</Reveal>
</div>
{/* ── Features ── */}
<Reveal>
<div className="overflow-hidden rounded-xl border" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)", backgroundColor: "var(--color-surface)" }}>
<div
className="flex items-center gap-2.5 px-4 py-3"
style={{
background: "linear-gradient(140deg, #5a2d82 0%, #6b3a9e 20%, #7d47b8 40%, #8f54d0 60%, #7d47b8 75%, #6b3a9e 90%, #5a2d82 100%)",
}}
>
<Image src="/assets/images/icons/star.gif" alt="" width={18} height={18} unoptimized />
<h2 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
{hotelName} Features
</h2>
</div>
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-px p-4" style={{ background: "color-mix(in srgb, var(--color-text-muted) 6%, transparent)" }}>
{[ {[
{ img: "/assets/images/icons/star.gif", title: tp("featuresAvatar"), desc: tp("featuresAvatarDesc") }, { img: "/assets/images/icons/star.gif", title: tp("featuresAvatar"), desc: tp("featuresAvatarDesc") },
{ img: "/assets/images/icons/catalog.png", title: tp("featuresFurniture"), desc: tp("featuresFurnitureDesc") }, { img: "/assets/images/icons/catalog.png", title: tp("featuresFurniture"), desc: tp("featuresFurnitureDesc") },
@@ -257,21 +368,16 @@ export default async function Home() {
].map((f) => ( ].map((f) => (
<div <div
key={f.title} key={f.title}
className="rounded-2xl border p-5 transition-all duration-200 hover:-translate-y-0.5" className="rounded-lg p-4 transition-all duration-200 hover:-translate-y-0.5"
style={{ style={{ background: "var(--color-surface)" }}
background: "color-mix(in srgb, var(--color-surface) 70%, transparent)",
backdropFilter: "blur(8px)",
WebkitBackdropFilter: "blur(8px)",
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
}}
> >
<div <div
className="w-11 h-11 rounded-xl flex items-center justify-center mb-3.5" className="w-11 h-11 rounded-xl flex items-center justify-center mb-3"
style={{ background: "color-mix(in srgb, var(--color-primary) 12%, transparent)" }} style={{ background: "color-mix(in srgb, var(--color-primary) 14%, transparent)" }}
> >
<Image src={f.img} alt="" width={24} height={24} unoptimized /> <Image src={f.img} alt="" width={24} height={24} unoptimized />
</div> </div>
<h3 className="text-sm font-extrabold mb-1.5" style={{ color: "var(--color-text-readable)" }}> <h3 className="text-sm font-extrabold mb-1" style={{ color: "var(--color-text-readable)" }}>
{f.title} {f.title}
</h3> </h3>
<p className="text-xs leading-relaxed" style={{ color: "var(--color-text-muted)" }}> <p className="text-xs leading-relaxed" style={{ color: "var(--color-text-muted)" }}>
@@ -280,106 +386,31 @@ export default async function Home() {
</div> </div>
))} ))}
</div> </div>
</div>
</Reveal>
{/* ── 4. Newest citizens ── */} {/* ── Online users ── */}
{latestUsers.length > 0 && (
<div>
<h2 className="text-xl font-black tracking-tight mb-4" style={{ color: "var(--color-text-readable)" }}>
{tp("latestUsers", { count: users.toLocaleString() })}
</h2>
<div className="grid grid-cols-4 sm:grid-cols-8 gap-3">
{latestUsers.map((u) => (
<div
key={u.username}
className="flex flex-col items-center gap-1.5 p-3 rounded-2xl border transition-all duration-200 hover:-translate-y-1 hover:shadow-lg"
style={{
background: "color-mix(in srgb, var(--color-surface) 70%, transparent)",
backdropFilter: "blur(8px)",
WebkitBackdropFilter: "blur(8px)",
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
}}
>
<div className="relative">
<div className="absolute -inset-2 rounded-full opacity-[0.1] blur-[12px]" style={{ background: "var(--color-primary)" }} />
<Image
src={avatarImageUrl(imager, u.look, { headOnly: true, direction: 2, size: "m" })}
alt={u.username}
width={40}
height={50}
className="rounded-lg relative"
unoptimized
/>
</div>
<span className="text-[10px] font-bold truncate max-w-[64px] text-center leading-tight" style={{ color: "var(--color-text-readable)" }}>
{u.username}
</span>
</div>
))}
</div>
</div>
)}
{/* ── 5. News ── */}
<div className="space-y-4">
<div className="flex items-center justify-between">
<h2 className="text-xl font-black tracking-tight" style={{ color: "var(--color-text-readable)" }}>
{tp("latestNews")}
</h2>
<Link href="/news" className="text-sm font-bold hover:underline" style={{ color: "var(--color-primary)" }}>
{tp("allNews")}
</Link>
</div>
{articles.length > 0 ? (
<div className="grid sm:grid-cols-2 gap-4">
{articles.slice(0, 4).map((a) => (
<Link
key={a.slug}
href={`/news/${a.slug}`}
className="flex gap-4 items-start rounded-2xl border p-4 transition-all duration-200 hover:-translate-y-0.5"
style={{
background: "color-mix(in srgb, var(--color-surface) 70%, transparent)",
backdropFilter: "blur(8px)",
WebkitBackdropFilter: "blur(8px)",
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
textDecoration: "none",
}}
>
<div className="relative w-14 h-14 shrink-0 rounded-xl 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%, transparent)` }} />
)}
</div>
<div className="min-w-0">
<h3 className="text-sm font-extrabold leading-snug" style={{ color: "var(--color-text-readable)" }}>
{a.title}
</h3>
<p className="text-xs font-semibold mt-1" style={{ color: "var(--color-text-muted)" }}>
{formatDate(a.createdAt, "date", "")}
</p>
</div>
</Link>
))}
</div>
) : (
<p className="text-sm" style={{ color: "var(--color-text-muted)" }}>{tp("noArticles")}</p>
)}
</div>
{/* ── 6. Online users row ── */}
{recentUsers.length > 0 && ( {recentUsers.length > 0 && (
<div className="text-center"> <Reveal>
<h3 className="text-xs font-bold uppercase tracking-widest mb-3 flex items-center justify-center gap-2" style={{ color: "var(--color-text-muted)" }}> <div className="overflow-hidden rounded-xl border" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)", backgroundColor: "var(--color-surface)" }}>
<span className="w-2 h-2 rounded-full bg-green-500" /> <div
className="flex items-center gap-2.5 px-4 py-3"
style={{
background: "linear-gradient(140deg, #0A1F0A 0%, #0F2D0F 20%, #153C15 40%, #1B4A1B 60%, #205820 75%, #1A4A1A 90%, #143814 100%)",
}}
>
<Image src="/assets/images/icons/navigation/goody.png" alt="" width={18} height={18} unoptimized />
<h3 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
{tp("recentUsers")} {tp("recentUsers")}
</h3> </h3>
</div>
<div className="p-4">
<div className="flex flex-wrap justify-center gap-2"> <div className="flex flex-wrap justify-center gap-2">
{recentUsers.slice(0, 10).map((u) => ( {recentUsers.slice(0, 12).map((u) => (
<div <div
key={u.username} key={u.username}
className="flex flex-col items-center gap-0.5 px-2 py-1.5 rounded-xl transition-all duration-200 hover:scale-110" className="flex flex-col items-center gap-0.5 px-2 py-1.5 rounded-lg transition-all duration-200 hover:scale-110 hover:shadow-md"
style={{ background: "color-mix(in srgb, var(--color-primary) 4%, transparent)" }} style={{ background: "color-mix(in srgb, var(--color-primary) 5%, transparent)" }}
> >
<Image <Image
src={avatarImageUrl(imager, u.look, { headOnly: true, direction: 2, size: "s" })} src={avatarImageUrl(imager, u.look, { headOnly: true, direction: 2, size: "s" })}
@@ -396,11 +427,14 @@ export default async function Home() {
))} ))}
</div> </div>
</div> </div>
</div>
</Reveal>
)} )}
{/* ── 7. Bottom CTA ── */} {/* ── Bottom CTA ── */}
<Reveal>
<div <div
className="relative overflow-hidden rounded-2xl border text-center px-6 py-10" className="relative overflow-hidden rounded-xl border text-center px-6 py-10"
style={{ 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))`, 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)", borderColor: "color-mix(in srgb, var(--color-primary) 15%, transparent)",
@@ -425,16 +459,27 @@ export default async function Home() {
{tp("register")} {tp("register")}
</Link> </Link>
</div> </div>
</Reveal>
{/* ── 8. Recent photos (compact) ── */} {/* ── Recent photos ── */}
{recentPhotos.length > 0 && ( {recentPhotos.length > 0 && (
<div className="text-center"> <Reveal>
<h3 className="text-xs font-bold uppercase tracking-widest mb-3" style={{ color: "var(--color-text-muted)" }}> <div className="overflow-hidden rounded-xl border" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)", backgroundColor: "var(--color-surface)" }}>
<div
className="flex items-center gap-2.5 px-4 py-3"
style={{
background: "linear-gradient(140deg, #5a2d82 0%, #6b3a9e 20%, #7d47b8 40%, #8f54d0 60%, #7d47b8 75%, #6b3a9e 90%, #5a2d82 100%)",
}}
>
<Image src="/assets/images/icons/camera.png" alt="" width={18} height={18} unoptimized />
<h3 className="text-sm font-bold text-white" style={{ fontFamily: "var(--font-pixel)" }}>
{tp("recentPhotos")} {tp("recentPhotos")}
</h3> </h3>
</div>
<div className="p-4">
<div className="grid grid-cols-4 gap-2 max-w-sm mx-auto"> <div className="grid grid-cols-4 gap-2 max-w-sm mx-auto">
{recentPhotos.slice(0, 4).map((p) => ( {recentPhotos.slice(0, 4).map((p) => (
<Link key={p.id} href="/photos" className="block rounded-lg overflow-hidden aspect-square"> <Link key={p.id} href="/photos" className="block rounded-lg overflow-hidden aspect-square border transition-all duration-200 hover:shadow-md" style={{ borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)" }}>
<Image <Image
src={p.url} src={p.url}
alt="" alt=""
@@ -447,6 +492,8 @@ export default async function Home() {
))} ))}
</div> </div>
</div> </div>
</div>
</Reveal>
)} )}
</div> </div>
); );