diff --git a/src/app/(site)/page.tsx b/src/app/(site)/page.tsx index a4032ef5..afc4aadb 100644 --- a/src/app/(site)/page.tsx +++ b/src/app/(site)/page.tsx @@ -11,18 +11,6 @@ import { siteSettings } from "@/lib/services/site-settings"; import { auth } from "@/lib/auth"; import { ThemeSwitcher } from "@/components/theme-switcher"; import { LanguageSwitcher } from "@/components/language-switcher"; -import { - HabboHome, - HabboUser, - HabboCatalog, - HabboStar, - HabboCommunity, - HabboGames, - HabboEnter, - HabboNews, - HabboOnline, - HabboCamera, -} from "@/components/shared/habbo-icons"; export const revalidate = 120; @@ -97,15 +85,24 @@ export default async function Home() { } = await getHotelData(); return ( -
+
+ {/* ── Toolbar ── */}
- {/* ── 1. Hero ── */}
-
-
+
+
+

{tp("welcome", { hotelName })}

@@ -177,7 +179,7 @@ export default async function Home() { boxShadow: "0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)", }} > - + {tp("register")} {[ - { value: online.toLocaleString(), label: tp("statsOnline"), icon: HabboHome }, - { value: users.toLocaleString(), label: tp("statsCitizens"), icon: HabboUser }, - { value: rooms.toLocaleString(), label: tp("statsRooms"), icon: HabboCatalog }, - ].map(({ value, label, icon: Icon }) => ( + { value: online.toLocaleString(), label: tp("statsOnline"), icon: "/assets/images/icons/navigation/home.png" }, + { value: users.toLocaleString(), label: tp("statsCitizens"), icon: "/assets/images/icons/navigation/me.png" }, + { value: rooms.toLocaleString(), label: tp("statsRooms"), icon: "/assets/images/icons/catalog.png" }, + ].map((s) => (
- -
+ className="absolute -top-6 -right-6 w-20 h-20 rounded-full opacity-[0.06]" + style={{ background: "var(--color-primary)" }} + />
+
- {value} + {s.value}
- {label} + {s.label}
@@ -249,14 +250,14 @@ export default async function Home() { {/* ── 3. Features ── */}
{[ - { icon: HabboStar, title: tp("featuresAvatar"), desc: tp("featuresAvatarDesc") }, - { icon: HabboCatalog, title: tp("featuresFurniture"), desc: tp("featuresFurnitureDesc") }, - { icon: HabboCommunity, title: tp("featuresCommunity"), desc: tp("featuresCommunityDesc") }, - { icon: HabboGames, title: tp("featuresGames"), desc: tp("featuresGamesDesc") }, - ].map(({ icon: Icon, title, desc }) => ( + { 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/navigation/community.png", title: tp("featuresCommunity"), desc: tp("featuresCommunityDesc") }, + { img: "/assets/images/icons/navigation/bb.png", title: tp("featuresGames"), desc: tp("featuresGamesDesc") }, + ].map((f) => (
- +

- {title} + {f.title}

- {desc} + {f.desc}

))} @@ -282,163 +283,130 @@ export default async function Home() { {/* ── 4. Newest citizens ── */} {latestUsers.length > 0 && ( -
-
- -

- {tp("latestUsers", { count: users.toLocaleString() })} -

-
-
-
- {latestUsers.map((u) => ( -
-
- {u.username} -
- - {u.username} - +
+

+ {tp("latestUsers", { count: users.toLocaleString() })} +

+
+ {latestUsers.map((u) => ( +
+
+
+ {u.username}
- ))} -
+ + {u.username} + +
+ ))}
)} {/* ── 5. News ── */} -
-
-
- -

- {tp("latestNews")} -

-
- +
+
+

+ {tp("latestNews")} +

+ {tp("allNews")}
-
- {articles.length > 0 ? ( -
- {articles.slice(0, 4).map((a) => ( - -
- {a.image ? ( - - ) : ( -
- )} -
-
-

- {a.title} -

-

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

-
- - ))} -
- ) : ( -

{tp("noArticles")}

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

+ {a.title} +

+

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

+
+ + ))} +
+ ) : ( +

{tp("noArticles")}

+ )}
{/* ── 6. Online users row ── */} {recentUsers.length > 0 && ( -
-
- -

- {tp("recentUsers")} -

-
-
-
- {recentUsers.slice(0, 12).map((u) => ( -
- {u.username} - - {u.username} - -
- ))} -
+
+

+ + {tp("recentUsers")} +

+
+ {recentUsers.slice(0, 10).map((u) => ( +
+ {u.username} + + {u.username} + +
+ ))}
)} {/* ── 7. Bottom CTA ── */}
-

+

{tp("joinNow", { hotelName })}

@@ -453,43 +421,30 @@ export default async function Home() { boxShadow: "0 4px 24px color-mix(in srgb, var(--color-primary) 35%, transparent)", }} > - + {tp("register")}

{/* ── 8. Recent photos (compact) ── */} {recentPhotos.length > 0 && ( -
-
- -

- {tp("recentPhotos")} -

-
-
-
- {recentPhotos.slice(0, 4).map((p) => ( - - - - ))} -
+
+

+ {tp("recentPhotos")} +

+
+ {recentPhotos.slice(0, 4).map((p) => ( + + + + ))}
)} diff --git a/src/components/mobile-nav.tsx b/src/components/mobile-nav.tsx index dd6a2fe9..de76d8e1 100644 --- a/src/components/mobile-nav.tsx +++ b/src/components/mobile-nav.tsx @@ -1,10 +1,10 @@ "use client"; import { AnimatePresence, motion } from "framer-motion"; +import Image from "next/image"; import { type ReactNode, useRef, useState } from "react"; import { FALLBACK_HOTEL_NAME } from "@/lib/brand"; import { mobileMenuVariants } from "@/lib/motion"; -import { HabboHome } from "@/components/shared/habbo-icons"; interface MobileNavProps { children: ReactNode; @@ -88,7 +88,13 @@ export function MobileNav({ "color-mix(in srgb, var(--color-primary) 12%, transparent)", }} > - + {icon ? ( - {icon} + ) : null} {label} - - {t("home")} + + {t("home")}
@@ -72,7 +68,7 @@ export async function Navigation({ session }: { session: Session | null }) {
} + icon="/assets/images/icons/navigation/community.png" > {t("articles")} @@ -99,7 +95,7 @@ export async function Navigation({ session }: { session: Session | null }) { } + icon="/assets/images/icons/navigation/shop.png" > {t("shop")} @@ -113,18 +109,30 @@ export async function Navigation({ session }: { session: Session | null }) { - - {t("leaderboards")} + + {t("leaderboards")} - - {t("radio")} + + {t("radio")} } + icon="/assets/images/icons/navigation/rules.gif" > {t("helpCenter")} @@ -149,27 +157,51 @@ export async function Navigation({ session }: { session: Session | null }) { {session?.user ? ( <> - - {t("friends")} + + {t("friends")} - - {t("messages")} + + {t("messages")} ) : null} {showMod ? ( - - {t("mod")} + + {t("mod")} ) : null} {showAdmin ? ( - - {t("admin")} + + {t("admin")} ) : null}
@@ -181,13 +213,19 @@ export async function Navigation({ session }: { session: Session | null }) { brandLabel={brandLabel} > - - {t("home")} + + {t("home")} } + icon="/assets/images/icons/navigation/community.png" > {t("articles")} @@ -214,7 +252,7 @@ export async function Navigation({ session }: { session: Session | null }) { } + icon="/assets/images/icons/navigation/shop.png" > {t("shop")} @@ -228,18 +266,30 @@ export async function Navigation({ session }: { session: Session | null }) { - - {t("leaderboards")} + + {t("leaderboards")} - - {t("radio")} + + {t("radio")} } + icon="/assets/images/icons/navigation/rules.gif" > {t("helpCenter")} @@ -264,27 +314,51 @@ export async function Navigation({ session }: { session: Session | null }) { {session?.user ? ( <> - - {t("friends")} + + {t("friends")} - - {t("messages")} + + {t("messages")} ) : null} {showMod ? ( - - {t("mod")} + + {t("mod")} ) : null} {showAdmin ? ( - - {t("admin")} + + {t("admin")} ) : null} @@ -307,7 +381,12 @@ export async function Navigation({ session }: { session: Session | null }) { className="ml-auto flex md:hidden items-center gap-2 shrink-0" aria-label="Home" > - + & { size?: number }; - -function IconSvg({ - children, - size = 24, - viewBox = "0 0 24 24", - ...props -}: IconProps & { viewBox?: string }) { - return ( - - {children} - - ); -} - -export function HabboHome({ size, ...props }: IconProps) { - return ( - - - - - - - - - ); -} - -export function HabboUser({ size, ...props }: IconProps) { - return ( - - - - - - - ); -} - -export function HabboCatalog({ size, ...props }: IconProps) { - return ( - - - - - - - - ); -} - -export function HabboStar({ size, ...props }: IconProps) { - return ( - - - - - - - - - - - - ); -} - -export function HabboCommunity({ size, ...props }: IconProps) { - return ( - - - - - - - - - ); -} - -export function HabboGames({ size, ...props }: IconProps) { - return ( - - - - - - - - - - ); -} - -export function HabboEnter({ size, ...props }: IconProps) { - return ( - - - - - - - ); -} - -export function HabboNews({ size, ...props }: IconProps) { - return ( - - - - - - - - - - ); -} - -export function HabboOnline({ size, ...props }: IconProps) { - return ( - - - - - - - - - ); -} - -export function HabboCamera({ size, ...props }: IconProps) { - return ( - - - - - - - - - ); -} - -export function HabboChat({ size, ...props }: IconProps) { - return ( - - - - - - - - - ); -} - -export function HabboClock({ size, ...props }: IconProps) { - return ( - - - - - - - - ); -} - -export function HabboHeart({ size, ...props }: IconProps) { - return ( - - - - - - - - - - - ); -} - -export function HabboArrowRight({ size, ...props }: IconProps) { - return ( - - - - - ); -} - -export function HabboCog({ size, ...props }: IconProps) { - return ( - - - - - - - - - - - - - ); -} - -export function HabboFurni({ size, ...props }: IconProps) { - return ( - - - - - - - - - - ); -} - -export function HabboDiamond({ size, ...props }: IconProps) { - return ( - - - - - - - - ); -} - -export function HabboCredits({ size, ...props }: IconProps) { - return ( - - - - - - - ); -} - -export function HabboDuckets({ size, ...props }: IconProps) { - return ( - - - - - - - - ); -} - -export function HabboRank({ size, ...props }: IconProps) { - return ( - - - - - - - - ); -} - -const iconMap = { - home: HabboHome, - user: HabboUser, - catalog: HabboCatalog, - star: HabboStar, - community: HabboCommunity, - games: HabboGames, - enter: HabboEnter, - news: HabboNews, - online: HabboOnline, - camera: HabboCamera, - chat: HabboChat, - clock: HabboClock, - heart: HabboHeart, - arrowRight: HabboArrowRight, - cog: HabboCog, - furni: HabboFurni, - diamond: HabboDiamond, - credits: HabboCredits, - duckets: HabboDuckets, - rank: HabboRank, -}; - -export type HabboIconName = keyof typeof iconMap; - -export function HabboIcon({ name, size, ...props }: IconProps & { name: HabboIconName }) { - const Icon = iconMap[name]; - return ; -}