Organization cards: logo first, the name under it as subtext

Most partners' logos carry their full name, so the logo leads, large
and centered, with the name as a small line under it (still the
card's heading). With no logo, its initials stand in. Cards sit raised
with a shadow and an accent top edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-06 15:51:47 -05:00
parent 8d6bb8c2b8
commit 034ad95b8a
2 changed files with 32 additions and 24 deletions

View file

@ -36,7 +36,12 @@ const FALLBACK_COLOR = "#3b5456";
const CARD_MIN = "20rem";
const GRID_MAX = "88rem";
/* Under a block title the card names are a level below it. */
/* Under a block title the card names are a level below it.
Logo first: most partners' logos carry their full name, so the
logo leads, large, and the name sits under it as the subtext (still
the card's heading, for screen readers and reading mode). With no
logo, its initials take the logo's place. */
function OrgCard({ org, accent, pageLabel, siteLabel, titled }) {
const color = org.color || accent;
const path = orgPath(org);
@ -50,36 +55,36 @@ function OrgCard({ org, accent, pageLabel, siteLabel, titled }) {
return (
<div
className="p-4 sm:p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]"
style={{ border: `1px solid ${color}`, background: "var(--color-surface)" }}
className="relative p-4 sm:p-6 h-full flex flex-col bg-raised shadow-md transition-transform duration-200 hover:scale-[1.01]"
style={{ borderTop: `4px solid ${color}` }}
>
<div className="flex items-start gap-3 sm:gap-4">
<OrgLogo org={org} color={color} size="h-10 w-10 sm:h-14 sm:w-14" />
<div className="min-w-0 flex-1">
<Name className="text-lg sm:text-xl font-bold leading-tight [overflow-wrap:anywhere]" style={{ color }}>
{path ? <Link to={path}>{org.name}</Link> : org.name}
</Name>
{subtitle && (
<p className="text-sm mt-0.5" style={{ color: MUTED }}>
{subtitle}
</p>
)}
</div>
{/* Top-right rather than in the footer: the footer holds
outbound links, and the arrow goes somewhere different
in kind, deeper into this site. Reading mode has the
name's link and leaves it out. */}
{path && !reading && (
{/* Top-right rather than in the footer: the footer holds
outbound links, and the arrow goes somewhere different
in kind, deeper into this site. Reading mode has the
name's link and leaves it out. */}
{path && !reading && (
<div className="absolute top-3 right-3">
<ArrowLink
to={path}
label={`${org.name}: ${pageLabel}`}
color={color}
/>
)}
</div>
)}
<div className="flex h-28 items-center justify-center px-10">
<OrgLogo org={org} color={color} size="h-full w-full max-w-[16rem]" fallbackSize="h-24 w-24 text-3xl" />
</div>
<Name className="mt-4 text-sm font-semibold leading-snug [overflow-wrap:anywhere]" style={{ color: accentText(color) }}>
{path ? <Link to={path}>{org.name}</Link> : org.name}
</Name>
{subtitle && (
<p className="text-sm mt-0.5" style={{ color: MUTED }}>
{subtitle}
</p>
)}
{org.description?.length > 0 && (
<p
className="mt-4 text-sm leading-relaxed line-clamp-4"