refactor: convert admin panel to Tailwind CSS
- Convert admin layout, sidebar, and navigation to Tailwind classes - Convert dashboard components (StatusCard, DiagnosticRow, etc.) to Tailwind - Convert all ~48 admin page files from admin CSS classes to Tailwind - Remove unused admin CSS from globals.css (973 → 712 lines) - Convert developers page badges to Tailwind - Remove <style jsx> block from OnlineUsersWidget
This commit is contained in:
1 parent
64f50b2dde
commit
bd299be55d
52 files changed
+277
-644
No files matched your search
+1
-262
@@ -436,136 +436,7 @@ tbody tr:hover {
|
||||
}
|
||||
|
||||
/* ── 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 */
|
||||
Page content wrapper — table card styling and h1 formatting. */
|
||||
.admin-page main > h1:first-child,
|
||||
.admin-page > h1:first-child {
|
||||
margin-top: 0;
|
||||
@@ -603,138 +474,6 @@ tbody tr:hover {
|
||||
.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);
|
||||
}
|
||||
|
||||
/* Dashboard: live-status tiles, server info, diagnostics */
|
||||
.admin-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 0.9rem;
|
||||
margin-bottom: 1.4rem;
|
||||
}
|
||||
.admin-stat-card {
|
||||
background: var(--color-surface);
|
||||
border: 1px solid var(--border);
|
||||
border-left: 4px solid var(--color-text-muted);
|
||||
border-radius: 12px;
|
||||
padding: 0.85rem 1rem;
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.admin-stat-card.ok {
|
||||
border-left-color: #16a34a;
|
||||
}
|
||||
.admin-stat-card.warn {
|
||||
border-left-color: var(--color-primary, #eeb425);
|
||||
}
|
||||
.admin-stat-card.danger {
|
||||
border-left-color: #ef4444;
|
||||
}
|
||||
.admin-stat-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.admin-stat-label {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
.admin-stat-icon {
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.admin-stat-value {
|
||||
font-size: 1.7rem;
|
||||
font-weight: 800;
|
||||
line-height: 1.1;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
.admin-stat-hint {
|
||||
font-size: 0.78rem;
|
||||
color: var(--color-text-muted);
|
||||
margin-top: 0.15rem;
|
||||
}
|
||||
|
||||
.admin-info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: 0.6rem 1.2rem;
|
||||
}
|
||||
.admin-info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.1rem;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.admin-diag {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.admin-diag-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.5rem 0.1rem;
|
||||
border-top: 1px solid color-mix(in srgb, var(--color-text-muted) 12%, transparent);
|
||||
}
|
||||
.admin-diag-row:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
.admin-diag-label {
|
||||
font-weight: 700;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
.admin-diag-detail {
|
||||
flex: 1;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
.admin-dot {
|
||||
flex: none;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
border-radius: 999px;
|
||||
background: var(--color-text-muted);
|
||||
}
|
||||
.admin-dot.ok {
|
||||
background: #16a34a;
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, #16a34a 22%, transparent);
|
||||
}
|
||||
.admin-dot.warn {
|
||||
background: var(--color-primary, #eeb425);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 22%, transparent);
|
||||
}
|
||||
.admin-dot.danger {
|
||||
background: #ef4444;
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 22%, transparent);
|
||||
}
|
||||
|
||||
.admin-section {
|
||||
margin-top: 1.6rem;
|
||||
}
|
||||
.admin-section > h2 {
|
||||
margin: 0 0 0.7rem;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
/* ── Public design system (faithful to the atom theme) ──────────
|
||||
content-card = surface card with a primary-tinted header (icon +
|
||||
title + subtitle) and a padded body — the signature atom block. */
|
||||
|
||||
Reference in new issue
Block a user