People directories, ministries, organization contacts (migrations 062 to 064)
- People tags (062): Data → People tags (Musicians seeded); a person's Directories repeater tags them and their Specialty line shows on their tile. A People directory section preset shows a tag's first 12 and links to its full page, /directory/<tag>, with page meta and a sitemap entry. Tiles' details panels show a person's links. - Ministries (063): a new organization kind. A group picks its ministry and its page says "Ministry: <name>", linked to the ministry's website. Ministries have no public page, list, sitemap or timeline entry, and aren't offered where a record links to its organization. organizations is rebuilt for the kind CHECK. - Organization contacts (064): Data → Contact types; a private Contacts repeater on each organization (editors and up, readRole on a child collection). Tools → Newsletter → Recipients filters them by type, kind, region and published and downloads a Mailchimp CSV. - A trigger refusing a save with a sentence is shown as that message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
07e56bfd20
commit
0ed7315156
38 changed files with 1108 additions and 29 deletions
|
|
@ -19,6 +19,7 @@ import { mediaUrl, initials } from "../lib/media.ts";
|
|||
import { useSmallImage } from "../lib/useSmallImage.ts";
|
||||
import { paletteFill } from "../lib/color.ts";
|
||||
import { useReadingMode } from "../lib/readingMode.ts";
|
||||
import PlatformIcon from "./PlatformIcon.tsx";
|
||||
import "./PeopleTiles.css";
|
||||
|
||||
/**
|
||||
|
|
@ -96,6 +97,8 @@ export interface Person {
|
|||
pronouns?: string | null;
|
||||
location_label?: string | null;
|
||||
public_email?: string | null;
|
||||
/** Their website, music and social links (a directory's people). */
|
||||
links?: PersonLink[] | null;
|
||||
org?: string | { id?: string; name: string; href?: string } | null;
|
||||
bio?: string | string[] | null;
|
||||
accent?: string;
|
||||
|
|
@ -105,6 +108,13 @@ export interface Person {
|
|||
isOwner?: boolean;
|
||||
}
|
||||
|
||||
export interface PersonLink {
|
||||
kind?: string;
|
||||
platform?: string | null;
|
||||
label: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
/** A person named by slug. Any other field overrides the record. */
|
||||
export interface PersonRef extends Partial<Omit<Person, "name">> {
|
||||
peopleslug: string;
|
||||
|
|
@ -881,6 +891,19 @@ function DetailPanel({
|
|||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{person.links?.length ? (
|
||||
<div className="pl__fact">
|
||||
<dt>Links</dt>
|
||||
<dd className="pl__links">
|
||||
{person.links.map((link) => (
|
||||
<a key={link.url} href={link.url} target="_blank" rel="noreferrer">
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
</a>
|
||||
))}
|
||||
</dd>
|
||||
</div>
|
||||
) : null}
|
||||
</dl>
|
||||
|
||||
{paragraphs.filter(Boolean).map((paragraph, index) => (
|
||||
|
|
@ -931,6 +954,11 @@ function ReadingPeople({ groups, level }: { groups: PeopleGroup[]; level: 3 | 4
|
|||
Email: <a href={`mailto:${person.public_email}`}>{person.public_email}</a>
|
||||
</p>
|
||||
)}
|
||||
{person.links?.map((link) => (
|
||||
<p key={link.url}>
|
||||
<a href={link.url}>{link.label}</a>
|
||||
</p>
|
||||
))}
|
||||
{bio.filter(Boolean).map((paragraph, i) => (
|
||||
<p key={i}>{paragraph}</p>
|
||||
))}
|
||||
|
|
@ -1022,7 +1050,11 @@ function hasDetails(person: Person): boolean {
|
|||
return true;
|
||||
}
|
||||
return Boolean(
|
||||
person.pronouns || resolveOrg(person.org) || person.location_label || person.public_email,
|
||||
person.pronouns ||
|
||||
resolveOrg(person.org) ||
|
||||
person.location_label ||
|
||||
person.public_email ||
|
||||
person.links?.length,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue