Overhaul fixes: raised cards, balanced people rows, solid map, small button radius

- Cards sit on a raised surface (white, or a touch of tint in dark
  mode) with a shadow: featured cards, the connect block, people
  tiles. tint-soft is a faint teal again, not green.
- Buttons: a small plain radius everywhere; no superellipse.
- Video stills use YouTube's 16:9 frame (the 4:3 one cropped as a
  fallback), have small rounded corners, and show a round, centered
  play button on hover or focus (always on touch screens).
- People tiles: rows balanced between 2 and 10 across, never ending
  on a lone tile where it can be helped.
- Map tiles and region tags are solid, dimmed by color, not opacity.
- Admin: white (surface) background, header and footer as wide as
  the content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-30 16:24:36 -05:00
parent 582c65077d
commit a397f3eac0
12 changed files with 165 additions and 61 deletions

View file

@ -6,7 +6,7 @@ import ArrowLink from "../../components/ArrowLink.tsx";
import OrgLogo from "../../components/OrgLogo.tsx";
import { orgPath } from "../../lib/organizations.ts";
import { AREAS, AREA_NAMES } from "../../data/mapGrid.ts";
import { withAlpha, accentText, readableOn } from '../../lib/color.ts'
import { accentText, readableOn } from '../../lib/color.ts'
import { scrollBehavior } from "../../lib/motion.ts";
/* ═══════════════════════════════════════════════════════════════
@ -163,7 +163,11 @@ function Tile({
const active = ids.includes(selected) || ids.includes(hovered);
const dimmed = selected && !ids.includes(selected);
const clipId = `clip-${code}`;
const opacity = count ? 1 : active ? 0.5 : 0.28;
// Solid, never see-through: a tile with no groups, or one dimmed
// while another region is picked, is its color mixed toward the
// page's rather than faded, so the backdrop doesn't show through.
const strength = dimmed ? (count ? 35 : 15) : count ? 100 : active ? 50 : 28;
const tileFill = (color: string) => `color-mix(in srgb, ${color} ${strength}%, var(--color-surface))`;
// Clicking a shared tile cycles through its regions and then
// clears, so every slice is reachable without a second control.
@ -179,8 +183,6 @@ function Tile({
onMouseEnter={() => setHovered(primary.regionId)}
onMouseLeave={() => setHovered(null)}
style={{ cursor: "pointer" }}
opacity={dimmed ? 0.25 : 1}
className="transition-opacity duration-200"
>
<title>
{AREA_NAMES[code] || code}: {slices.map(s => s.name).join(" / ")}
@ -188,7 +190,7 @@ function Tile({
</title>
<clipPath id={clipId}>
<rect x={x} y={y} width={width} height={size} rx={14} />
<rect x={x} y={y} width={width} height={size} />
</clipPath>
<g clipPath={`url(#${clipId})`}>
@ -202,8 +204,7 @@ function Tile({
y={top}
width={width}
height={h}
fill={colorOf(slice)}
fillOpacity={opacity}
style={{ fill: tileFill(colorOf(slice)) }}
className="transition-all duration-200"
/>
);
@ -215,7 +216,6 @@ function Tile({
y={y}
width={width}
height={size}
rx={14}
fill="none"
stroke={active ? colorOf(primary) : "var(--color-surface)"}
strokeOpacity={active ? 1 : 0.55}
@ -230,7 +230,7 @@ function Tile({
dominantBaseline="middle"
fontSize={fontSize}
fontWeight="800"
fill={count ? "var(--color-surface)" : colorOf(primary)}
fill={count && !dimmed ? "var(--color-surface)" : colorOf(primary)}
style={{ pointerEvents: "none" }}
>
{label || code}
@ -242,7 +242,6 @@ function Tile({
cy={y + 14}
r={7}
fill="#ffffff"
fillOpacity={0.9}
style={{ pointerEvents: "none" }}
/>
)}
@ -293,10 +292,11 @@ function LegendButton({ region, selected, setSelected, hovered, setHovered }) {
aria-pressed={selected === region.id}
className="flex items-center gap-2 py-1.5 px-3 text-sm font-bold transition-all duration-200"
style={{
border: `1px solid ${colorOf(region)}`,
background: on ? colorOf(region) : "transparent",
color: on ? readableOn(colorOf(region)) : INK,
opacity: selected && selected !== region.id ? 0.45 : 1,
// Solid like the tiles: another region picked dims this one
// by color, not by letting the page show through.
border: `1px solid ${selected && !on ? `color-mix(in srgb, ${colorOf(region)} 40%, var(--color-raised))` : colorOf(region)}`,
background: on ? colorOf(region) : "var(--color-raised)",
color: on ? readableOn(colorOf(region)) : selected ? "var(--color-muted)" : INK,
}}
>
<span
@ -473,7 +473,7 @@ function GroupCard({ group, color, open, onOpen }) {
className="p-4 flex items-start gap-4 transition-all duration-200"
style={{
border: `1px solid ${color}`,
background: open ? `${withAlpha(color, 8)}` : "transparent",
background: open ? `color-mix(in srgb, ${color} 8%, var(--color-raised))` : "var(--color-raised)",
}}
>
<OrgLogo org={group} color={color} />
@ -541,7 +541,7 @@ function GroupDetail({ group, region, onClose }) {
return (
<div
className="p-6 mb-6"
style={{ border: `2px solid ${colorOf(region)}`, background: `${withAlpha(colorOf(region), 6)}` }}
style={{ border: `2px solid ${colorOf(region)}`, background: `color-mix(in srgb, ${colorOf(region)} 6%, var(--color-raised))` }}
>
<div className="flex items-start gap-4">
<OrgLogo org={group} color={colorOf(region)} size="h-20 w-20" />