@sarimarcus/content-sites-ui 0.45.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.47.0 (2026-10-23)
6
+
7
+ - `editorial`: `PeopleHub` people take optional `places` (`{ label, href }[]`); when any person has them, the closing block adds a "Where to find them" list (`LABELS.peopleHub.placesHeading`, prop `placesHeading`) linking each person to their places. Without `places` the markup is unchanged (SLA-3311).
8
+
9
+ ## 0.46.0 (2026-10-22)
10
+
11
+ - `editorial`: new `EraListingPage`, an era's article listing (`/articles/era/<id>`) on the `ArticlesListingPage` shell: the era hero in a `<figure>`, a labelled list section with `grid` and `pagination` slots, a `go-deeper` slot and the era's dossier links on page 1; a page above 1 carries only the grid and pagination. `EraScenes` takes an optional `articleListings` (`{ [eraId]: { href, count } }`); when set, an era's articles strip ends with an "All N articles" link (`LABELS.eraScenes.allArticlesLabel`). Without it the markup is unchanged (SLA-3306).
12
+
5
13
  ## 0.45.0 (2026-10-22)
6
14
 
7
15
  - No changes; lockstep release with core (SLA-3297).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-ui",
3
- "version": "0.45.0",
3
+ "version": "0.47.0",
4
4
  "description": "Universal Astro UI components, layout shell and design tokens shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -50,6 +50,6 @@
50
50
  "@lucide/astro": "^1.23.0",
51
51
  "astro": "^7.0.6",
52
52
  "tailwindcss": "^4.1.18",
53
- "@sarimarcus/content-sites-core": "0.45.0"
53
+ "@sarimarcus/content-sites-core": "0.47.0"
54
54
  }
55
55
  }
@@ -0,0 +1,78 @@
1
+ ---
2
+ /**
3
+ * EraListingPage — an era's article listing (/articles/era/<id>) or one of its paginated pages, inside
4
+ * ArticlesListingPage. The route keeps paths, data, SEO, schema and the site Layout; every string arrives as a prop.
5
+ * Page 1 opens with the era's hero and ends with the era's dossier links; a page above 1 renders only the grid and
6
+ * pagination. Blocks the site renders through its own adapters (cards, pagination) arrive as slots.
7
+ * Slots:
8
+ * breadcrumb — the site Breadcrumb.
9
+ * header-extra — a line under the lede (e.g. the article count and the era's date range). Page 1 only.
10
+ * grid — the site's article card grid for this page.
11
+ * pagination — the site's pagination.
12
+ * go-deeper — related-content blocks after the list. Page 1 only.
13
+ */
14
+ import type { ImageMetadata } from 'astro';
15
+ import type { EraDefinition } from '@sarimarcus/content-sites-core/eras';
16
+ import Container from '../layout/Container.astro';
17
+ import ResponsivePicture from '../primitives/ResponsivePicture.astro';
18
+ import ArticlesListingPage from './ArticlesListingPage.astro';
19
+ import EraDossiers from './EraDossiers.astro';
20
+
21
+ interface Props {
22
+ eyebrow: string;
23
+ heading: string;
24
+ lede: string;
25
+ era: EraDefinition;
26
+ /** The era's hero image and its alt text for this listing; page 1 only. */
27
+ hero?: { image: ImageMetadata; alt: string };
28
+ /** Page 1 is the hub; a later page carries only the grid and pagination. */
29
+ currentPage: number;
30
+ /** Heading over the page-1 list. */
31
+ listHeading?: string;
32
+ /** Label over the era's dossier links. */
33
+ dossiersLabel?: string;
34
+ }
35
+
36
+ const { eyebrow, heading, lede, era, hero, currentPage, listHeading, dossiersLabel } = Astro.props;
37
+ const first = currentPage === 1;
38
+ const headingId = `${era.anchor}-articles-heading`;
39
+ ---
40
+
41
+ {first ? (
42
+ <ArticlesListingPage eyebrow={eyebrow} heading={heading} lede={lede} pagefindBody>
43
+ <slot name="breadcrumb" slot="breadcrumb" />
44
+ <slot name="header-extra" slot="header-extra" />
45
+ {hero && (
46
+ <Container class="mb-12">
47
+ <figure class="overflow-hidden rounded-xl">
48
+ <ResponsivePicture
49
+ src={hero.image}
50
+ alt={hero.alt}
51
+ sizes="(min-width: 1152px) 1152px, 100vw"
52
+ loading="eager"
53
+ fetchpriority="high"
54
+ decoding="async"
55
+ class="aspect-[16/7] w-full object-cover"
56
+ />
57
+ </figure>
58
+ </Container>
59
+ )}
60
+ <Container>
61
+ <section id="all-articles" aria-labelledby={listHeading ? headingId : undefined}>
62
+ {listHeading && <h2 id={headingId} class="text-2xl sm:text-3xl font-normal font-display text-foreground mb-6">{listHeading}</h2>}
63
+ <slot name="grid" />
64
+ <slot name="pagination" />
65
+ </section>
66
+ <slot name="go-deeper" />
67
+ <EraDossiers era={era} label={dossiersLabel} />
68
+ </Container>
69
+ </ArticlesListingPage>
70
+ ) : (
71
+ <ArticlesListingPage eyebrow={eyebrow} heading={heading} lede={lede}>
72
+ <slot name="breadcrumb" slot="breadcrumb" />
73
+ <Container>
74
+ <slot name="grid" />
75
+ <slot name="pagination" />
76
+ </Container>
77
+ </ArticlesListingPage>
78
+ )}
@@ -16,6 +16,7 @@ import TableOfContents from '../composed/TableOfContents.astro';
16
16
  import EntityCard from '../composed/EntityCard.astro';
17
17
  import Container from '../layout/Container.astro';
18
18
  import Icon from '../primitives/Icon.astro';
19
+ import LinkArrow from '../primitives/LinkArrow.astro';
19
20
  import ResponsivePicture from '../primitives/ResponsivePicture.astro';
20
21
  import PersonCard from './PersonCard.astro';
21
22
  import CardPlaceholder from './CardPlaceholder.astro';
@@ -38,11 +39,13 @@ interface Props {
38
39
  indexStyle?: 'chips' | 'timeline';
39
40
  castLimit?: number;
40
41
  articleLimit?: number;
42
+ /** Per era id, the full article count and the listing page; the era's articles strip links to it when set. */
43
+ articleListings?: Record<string, { href: string; count: number }>;
41
44
  labels?: Partial<SceneLabels>;
42
45
  class?: string;
43
46
  }
44
47
 
45
- const { eras, items, index = true, indexStyle = 'chips', castLimit = 6, articleLimit = 5, labels, class: className } = Astro.props;
48
+ const { eras, items, index = true, indexStyle = 'chips', castLimit = 6, articleLimit = 5, articleListings = {}, labels, class: className } = Astro.props;
46
49
  const L: SceneLabels = { ...LABELS.eraScenes, ...labels };
47
50
 
48
51
  const scenes = orderEras(eras).map((era) => ({ era, scene: splitScene(items[era.id] ?? [], { castLimit, articleLimit }) }));
@@ -203,7 +206,9 @@ const stripHeading = 'font-display text-2xl text-foreground';
203
206
  <h3 id={`${era.anchor}-articles`} class={stripHeading}>{L.articlesHeading}</h3>
204
207
  <ol aria-labelledby={`${era.anchor}-articles`} class="mt-4 divide-y divide-border border-y border-border">
205
208
  {scene.articles.map((item) => <EraEntryRow item={item} headingLevel={4} />)}
206
- </ol>
209
+ </ol>{articleListings[era.id] && (
210
+ <p class="mt-4"><LinkArrow href={articleListings[era.id].href} class="min-h-11">{L.allArticlesLabel(articleListings[era.id].count)}</LinkArrow></p>
211
+ )}
207
212
  </div>
208
213
  )}
209
214
 
@@ -21,6 +21,8 @@ interface HubPerson extends PeopleTimelineEntry {
21
21
  imageAlt: string;
22
22
  roles?: readonly string[];
23
23
  knownFor?: string;
24
+ /** Places tied to this person (monuments etc.), linked in the closing block. */
25
+ places?: readonly { label: string; href: string }[];
24
26
  }
25
27
 
26
28
  interface Props {
@@ -40,6 +42,7 @@ interface Props {
40
42
  indexLabel?: string;
41
43
  timelineLabel?: string;
42
44
  footstepsHeading?: string;
45
+ placesHeading?: string;
43
46
  }
44
47
 
45
48
  const {
@@ -54,6 +57,7 @@ const {
54
57
  indexLabel = LABELS.peopleHub.indexLabel,
55
58
  timelineLabel,
56
59
  footstepsHeading = LABELS.peopleHub.footstepsHeading,
60
+ placesHeading = LABELS.peopleHub.placesHeading,
57
61
  } = Astro.props;
58
62
 
59
63
  const introParagraphs = introHtml ?? intro.map(textAsHtml);
@@ -61,6 +65,7 @@ const eraNote = (id: string) => eraNotesHtml[id] ?? (eraNotes[id] ? textAsHtml(e
61
65
  const segments = layoutPeopleTimeline(eras, people);
62
66
  const sections = segments.map(({ era, dots }) => ({ era, group: dots }));
63
67
  const footsteps = footstepLinks(segments.map((s) => s.era));
68
+ const withPlaces = segments.flatMap((s) => s.dots).filter((p): p is typeof p & { places: NonNullable<typeof p.places> } => !!p.places?.length);
64
69
  ---
65
70
 
66
71
  <div class="bg-muted/30 border-b border-border pt-12 pb-10" data-pagefind-body>
@@ -104,14 +109,30 @@ const footsteps = footstepLinks(segments.map((s) => s.era));
104
109
  </div>
105
110
  </section>
106
111
  ))}
107
- {footsteps.length > 0 && (
112
+ {(footsteps.length > 0 || withPlaces.length > 0) && (
108
113
  <section class="border-t border-border pt-10" aria-labelledby="people-footsteps-heading">
109
114
  <h2 id="people-footsteps-heading" class="font-display text-2xl font-semibold text-foreground">{footstepsHeading}</h2>
110
- <ul class="mt-4 grid gap-x-8 sm:grid-cols-2">
111
- {footsteps.map((link) => (
112
- <li><LinkArrow href={link.href} color="secondary" class="min-h-11">{link.label}</LinkArrow></li>
113
- ))}
114
- </ul>
115
+ {footsteps.length > 0 && (
116
+ <ul class="mt-4 grid gap-x-8 sm:grid-cols-2">
117
+ {footsteps.map((link) => (
118
+ <li><LinkArrow href={link.href} color="secondary" class="min-h-11">{link.label}</LinkArrow></li>
119
+ ))}
120
+ </ul>
121
+ )}{withPlaces.length > 0 && (
122
+ <>
123
+ <h3 class="mt-8 font-display text-lg font-semibold text-foreground">{placesHeading}</h3>
124
+ <ul class="mt-3 grid gap-x-8 gap-y-3 sm:grid-cols-2">
125
+ {withPlaces.map((p) => (
126
+ <li class="text-base text-foreground">
127
+ <a href={p.href} class="font-medium text-primary hover:underline">{p.name}</a><span class="text-muted-foreground">: </span>
128
+ {p.places.map((place, i) => (
129
+ <>{i > 0 && ', '}<a href={place.href} class="text-secondary hover:underline">{place.label}</a></>
130
+ ))}
131
+ </li>
132
+ ))}
133
+ </ul>
134
+ </>
135
+ )}
115
136
  </section>
116
137
  )}
117
138
  </Container>
@@ -18,6 +18,7 @@ export { default as ArticleGrid } from './ArticleGrid.astro';
18
18
  export { default as ArticleHubSection } from './ArticleHubSection.astro';
19
19
  export { default as ArticleCategoryNav } from './ArticleCategoryNav.astro';
20
20
  export { default as ArticleTopicPage } from './ArticleTopicPage.astro';
21
+ export { default as EraListingPage } from './EraListingPage.astro';
21
22
  export { default as ArticleTopicPager } from './ArticleTopicPager.astro';
22
23
  export { rankByCount } from './topic';
23
24
  export type { AuthorSummary, ArticleSummary, KeyFact, ArticleCategoryLink, ArticleCategoryMeta, TopicAuthorCard, TopicPagerLink } from './types';
@@ -86,6 +86,7 @@ export const LABELS = {
86
86
  peopleHub: {
87
87
  indexLabel: 'Jump to an era',
88
88
  footstepsHeading: 'Walk in their footsteps',
89
+ placesHeading: 'Where to find them',
89
90
  },
90
91
  personPage: {
91
92
  readFullStory: 'Read the full story',
@@ -139,6 +140,7 @@ export const LABELS = {
139
140
  peopleHeading: 'People',
140
141
  monumentsHeading: 'Monuments',
141
142
  articlesHeading: 'Articles',
143
+ allArticlesLabel: (count: number) => `All ${count} articles`,
142
144
  portraitAlt: (name: string) => `Portrait of ${name}`,
143
145
  },
144
146
  };