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

@ -16,10 +16,13 @@ export default function OrgLogo({
org,
color,
size = 'h-14 w-14',
fallbackSize = size,
}: {
org: { logo?: string | null; name: string }
color: string
size?: string
/** The initials square's size, when the logo's box isn't square. */
fallbackSize?: string
}) {
return (
<Logo
@ -27,7 +30,7 @@ export default function OrgLogo({
className={`${size} object-contain shrink-0`}
fallback={
<span
className={`${size} shrink-0 flex items-center justify-center font-display font-bold`}
className={`${fallbackSize} shrink-0 flex items-center justify-center font-display font-bold`}
style={{ border: `1px solid ${color}`, color: accentText(color) }}
aria-hidden="true"
>

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,14 +55,28 @@ 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" />
{/* 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="min-w-0 flex-1">
<Name className="text-lg sm:text-xl font-bold leading-tight [overflow-wrap:anywhere]" style={{ color }}>
<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 && (
@ -65,20 +84,6 @@ function OrgCard({ org, accent, pageLabel, siteLabel, titled }) {
{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 && (
<ArrowLink
to={path}
label={`${org.name}: ${pageLabel}`}
color={color}
/>
)}
</div>
{org.description?.length > 0 && (
<p