@sarimarcus/content-sites-tourism 0.68.0 → 0.69.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,16 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.69.0 (2026-11-13)
6
+
7
+ Additive (SLA-4111).
8
+
9
+ - `TourismItinerariesHub`: `arrivals`, `trips` (with its map), `plan` and `faq` become optional, as do `lead.also`, `lead.checked`/`checkedLabel`, `lead.photo.caption` and `HubItinerary.image`; an omitted section, line or image renders nothing. New named slots: `toc`, `tips`, `faq` (replaces the model FAQ) and `after-faq`, each wrapped in a package band only when it renders content, and raw `after-lead`, `after-arrivals`, `after-trips`, `after-routes`, `after-plan` for a site's own sections. Output without slots is unchanged (render-diff case `tests/fixtures/render-diff/tourism-itineraries-hub.json`).
10
+
11
+ ### Intended output changes
12
+
13
+ - `turism-cordoba-en=html:itineraries.html` — the template's scoped stylesheet gains the `.itn-toc` padding rule; the markup is byte-identical.
14
+
5
15
  ## 0.68.0 (2026-11-13)
6
16
 
7
17
  Additive (SLA-4105).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.68.0",
3
+ "version": "0.69.0",
4
4
  "description": "City-tourism vertical: city-entity components, pages templates and utilities for the tourism sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  "peerDependencies": {
40
40
  "astro": "^7.0.6",
41
41
  "tailwindcss": "^4.1.18",
42
- "@sarimarcus/content-sites-core": "0.68.0",
43
- "@sarimarcus/content-sites-ui": "0.68.0"
42
+ "@sarimarcus/content-sites-core": "0.69.0",
43
+ "@sarimarcus/content-sites-ui": "0.69.0"
44
44
  }
45
45
  }
@@ -9,9 +9,11 @@ interface Props { model: TourismItinerariesModel }
9
9
  const { model } = Astro.props;
10
10
  const { lead, stays, arrivals, trips, routes, plan, faq } = model;
11
11
  const routeLead = routes.lead;
12
- const tourLinks = plan.tours ? await Promise.all(plan.tours.items.map((t) => Astro.slots.render(t.slot))) : [];
13
- const markKinds = [...new Set(plan.months.flatMap((m) => m.mark ? [m.mark] : []))];
12
+ const tourLinks = plan?.tours ? await Promise.all(plan.tours.items.map((t) => Astro.slots.render(t.slot))) : [];
13
+ const markKinds = [...new Set((plan?.months ?? []).flatMap((m) => m.mark ? [m.mark] : []))];
14
14
  const showDays = (i: { days?: string; name: string }) => i.days && !i.name.includes(i.days);
15
+ const slotHtml = async (name: string) => (Astro.slots.has(name) ? (await Astro.slots.render(name)).trim() : '');
16
+ const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq', 'after-faq'].map(slotHtml));
15
17
  ---
16
18
 
17
19
  <div data-pagefind-ignore>
@@ -23,20 +25,20 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
23
25
  <div>
24
26
  <h1 id="itn-h1">{lead.heading}</h1>
25
27
  <p class="hp-lead__stand">{lead.standfirst}</p>
26
- <p class="itn-also" set:html={lead.also} />
28
+ {lead.also && <p class="itn-also" set:html={lead.also} />}
27
29
  <p class="hp-lead__links">{lead.links.map((g) => <a href={g.href}>{g.label}</a>)}</p>
28
30
  <nav class="hp-jump" aria-label={lead.jumpLabel}>
29
31
  <ul role="list">
30
32
  {lead.links.map((g) => <li><a href={g.href}>{g.label}</a></li>)}
31
33
  </ul>
32
34
  </nav>
33
- <p class="hp-meta itn-byline">{lead.byLabel} <a href={lead.author.href}>{lead.author.label}</a> · {lead.updatedLabel} <time datetime={lead.updated.datetime}>{lead.updated.label}</time> · {lead.checkedLabel} <time datetime={lead.checked.datetime}>{lead.checked.label}</time></p>
35
+ <p class="hp-meta itn-byline">{lead.byLabel} <a href={lead.author.href}>{lead.author.label}</a> · {lead.updatedLabel} <time datetime={lead.updated.datetime}>{lead.updated.label}</time>{lead.checked && <> · {lead.checkedLabel} <time datetime={lead.checked.datetime}>{lead.checked.label}</time></>}</p>
34
36
  </div>
35
37
  <figure class="hp-lead__photo">
36
38
  <div>
37
39
  <ResponsiveImage src={lead.photo.image} alt={lead.photo.alt} sizes="(min-width: 72rem) 760px, (min-width: 52rem) 64vw, 112vw" loading="eager" fetchpriority="high" />
38
40
  </div>
39
- <figcaption>{lead.photo.caption}</figcaption>
41
+ {lead.photo.caption && <figcaption>{lead.photo.caption}</figcaption>}
40
42
  </figure>
41
43
  </div>
42
44
 
@@ -48,7 +50,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
48
50
  <ol role="list" class="hp-rank itn-stay">
49
51
  {stays.items.map((s) => (
50
52
  <li>
51
- <span class="hp-rank__thumb"><ResponsiveImage src={s.image} alt="" sizes="(min-width: 52rem) 256px, 192px" loading="lazy" /></span>
53
+ {s.image && <span class="hp-rank__thumb"><ResponsiveImage src={s.image} alt="" sizes="(min-width: 52rem) 256px, 192px" loading="lazy" /></span>}
52
54
  <div class="hp-rank__body">
53
55
  <h3><a href={s.href}>{s.name}</a></h3>
54
56
  {s.text && <p class="hp-rank__why">{s.text}</p>}
@@ -59,8 +61,8 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
59
61
  </ol>
60
62
  </section>
61
63
  </Container>
62
- </section>
63
-
64
+ </section>{toc && <div class="itn-toc"><Container><Fragment set:html={toc} /></Container></div>}<slot name="after-lead" />
65
+ {arrivals && (
64
66
  <section class="hp-band hp-band--muted" id="getting-here" aria-labelledby="arrive-h" data-track-zone="getting-here">
65
67
  <Container>
66
68
  <div class="hp-head">
@@ -77,7 +79,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
77
79
  <tr>
78
80
  <th scope="row">
79
81
  <span class="hp-cal__ev">
80
- <span class="hp-cal__thumb"><ResponsiveImage src={a.image} alt="" sizes="(min-width: 40rem) 96px, 152px" loading="lazy" /></span>
82
+ {a.image && <span class="hp-cal__thumb"><ResponsiveImage src={a.image} alt="" sizes="(min-width: 40rem) 96px, 152px" loading="lazy" /></span>}
81
83
  <span class="hp-cal__name"><a href={a.href}>{a.name}</a></span>
82
84
  </span>
83
85
  </th>
@@ -90,7 +92,8 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
90
92
  </table>
91
93
  </Container>
92
94
  </section>
93
-
95
+ )}<slot name="after-arrivals" />
96
+ {trips && (
94
97
  <section class="hp-band" id="day-trips" aria-labelledby="trips-h" data-track-zone="day-trips">
95
98
  <Container>
96
99
  <div class="hp-head">
@@ -101,7 +104,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
101
104
  <ol role="list" class="hp-trips">
102
105
  {trips.items.map((t, i) => (
103
106
  <li>
104
- <div class="hp-img"><ResponsiveImage src={t.image} alt="" sizes="160px" loading="lazy" /></div>
107
+ {t.image && <div class="hp-img"><ResponsiveImage src={t.image} alt="" sizes="160px" loading="lazy" /></div>}
105
108
  <h3><span class="itn-n" aria-hidden="true">{i + 1}</span><a class="hp-quiet" href={t.href}>{t.name}</a></h3>
106
109
  {t.text && <p>{t.text}</p>}
107
110
  <span class="hp-meta">{t.journeyMeta}</span>
@@ -114,6 +117,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
114
117
  </div>
115
118
  </Container>
116
119
  </section>
120
+ )}<slot name="after-trips" />
117
121
 
118
122
  <section class="hp-band hp-band--muted" id={routes.id} aria-labelledby={`${routes.id}-h`} data-track-zone={routes.trackZone}>
119
123
  <Container>
@@ -123,7 +127,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
123
127
  </div>
124
128
  <div class="hp-feed">
125
129
  {routeLead && <article class="hp-feed__lead">
126
- <div class="hp-img"><ResponsiveImage src={routeLead.image} alt={routeLead.imageAlt} sizes="(min-width: 72rem) 760px, (min-width: 52rem) 58vw, 100vw" loading="lazy" /></div>
130
+ {routeLead.image && <div class="hp-img"><ResponsiveImage src={routeLead.image} alt={routeLead.imageAlt} sizes="(min-width: 72rem) 760px, (min-width: 52rem) 58vw, 100vw" loading="lazy" /></div>}
127
131
  <h3><a href={routeLead.href}>{routeLead.name}</a></h3>
128
132
  {routeLead.text && <p class="hp-dek">{routeLead.text}</p>}
129
133
  {showDays(routeLead) && <p class="hp-meta">{routeLead.days}</p>}
@@ -136,14 +140,14 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
136
140
  {r.text && <p>{r.text}</p>}
137
141
  {showDays(r) && <p class="hp-meta">{r.days}</p>}
138
142
  </div>
139
- <div class="hp-thumb"><ResponsiveImage src={r.image} alt="" sizes="176px" loading="lazy" /></div>
143
+ {r.image && <div class="hp-thumb"><ResponsiveImage src={r.image} alt="" sizes="176px" loading="lazy" /></div>}
140
144
  </li>
141
145
  ))}
142
146
  </ul>
143
147
  </div>
144
148
  </Container>
145
- </section>
146
-
149
+ </section><slot name="after-routes" />
150
+ {plan && (
147
151
  <section class="hp-band" id="when" aria-labelledby="plan-h" data-track-zone="plan-your-visit">
148
152
  <Container>
149
153
  <div class="hp-head">
@@ -182,7 +186,8 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
182
186
  </div>
183
187
  </Container>
184
188
  </section>
185
-
189
+ )}<slot name="after-plan" />
190
+ {tips && <section class="hp-band" id="insider-tips" data-track-zone="insider-tips"><Container><Fragment set:html={tips} /></Container></section>}{faqHtml ? <section class="hp-band hp-band--muted" id="faq" data-track-zone="faq"><Container><Fragment set:html={faqHtml} /></Container></section> : faq && (
186
191
  <section class="hp-band hp-band--muted" aria-labelledby="qa-h" data-track-zone="faq">
187
192
  <Container>
188
193
  <div class="hp-head">
@@ -198,7 +203,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
198
203
  </dl>
199
204
  </Container>
200
205
  </section>
201
-
206
+ )}{afterFaq && <section class="hp-band" data-track-zone="sources"><Container><Fragment set:html={afterFaq} /></Container></section>}
202
207
  </main>
203
208
  </div>
204
209
 
@@ -206,6 +211,7 @@ const showDays = (i: { days?: string; name: string }) => i.days && !i.name.inclu
206
211
  .hp.itn .itn-lead { padding-top: clamp(2rem, 5vw, 3.5rem); }
207
212
  .hp .itn-also { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted-foreground); }
208
213
  .hp .itn-byline { margin-top: 1.25rem; }
214
+ .hp .itn-toc { padding-block: 1.5rem; }
209
215
  .hp .hp-plan__when .hp-key { margin-bottom: 1rem; }
210
216
  .hp :global(.itn-tours) > div { padding-block: 0.75rem; border-top: var(--hp-rule); display: grid; gap: 0.125rem; }
211
217
  .hp :global(.itn-tours a) { font-weight: 600; }
@@ -5,7 +5,7 @@ import type { MarkLabels } from '../sections/marks';
5
5
  export interface HubItinerary {
6
6
  name: string;
7
7
  href: string;
8
- image: ImageMetadata;
8
+ image?: ImageMetadata;
9
9
  imageAlt: string;
10
10
  text?: string;
11
11
  days?: string;
@@ -14,24 +14,25 @@ export interface HubItinerary {
14
14
  journeyMeta?: string;
15
15
  }
16
16
 
17
+ /** Optional sections render nothing when omitted. Named slots: `toc`, `after-lead`, `after-arrivals`, `after-trips`, `after-routes`, `after-plan`, `tips`, `faq` (replaces the model FAQ), `after-faq`. */
17
18
  export interface TourismItinerariesModel {
18
19
  lead: {
19
20
  heading: string;
20
21
  standfirst: string;
21
22
  /** HTML. */
22
- also: string;
23
+ also?: string;
23
24
  links: HomeLink[];
24
25
  jumpLabel: string;
25
- photo: { image: ImageMetadata; alt: string; caption: string };
26
+ photo: { image: ImageMetadata; alt: string; caption?: string };
26
27
  author: HomeLink;
27
28
  byLabel: string;
28
29
  updatedLabel: string;
29
30
  updated: { datetime: string; label: string };
30
- checkedLabel: string;
31
- checked: { datetime: string; label: string };
31
+ checkedLabel?: string;
32
+ checked?: { datetime: string; label: string };
32
33
  };
33
34
  stays: HomeHead & { items: HubItinerary[] };
34
- arrivals: HomeHead & {
35
+ arrivals?: HomeHead & {
35
36
  caption: string;
36
37
  columns: { route: string; journey: string; mode: string; fare: string };
37
38
  perDaySuffix: string;
@@ -39,9 +40,9 @@ export interface TourismItinerariesModel {
39
40
  fromLabel: string;
40
41
  items: HubItinerary[];
41
42
  };
42
- trips: HomeHead & { mapLabel: string; items: HubItinerary[] };
43
+ trips?: HomeHead & { mapLabel: string; items: HubItinerary[] };
43
44
  routes: HomeHead & { id: string; trackZone: string; lead?: HubItinerary; items: HubItinerary[] };
44
- plan: {
45
+ plan?: {
45
46
  heading: string;
46
47
  monthsHeading: string;
47
48
  months: HomeMonth[];
@@ -52,5 +53,6 @@ export interface TourismItinerariesModel {
52
53
  /** Each named slot contains the site's affiliate link, followed by its meta. */
53
54
  tours?: { heading: string; items: { slot: string; meta: string }[]; more: HomeLink };
54
55
  };
55
- faq: { heading: string; items: { question: string; /** HTML. */ answer: string }[] };
56
+ /** Omit when the page fills the `faq` slot. */
57
+ faq?: { heading: string; items: { question: string; /** HTML. */ answer: string }[] };
56
58
  }