Adapt + improve all public pages to the atom design system
Extended the same design-system treatment to the public site, faithful to AtomCMS's "atom" theme. New src/components/public/ui.tsx provides the signature atom building blocks + a scoped CSS layer: - ContentCard: surface card with a primary-tinted header (icon circle + title + subtitle) and padded body — the atom content-card, used as every page's header and section wrapper. - StatBlock / stat-grid, EmptyState, OnlineBadge (online/offline pill), RankBadge (medals for the top 3), and responsive .card-grid helpers. Swept ~45 public pages (home/community/rankings hand-built as the reference; the rest via parallel agents that read the schema and preserved every query, server action, auth gate and field name): heroes → ContentCard headers, lists → card-grids in ContentCards, "no X" → EmptyState, status → OnlineBadge/RankBadge. The leaderboard gained Credits/Diamonds/Duckets tabs (usersCurrency). Behaviour unchanged. Verified on the prod server against amx_test: 15+ public pages render the content-cards/grids with real data, no errors; computed styles confirm the tinted header, icon circle, medal + online pills. Fixed an undefined --color-golden ref. tsc 0, vitest 49/49, next build 0.
This commit is contained in:
1 parent
0de0ac6a3c
commit
e9ea19795a
47 files changed
+2264
-1714
No files matched your search
+49
-14
@@ -1,43 +1,78 @@
|
||||
import Link from "next/link";
|
||||
import { ContentCard } from "@/components/public/ui";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const LINKS = [
|
||||
{
|
||||
href: "/rankings",
|
||||
icon: "🏆",
|
||||
title: "Rankings",
|
||||
text: "See the wealthiest players in the hotel, ranked by credits.",
|
||||
},
|
||||
{
|
||||
href: "/staff",
|
||||
icon: "🛡️",
|
||||
title: "Staff",
|
||||
text: "Meet the team that keeps the hotel running every day.",
|
||||
},
|
||||
{
|
||||
href: "/news",
|
||||
icon: "📰",
|
||||
title: "News",
|
||||
text: "The latest announcements, events and updates.",
|
||||
},
|
||||
{
|
||||
href: "/photos",
|
||||
icon: "📸",
|
||||
title: "Photos",
|
||||
text: "Snapshots shared by the community from around the hotel.",
|
||||
},
|
||||
{
|
||||
href: "/guilds",
|
||||
icon: "🚪",
|
||||
title: "Guilds",
|
||||
text: "Browse the groups players have created and joined.",
|
||||
},
|
||||
{
|
||||
href: "/leaderboard",
|
||||
icon: "📊",
|
||||
title: "Leaderboards",
|
||||
text: "Who's on top this season across the hotel's stats.",
|
||||
},
|
||||
];
|
||||
|
||||
export default function CommunityPage() {
|
||||
return (
|
||||
<main>
|
||||
<div className="hero">
|
||||
<h1 style={{ margin: "0 0 0.35rem" }}>Community</h1>
|
||||
<p className="muted" style={{ margin: 0 }}>
|
||||
Everything happening around the hotel in one place.
|
||||
</p>
|
||||
</div>
|
||||
<main style={{ display: "grid", gap: "1.5rem" }}>
|
||||
<ContentCard
|
||||
icon="🌍"
|
||||
title="Community"
|
||||
subtitle="Everything happening around the hotel in one place"
|
||||
/>
|
||||
|
||||
<div className="grid cols-3">
|
||||
<div className="card-grid sm-2 lg-3">
|
||||
{LINKS.map((l) => (
|
||||
<Link key={l.href} href={l.href} className="card hover" style={{ color: "inherit" }}>
|
||||
<h3 style={{ margin: "0 0 0.35rem" }}>{l.title}</h3>
|
||||
<p className="muted" style={{ margin: "0 0 0.75rem" }}>
|
||||
{l.text}
|
||||
</p>
|
||||
<span className="btn btn-outline">Open →</span>
|
||||
<Link
|
||||
key={l.href}
|
||||
href={l.href}
|
||||
className="content-card hover-lift"
|
||||
style={{ color: "inherit", textDecoration: "none" }}
|
||||
>
|
||||
<div className="content-card-head">
|
||||
<span className="content-card-icon" aria-hidden>
|
||||
{l.icon}
|
||||
</span>
|
||||
<div className="content-card-head-text">
|
||||
<p className="content-card-title">{l.title}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="content-card-body">
|
||||
<p className="muted" style={{ margin: "0 0 0.75rem" }}>
|
||||
{l.text}
|
||||
</p>
|
||||
<span className="btn btn-outline">Open →</span>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user