From e9ea19795a38acc26544d330090de42a44d8e5ac Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sun, 28 Jun 2026 19:28:36 +0200 Subject: [PATCH] Adapt + improve all public pages to the atom design system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/app/apply/staff/page.tsx | 120 ++++++------ src/app/apply/team/page.tsx | 112 +++++------ src/app/badges/page.tsx | 74 ++++---- src/app/banned/page.tsx | 14 +- src/app/client/page.tsx | 32 ++-- src/app/community/page.tsx | 63 +++++-- src/app/forgot/page.tsx | 16 +- src/app/friends/page.tsx | 124 ++++++------- src/app/globals.css | 161 ++++++++++++++++ src/app/guilds/[id]/forum/new/page.tsx | 86 ++++----- src/app/guilds/[id]/forum/page.tsx | 41 ++-- src/app/guilds/[id]/page.tsx | 147 ++++++++------- src/app/guilds/page.tsx | 88 +++++---- src/app/help/[category]/page.tsx | 25 +-- src/app/help/page.tsx | 241 +++++++++++++----------- src/app/help/tickets/page.tsx | 113 ++++++----- src/app/leaderboard/page.tsx | 26 +-- src/app/login/page.tsx | 28 ++- src/app/maintenance/page.tsx | 18 +- src/app/marketplace/page.tsx | 121 ++++++------ src/app/messages/page.tsx | 56 +++--- src/app/news/[slug]/page.tsx | 60 +++--- src/app/news/page.tsx | 50 +++-- src/app/page.tsx | 77 +++++--- src/app/photos/page.tsx | 71 +++---- src/app/radio/apply/page.tsx | 182 +++++++++--------- src/app/radio/contests/page.tsx | 59 +++--- src/app/radio/giveaways/page.tsx | 59 +++--- src/app/radio/leaderboard/page.tsx | 26 +-- src/app/radio/page.tsx | 152 ++++++++------- src/app/radio/schedule/page.tsx | 24 +-- src/app/radio/shouts/page.tsx | 137 +++++++------- src/app/rankings/page.tsx | 86 +++++---- src/app/rares/[category]/page.tsx | 161 ++++++++-------- src/app/rares/page.tsx | 73 ++++---- src/app/redeem/page.tsx | 38 ++-- src/app/register/page.tsx | 17 +- src/app/reset/page.tsx | 18 +- src/app/settings/2fa/page.tsx | 121 ++++++------ src/app/settings/connections/page.tsx | 130 ++++++------- src/app/settings/page.tsx | 90 +++++---- src/app/shop/page.tsx | 247 +++++++++++++------------ src/app/shop/topup/page.tsx | 39 ++-- src/app/staff/page.tsx | 93 +++++----- src/app/u/[username]/page.tsx | 72 +++---- src/app/verify/page.tsx | 87 ++++----- src/components/public/ui.tsx | 103 +++++++++++ 47 files changed, 2264 insertions(+), 1714 deletions(-) create mode 100644 src/components/public/ui.tsx diff --git a/src/app/apply/staff/page.tsx b/src/app/apply/staff/page.tsx index 91573bd5..f1efe8f6 100644 --- a/src/app/apply/staff/page.tsx +++ b/src/app/apply/staff/page.tsx @@ -1,8 +1,9 @@ import { redirect } from "next/navigation"; +import { applyStaff } from "@/actions/applications"; +import { ContentCard, EmptyState } from "@/components/public/ui"; import { auth } from "@/lib/auth"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; -import { applyStaff } from "@/actions/applications"; export const dynamic = "force-dynamic"; @@ -48,39 +49,29 @@ export default async function ApplyStaffPage() { const appliedRankIds = new Set(myApps.map((a) => a.rankId)); return ( -
-
-

Apply for {hotelName} staff

-

- We open staff applications every now and then. If you come across a position you feel you - would fit perfectly into, do not hesitate to apply for it. -

-
+
+ {positions.length === 0 ? ( -
-

No positions open

-

+ + There are currently no positions open. Please come back at a later time to check if we have any openings by then. Thank you for your interest. -

-
+ +
) : ( -
+
{positions.map((position) => { const team = teamByRankId.get(position.permissionId); const rankName = team?.rankName ?? `Rank #${position.permissionId}`; const alreadyApplied = appliedRankIds.has(position.permissionId); return ( -
-
+
+
{team?.badge ? ( /* eslint-disable-next-line @next/next/no-img-element */ - ) : null} -
-

{rankName}

+ ) : ( + + 🛡️ + + )} +
+

+ {rankName} +

{team?.jobDescription ? ( -

- {team.jobDescription} -

+

{team.jobDescription}

) : null}
-

{position.description}

-

- Application deadline: {formatDeadline(position.applyTo)} -

+
+

{position.description}

+

+ Application deadline: {formatDeadline(position.applyTo)} +

- {alreadyApplied ? ( - - ) : ( -
- {/* rank_id is the position's permission id; the applicant is - re-read from the session inside the action. */} - - -