diff --git a/src/pages/admin/AdminHome.tsx b/src/pages/admin/AdminHome.tsx index 4b416d1..0dfe4cd 100644 --- a/src/pages/admin/AdminHome.tsx +++ b/src/pages/admin/AdminHome.tsx @@ -11,7 +11,9 @@ Forms, Tools, and Panel, which only exists for superadmins. It asks for the wide admin column (adminWidth.tsx), like the - editor, so the cards run three across on a wide screen. + editor, so the cards run three across on a wide screen. Each + block takes a color from the palette (GROUP_COLORS), tinting its + cards and drawing its bar, so the groups read apart at a glance. The right-hand panel is deliberately inert. Nothing here fetches, so the landing page can't be slow or half-broken on @@ -25,13 +27,17 @@ import { useAuth } from "../../lib/auth.tsx"; import { useWideAdminPage } from "../../lib/adminWidth.tsx"; import { SITE_VERSION } from "../../lib/version.ts"; import { ROLE_LABELS, isSuper } from "../../lib/roles.ts"; +import { PALETTE } from "../../lib/color.ts"; import { DATA_NAV, FORMS_NAV, PAGES_NAV, PANEL_NAV, TOOLS_NAV, target, visibleItems } from "./adminNav.ts"; /* One card. The title link is stretched over the whole card with `after:absolute`, which makes the card clickable without nesting an anchor inside an anchor; the sub-links sit above it on z-10 so they stay separately clickable. */ -function NavCard({ item }) { +/* A card's fill: its group's color, faint, over the surface. */ +const tintOf = (color: string) => `color-mix(in srgb, ${color} 12%, var(--color-surface))`; + +function NavCard({ item, color }) { const to = target(item); // Drop the child that just repeats the card's own destination: @@ -39,7 +45,10 @@ function NavCard({ item }) { const extras = (item.children ?? []).filter((child) => child.to !== to); return ( -
{blurb}
}Pick a section to work in.
- {GROUPS.map((group) => ( -