@sarimarcus/content-sites-ui 0.77.0 → 0.79.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,27 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.79.0 (2026-11-20)
6
+
7
+ - Article end matter: `ArticleTopicPager` drops its "All N <topic> articles" link (the category badge above the title already links the topic) and the rule above "Next in…", and its heading grows to `text-2xl`. `ArticlePage` moves the pager and Related out of the prose measure into a content-width container, so a three-column Related gets room on desktop (card `sizes` follow `relatedProps.columns`), and the gap above Related shows only when the pager lists an article. The bottom `backLink` footer is gone (SLA-4397).
8
+
9
+ ### Breaking
10
+
11
+ - `ArticleTopicPager`'s `allLabel` prop and its `articleTopicPager.allLabel` label are removed, and `topic.href`/`topic.count` are optional and unused. `ArticlePage`'s `backLink` no longer renders a footer link at the end of the article; it still shows on mobile above an editorial hero. No site passes `allLabel`, and existing `topic` objects keep type-checking, so there is no codemod and no site edit (SLA-4397).
12
+
13
+ ### Intended output changes
14
+
15
+ - `html:articles/**` — article pages lose the topic hub link and the footer back link, and the pager and Related render in a wider container.
16
+ - `html:articoli/**` — the same on curiosity-engineering-it's article pages.
17
+
18
+ ## 0.78.0 (2026-11-19)
19
+
20
+ - `ArticleMetadata` with `compact` and an `era` (the editorial rail head): the era renders as a text link (history icon, label · range) on its own line under the byline instead of a pill beside it; in the ~200px desktop rail the pill wrapped into a cramped 3–4 line block. Without `compact` the layout is unchanged (SLA-4389).
21
+
22
+ ### Intended output changes
23
+
24
+ - `html:articles/**` — on sites whose articles use `headVariant="editorial"`, era articles' rail era chip becomes a text link under the byline.
25
+
5
26
  ## 0.77.0 (2026-11-19)
6
27
 
7
28
  - No source change; lockstep release with the tourism `/whats-on` fixes (SLA-4361).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-ui",
3
- "version": "0.77.0",
3
+ "version": "0.79.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",
@@ -51,6 +51,6 @@
51
51
  "@lucide/astro": "^1.23.0",
52
52
  "astro": "^7.0.6",
53
53
  "tailwindcss": "^4.1.18",
54
- "@sarimarcus/content-sites-core": "0.77.0"
54
+ "@sarimarcus/content-sites-core": "0.79.0"
55
55
  }
56
56
  }
@@ -155,7 +155,7 @@ interface Props {
155
155
  eyebrowClass?: string;
156
156
  };
157
157
  topicPager?: {
158
- topic: { label: string; href: string; count?: number };
158
+ topic: { label: string; href?: string; count?: number };
159
159
  newer?: TopicPagerLink;
160
160
  older?: TopicPagerLink;
161
161
  } | null;
@@ -168,7 +168,7 @@ interface Props {
168
168
  columns?: 2 | 3;
169
169
  trackingBlock?: string;
170
170
  };
171
- /** Optional "All articles" back-link at the bottom of the page. */
171
+ /** Optional "All articles" back-link, shown on mobile above an editorial hero (the breadcrumb covers wider screens). */
172
172
  backLink?: { href: string; label?: string } | null;
173
173
  }
174
174
 
@@ -341,6 +341,7 @@ function buildSectionBlocks(section: ArticlePageSection): BodyBlock[] {
341
341
  const resolvedNoHeroEyebrow = noHeroEyebrow ?? l.articlesLabel;
342
342
  const resolvedKeyFactsAria = keyFactsAriaLabel ?? article.title;
343
343
  const resolvedRelatedTitle = relatedProps.title ?? l.relatedTitle;
344
+ const relatedColumns = relatedProps.columns ?? 2;
344
345
  ---
345
346
 
346
347
  <slot name="head" />
@@ -590,6 +591,10 @@ const resolvedRelatedTitle = relatedProps.title ?? l.relatedTitle;
590
591
  </div>
591
592
  )}
592
593
 
594
+ </Container>
595
+
596
+ {/* End matter leaves the prose measure: three cards need the content rail on desktop. */}
597
+ {(topicPager || relatedItems.length > 0 || Astro.slots.has('after-related')) && <Container size="content" class="pb-10 sm:pb-14">
593
598
  {topicPager && (
594
599
  <ArticleTopicPager
595
600
  topic={topicPager.topic}
@@ -600,32 +605,21 @@ const resolvedRelatedTitle = relatedProps.title ?? l.relatedTitle;
600
605
  )}
601
606
 
602
607
  {relatedItems.length > 0 && (
603
- <div class="mt-12" data-pagefind-ignore>
608
+ <div class:list={[(topicPager?.newer || topicPager?.older) && 'mt-14']} data-pagefind-ignore>
604
609
  <RelatedContent
605
610
  title={resolvedRelatedTitle}
606
611
  items={relatedItems}
607
612
  variant={relatedProps.variant ?? 'bordered'}
608
613
  layout={relatedProps.layout ?? 'carousel'}
609
- columns={relatedProps.columns ?? 2}
614
+ columns={relatedColumns}
615
+ pictureSizes={relatedColumns === 3 ? '(min-width: 1024px) 368px, (min-width: 640px) 256px, 80vw' : '(min-width: 1024px) 560px, (min-width: 640px) 320px, 85vw'}
610
616
  trackingBlock={relatedProps.trackingBlock ?? 'related-content'}
611
617
  />
612
618
  </div>
613
619
  )}
614
620
 
615
621
  <slot name="after-related" />
616
-
617
- {backLink && (
618
- <footer class="mt-12 pt-6 border-t border-border">
619
- <a
620
- href={backLink.href}
621
- class="inline-flex items-center gap-2 text-sm font-medium text-primary hover:underline"
622
- >
623
- <span aria-hidden="true">&larr;</span>
624
- <span>{backLink.label ?? l.allArticlesLabel}</span>
625
- </a>
626
- </footer>
627
- )}
628
- </Container>
622
+ </Container>}
629
623
  </article>
630
624
  </main>
631
625
 
@@ -1,23 +1,22 @@
1
1
  ---
2
2
  /**
3
3
  * ArticleTopicPager — "Next in <topic>" at the end of an article: the newer and the older article of the same topic,
4
- * text only (the Related block below it carries the images), then the topic hub link. The site resolves the
5
- * neighbours and every href. Renders nothing without a neighbour.
4
+ * text only (the Related block below it carries the images). The topic hub link lives in the badge above the title.
5
+ * The site resolves the neighbours and every href. Renders nothing without a neighbour.
6
6
  */
7
7
  import { formatUtcDate } from '@sarimarcus/content-sites-core/dates';
8
- import { Icon, LinkArrow } from '../primitives/index.ts';
8
+ import { Icon } from '../primitives/index.ts';
9
9
  import type { TopicPagerLink } from './types';
10
10
  import { getLabels } from '../internal/labels';
11
11
 
12
12
  interface Props {
13
- topic: { label: string; href: string; count?: number };
13
+ /** Only `label` renders; `href` and `count` are kept for compatibility. */
14
+ topic: { label: string; href?: string; count?: number };
14
15
  newer?: TopicPagerLink;
15
16
  older?: TopicPagerLink;
16
17
  heading?: string;
17
18
  newerLabel?: string;
18
19
  olderLabel?: string;
19
- /** The topic hub link's text. */
20
- allLabel?: string;
21
20
  /** BCP-47 locale for date formatting and default labels (defaults to `en-GB`). */
22
21
  locale?: string;
23
22
  class?: string;
@@ -31,7 +30,6 @@ const {
31
30
  heading = getLabels(locale).articleTopicPager.heading(topic.label),
32
31
  newerLabel = getLabels(locale).articleTopicPager.newerLabel,
33
32
  olderLabel = getLabels(locale).articleTopicPager.olderLabel,
34
- allLabel = getLabels(locale).articleTopicPager.allLabel(topic.label, topic.count),
35
33
  class: className,
36
34
  } = Astro.props;
37
35
 
@@ -43,9 +41,9 @@ const sides = [
43
41
  ---
44
42
 
45
43
  {sides.length > 0 && (
46
- <nav aria-label={heading} class:list={['mt-14 pt-8 border-t border-border', className]} data-pagefind-ignore>
47
- <h2 class="text-base font-semibold text-foreground">{heading}</h2>
48
- <div class:list={['mt-3 border-y border-border', sides.length === 2 && 'grid sm:grid-cols-2 sm:divide-x divide-y sm:divide-y-0 divide-border']}>
44
+ <nav aria-label={heading} class:list={[className]} data-pagefind-ignore>
45
+ <h2 class="text-2xl font-display font-semibold text-foreground">{heading}</h2>
46
+ <div class:list={['mt-4 border-y border-border', sides.length === 2 && 'grid sm:grid-cols-2 sm:divide-x divide-y sm:divide-y-0 divide-border']}>
49
47
  {sides.map(({ link, label, dir }) => (
50
48
  <a
51
49
  href={link.href}
@@ -64,6 +62,5 @@ const sides = [
64
62
  </a>
65
63
  ))}
66
64
  </div>
67
- <LinkArrow href={topic.href} class="mt-4 rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary">{allLabel}</LinkArrow>
68
65
  </nav>
69
66
  )}
@@ -152,7 +152,6 @@ export const LABELS = {
152
152
  heading: (topic: string) => `Next in ${topic}`,
153
153
  newerLabel: 'Newer',
154
154
  olderLabel: 'Older',
155
- allLabel: (topic: string, count?: number) => (count ? `All ${count} ${topic} articles` : `All ${topic} articles`),
156
155
  },
157
156
  notFoundPage: { exploreAriaLabel: 'Explore sections', searchShortcut: '⌘K' },
158
157
  visitTiming: { title: 'When to Visit', bestSeason: 'Best season', quietestHours: 'Quietest hours', visitDuration: 'Visit duration' },
@@ -413,7 +412,6 @@ export const LABELS_IT: typeof LABELS = {
413
412
  heading: (topic: string) => `Continua in ${topic}`,
414
413
  newerLabel: 'Più recente',
415
414
  olderLabel: 'Precedente',
416
- allLabel: (topic: string, count?: number) => (count ? `Tutti i ${count} articoli su ${topic}` : `Tutti gli articoli su ${topic}`),
417
415
  },
418
416
  notFoundPage: { exploreAriaLabel: 'Esplora le sezioni', searchShortcut: '⌘K' },
419
417
  visitTiming: { title: 'Quando visitare', bestSeason: 'Periodo migliore', quietestHours: 'Orari più tranquilli', visitDuration: 'Durata della visita' },
@@ -17,8 +17,9 @@
17
17
  import { Image } from 'astro:assets';
18
18
  import { isUpdatedAfterPublication } from '@sarimarcus/content-sites-core/articles';
19
19
  import { formatDisplayDay } from '@sarimarcus/content-sites-core/dates';
20
- import type { EraDefinition } from '@sarimarcus/content-sites-core/eras';
20
+ import { eraHref, type EraDefinition } from '@sarimarcus/content-sites-core/eras';
21
21
  import Badge from '../primitives/Badge.astro';
22
+ import Icon from '../primitives/Icon.astro';
22
23
  import EraChip from '../editorial/EraChip.astro';
23
24
  import type { ArticleAuthor } from './types';
24
25
  import { getLabels } from '../internal/labels';
@@ -92,9 +93,18 @@ const aboutAuthorLabel = defaultLabels.articleMetadata.aboutAuthorLabel;
92
93
  const fullProfileLabel = defaultLabels.articleMetadata.fullProfileLabel;
93
94
  const grouped = bylineWhitespace === 'grouped';
94
95
  const bylineLead = author ? (grouped ? ' ' : ' ') : (grouped ? '' : ' ');
96
+ // With `compact` (the ~200px desktop rail) the era is a text link: a pill wrapped into a cramped block there.
95
97
  ---
96
98
 
97
- {era ? (
99
+ {era && compact ? (
100
+ <div class="flex flex-col items-start">
101
+ <Astro.self {...bylineProps} />
102
+ <a href={eraHref(era, eraBasePath)} data-era={era.id} aria-label={defaultLabels.eraChip.ariaLabel(era.label, era.rangeLabel)}
103
+ class="mb-4 inline-flex min-h-[44px] items-center gap-1.5 text-sm text-muted-foreground hover:text-primary hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary">
104
+ <Icon name="history" class="h-3.5 w-3.5 shrink-0 text-primary" /><span>{era.label} · <span class="whitespace-nowrap tabular-nums">{era.rangeLabel}</span></span>
105
+ </a>
106
+ </div>
107
+ ) : era ? (
98
108
  <div class="flex flex-wrap items-start justify-between gap-x-6">
99
109
  <div class="min-w-0 basis-full sm:basis-0 sm:flex-1"><Astro.self {...bylineProps} /></div>
100
110
  <EraChip era={era} basePath={eraBasePath} class="mb-5 self-start" />