Restyle the admin panel to match AtomCMS's Filament housekeeping look
The admin pages used bare inline-styled tables on the default page
background. Rebuilt the admin shell + added a scoped .admin CSS layer so
the whole panel matches the original AtomCMS Filament look:
- Dark #2d2d44 sidebar (the AtomCMS admin navbar colour) with the nav
grouped into Overview / Content / Users & access / Economy / Radio /
System (mirrors the Filament resource groups), an avatar + rank badge
header, and amber active-link highlighting via a client AdminNavLink
(usePathname).
- A topbar ("Housekeeping" + signed-in user) over a light content area.
- Carded tables (surface bg, rounded, shadow, tinted header, row hover)
and a page-title treatment, applied globally so every admin page is
styled without per-page edits.
Verified in a real authenticated admin session (production server,
amx_test): sidebar renders #2d2d44 sticky, active link amber on dark
text, /admin/users table carded with 7 real rows; dev server serves the
admin rules after a cache refresh. tsc 0, vitest 49/49, next build 0.
This commit is contained in:
1 parent
61a5fab0d9
commit
f4e0924e71
3 files changed
+307
-42
No files matched your search
@@ -379,3 +379,188 @@ td {
|
||||
.coin.diamonds {
|
||||
background: #4bc0d9;
|
||||
}
|
||||
|
||||
/* ── Admin panel (Housekeeping) ─────────────────────────────────
|
||||
Faithful to AtomCMS's Filament panel: dark #2d2d44 sidebar with
|
||||
grouped nav + amber active state, a topbar, and a light content
|
||||
area with carded tables. Scoped under .admin so it never leaks
|
||||
into the public site. */
|
||||
.admin {
|
||||
display: grid;
|
||||
grid-template-columns: 232px minmax(0, 1fr);
|
||||
gap: 1.25rem;
|
||||
align-items: start;
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.admin {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-sidebar {
|
||||
position: sticky;
|
||||
top: 1rem;
|
||||
align-self: start;
|
||||
background: #2d2d44;
|
||||
color: #e7e9f3;
|
||||
border-radius: 14px;
|
||||
padding: 0.85rem 0.7rem;
|
||||
box-shadow: var(--shadow-card);
|
||||
max-height: calc(100vh - 2rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.admin-sidebar-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.3rem 0.45rem 0.85rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.09);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.admin-avatar {
|
||||
flex: none;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 10px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-weight: 800;
|
||||
color: #1a1a2e;
|
||||
background: var(--color-primary, #eeb425);
|
||||
}
|
||||
.admin-sidebar-name {
|
||||
font-weight: 700;
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.1;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.admin-rank-badge {
|
||||
display: inline-block;
|
||||
margin-top: 0.2rem;
|
||||
font-size: 0.66rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: #1a1a2e;
|
||||
background: var(--color-primary, #eeb425);
|
||||
border-radius: 999px;
|
||||
padding: 0.05rem 0.5rem;
|
||||
}
|
||||
.admin-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.1rem;
|
||||
}
|
||||
.admin-nav-group {
|
||||
margin-top: 0.55rem;
|
||||
}
|
||||
.admin-nav-group-label {
|
||||
display: block;
|
||||
font-size: 0.64rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.09em;
|
||||
color: rgba(231, 233, 243, 0.42);
|
||||
padding: 0.3rem 0.55rem 0.25rem;
|
||||
}
|
||||
.admin-nav-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.55rem;
|
||||
padding: 0.43rem 0.6rem;
|
||||
border-radius: 9px;
|
||||
color: #c8cbe0;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.admin-nav-link:hover {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.admin-nav-link.active {
|
||||
background: var(--color-primary, #eeb425);
|
||||
color: #1a1a2e;
|
||||
box-shadow: 0 2px 8px rgba(238, 180, 37, 0.35);
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
min-width: 0;
|
||||
}
|
||||
.admin-topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 0.7rem 1.15rem;
|
||||
margin-bottom: 1.1rem;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.admin-topbar h2 {
|
||||
margin: 0;
|
||||
font-size: 1.05rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
/* Page content inside the admin panel */
|
||||
.admin-page main > h1:first-child,
|
||||
.admin-page > h1:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.admin-page h1 {
|
||||
font-size: 1.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 2px solid var(--border);
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
/* Carded tables — give the bare admin tables a surface + frame. */
|
||||
.admin-page table {
|
||||
background: var(--color-surface);
|
||||
box-shadow: var(--shadow-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.admin-page thead th {
|
||||
background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
|
||||
color: var(--color-text-muted);
|
||||
border-bottom: 1px solid var(--border);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.admin-page th,
|
||||
.admin-page td {
|
||||
padding: 0.6rem 0.8rem;
|
||||
}
|
||||
.admin-page tbody tr {
|
||||
transition: background 0.12s ease;
|
||||
}
|
||||
.admin-page tbody tr:hover {
|
||||
background: color-mix(in srgb, var(--color-primary) 7%, transparent);
|
||||
}
|
||||
.admin-page tbody td {
|
||||
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent);
|
||||
}
|
||||
/* status pill used by some admin lists */
|
||||
.admin-badge {
|
||||
display: inline-block;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
padding: 0.1rem 0.55rem;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--color-primary) 18%, transparent);
|
||||
color: var(--color-text);
|
||||
}
|
||||
.admin-badge.ok {
|
||||
background: color-mix(in srgb, #16a34a 20%, transparent);
|
||||
}
|
||||
.admin-badge.danger {
|
||||
background: color-mix(in srgb, #ef4444 22%, transparent);
|
||||
}
|
||||
Reference in new issue
Block a user