Group pages: framed facts, tags for organizations and events, every website and email (migration 070)
- Email buttons went to the link's label, not its URL (splitLinks took the label); they use the URL now, with or without mailto:. - Every website and email row is listed, each with its own label, instead of only the first. - The facts at the top of an organization page sit in a framed card: City, Part of <name> Region, Ministry, Meets, Since, and its tags. - Tags (070): Data -> Tags (Online, In-Person to start) replace the Online checkbox on organizations and events. Ticked records get the Online tag; v_events reads the "online" tag as is_online, so the calendar filter and place lines are unchanged. Tags show on the record's page and on group entries in the Community map list and grid. The map no longer keeps online groups off their state's tile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
07c15ce96d
commit
b55b088e16
23 changed files with 344 additions and 93 deletions
|
|
@ -22,7 +22,7 @@ function PlatformName({ platform, label }: { platform?: string | null; label?: s
|
|||
|
||||
export default function OrgContact({ org, accent }: { org: OrganizationRecord; accent: string }) {
|
||||
const hasAny =
|
||||
org.links.length > 0 || org.socials.length > 0 || org.website || org.email
|
||||
org.links.length > 0 || org.socials.length > 0 || org.websites.length > 0 || org.emails.length > 0
|
||||
|
||||
if (!hasAny) return null
|
||||
|
||||
|
|
@ -43,28 +43,27 @@ export default function OrgContact({ org, accent }: { org: OrganizationRecord; a
|
|||
</a>
|
||||
))}
|
||||
|
||||
{/* website and email arrive as bare strings (splitLinks in
|
||||
shape.js); socials are whole link rows. */}
|
||||
{/* Every website and email row, each its own button with its
|
||||
own label; an email's url is the bare address (splitLinks
|
||||
in shape.js). */}
|
||||
{[
|
||||
org.website ? { url: org.website, label: 'Website', platform: null } : null,
|
||||
org.email ? { url: `mailto:${org.email}`, label: org.email, platform: null } : null,
|
||||
...org.websites,
|
||||
...org.emails.map((link) => ({ ...link, url: `mailto:${link.url}` })),
|
||||
...org.socials,
|
||||
]
|
||||
.filter((link): link is NonNullable<typeof link> => Boolean(link))
|
||||
.map((link) => (
|
||||
<a
|
||||
key={link.url}
|
||||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center gap-2 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
<PlatformName platform={link.platform} label={link.label} />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
].map((link) => (
|
||||
<a
|
||||
key={link.url}
|
||||
href={link.url}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center gap-2 btn border px-4 py-1.5 text-sm transition-colors hover:bg-tint"
|
||||
style={{ borderColor: accent, color: accentText(accent) }}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
<PlatformName platform={link.platform} label={link.label} />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue