Feature updates: photo framing, group pages, schedule images, content block placement #29

Merged
ngu-git-admin merged 8 commits from feature-updates into main 2026-10-07 22:52:59 +01:00
2 changed files with 32 additions and 24 deletions
Showing only changes of commit 034ad95b8a - Show all commits

View file

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

View file

@ -36,7 +36,12 @@ const FALLBACK_COLOR = "#3b5456";
const CARD_MIN = "20rem"; const CARD_MIN = "20rem";
const GRID_MAX = "88rem"; 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 }) { function OrgCard({ org, accent, pageLabel, siteLabel, titled }) {
const color = org.color || accent; const color = org.color || accent;
const path = orgPath(org); const path = orgPath(org);
@ -50,36 +55,36 @@ function OrgCard({ org, accent, pageLabel, siteLabel, titled }) {
return ( return (
<div <div
className="p-4 sm:p-6 h-full flex flex-col transition-transform duration-200 hover:scale-[1.01]" 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={{ border: `1px solid ${color}`, background: "var(--color-surface)" }} style={{ borderTop: `4px solid ${color}` }}
> >
<div className="flex items-start gap-3 sm:gap-4"> {/* Top-right rather than in the footer: the footer holds
<OrgLogo org={org} color={color} size="h-10 w-10 sm:h-14 sm:w-14" /> outbound links, and the arrow goes somewhere different
in kind, deeper into this site. Reading mode has the
<div className="min-w-0 flex-1"> name's link and leaves it out. */}
<Name className="text-lg sm:text-xl font-bold leading-tight [overflow-wrap:anywhere]" style={{ color }}> {path && !reading && (
{path ? <Link to={path}>{org.name}</Link> : org.name} <div className="absolute top-3 right-3">
</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 && (
<ArrowLink <ArrowLink
to={path} to={path}
label={`${org.name}: ${pageLabel}`} label={`${org.name}: ${pageLabel}`}
color={color} 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> </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 && ( {org.description?.length > 0 && (
<p <p
className="mt-4 text-sm leading-relaxed line-clamp-4" className="mt-4 text-sm leading-relaxed line-clamp-4"