@sarimarcus/content-sites-tourism 0.70.0 → 0.72.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,37 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.72.0 (2026-11-14)
6
+
7
+ Additive (SLA-4204).
8
+
9
+ - `TourismMonthGuide` event rows render optional `highlights` (a list) and `tips` from `MonthEventRow`; `events.tipLabel` prefixes a row tip. A row carrying either wraps its name in a `<div>` instead of the `<span>`; rows without them render byte-identical. No codemod.
10
+ - Render-diff case `tests/fixtures/render-diff/sla-4204-month-event-rows.json`. Proof: 3 tourism sites passed, html identical on every page.
11
+
12
+ ### Intended output changes
13
+
14
+ - `css:added` — three rules for the event highlights list and tip (`.mg-ev-hl`, `.mg-ev-tip`).
15
+
16
+ ## 0.71.0 (2026-11-14)
17
+
18
+ Additive (SLA-4167).
19
+
20
+ - `TourismHomePage` and `TourismItinerariesHub` render their month strips through `MonthStripNav`, which gains optional `flush` and `locale` props; its key renders only when `strip.keyLabel` is set. Model types are unchanged: no codemod, no site wiring change.
21
+ - `MonthStripNav` has no `<style>` block: it is rendered from the `./templates` barrel, so its rules live in `home.css`, which every route rendering a strip already imports. `package-consumer.mjs` probes that no month-strip rule reaches a page that imports the barrel without rendering a strip.
22
+ - Render-diff case `tests/fixtures/render-diff/sla-4167-month-strips.json`. Proof: 3 sites passed, 16 expected page differences each, structured data identical.
23
+
24
+ ### Intended output changes
25
+
26
+ - `html:index.html` — the homepage month strip is wrapped in a `<nav>` carrying its aria-label.
27
+ - `html:itineraries.html` — the itineraries month strip is wrapped in the same `<nav>`, and its key no longer renders empty.
28
+ - `css:added` — the month-strip rules move into `home.css`.
29
+ - `turism-cordoba-en=html:plan/months.html` — the months index strip picks up the shared strip stylesheet.
30
+ - `turism-cordoba-en=html:plan/months/*.html` — each month guide's strip picks up the shared strip stylesheet.
31
+ - `turism-granada-en=html:discover/granada-in-*.html` — each month guide's strip picks up the shared strip stylesheet.
32
+ - `turism-granada-en=html:discover/granada-weather.html` — the weather page's strip picks up the shared strip stylesheet.
33
+ - `turism-cadiz-en=html:discover/cadiz-in-*.html` — each month guide's strip picks up the shared strip stylesheet.
34
+ - `turism-cadiz-en=html:discover/cadiz-weather.html` — the weather page's strip picks up the shared strip stylesheet.
35
+
5
36
  ## 0.70.0 (2026-11-14)
6
37
 
7
38
  Additive (SLA-4152).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.70.0",
3
+ "version": "0.72.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",
@@ -40,7 +40,7 @@
40
40
  "peerDependencies": {
41
41
  "astro": "^7.0.6",
42
42
  "tailwindcss": "^4.1.18",
43
- "@sarimarcus/content-sites-core": "0.70.0",
44
- "@sarimarcus/content-sites-ui": "0.70.0"
43
+ "@sarimarcus/content-sites-core": "0.72.0",
44
+ "@sarimarcus/content-sites-ui": "0.72.0"
45
45
  }
46
46
  }
@@ -1,28 +1,22 @@
1
1
  ---
2
2
  import Mark from '../sections/Mark.astro';
3
3
  import type { MonthStrip } from './tourismMonthGuideModel';
4
+ // No style block: rendered from the ./templates barrel, so its rules live in home.css (SLA-4167).
4
5
 
5
- interface Props { strip: MonthStrip }
6
- const { strip } = Astro.props;
6
+ /** The key renders only with `strip.keyLabel`. */
7
+ interface Props { strip: MonthStrip; flush?: boolean; locale?: string }
8
+ const { strip, flush = false, locale } = Astro.props;
7
9
  const kinds = [...new Set(strip.items.flatMap((m) => (m.mark ? [m.mark] : [])))];
8
10
  ---
9
- <nav class="mg-strip" aria-label={strip.label}>
11
+ <nav class:list={['mg-strip', { 'mg-strip--flush': flush }]} aria-label={strip.label}>
10
12
  <ol role="list" class="hp-months">
11
13
  {strip.items.map((mo) => (
12
- <li class:list={[{ 'is-peak': mo.peak, 'is-current': mo.current }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel} aria-current={mo.current ? 'page' : undefined}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={strip.marks?.[mo.mark]} decorative />}</a></li>
14
+ <li class:list={[{ 'is-peak': mo.peak, 'is-current': mo.current }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel} aria-current={mo.current ? 'page' : undefined}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={strip.marks?.[mo.mark]} decorative locale={locale} />}</a></li>
13
15
  ))}
14
16
  </ol>
15
- {kinds.length > 0 && strip.marks && (
17
+ {kinds.length > 0 && strip.marks && strip.keyLabel && (
16
18
  <ul role="list" class="hp-key" aria-label={strip.keyLabel}>
17
- {kinds.map((k) => <li><Mark kind={k} decorative />{strip.marks![k]}</li>)}
19
+ {kinds.map((k) => <li><Mark kind={k} decorative locale={locale} />{strip.marks![k]}</li>)}
18
20
  </ul>
19
21
  )}
20
22
  </nav>
21
-
22
- <style>
23
- .mg-strip { margin-top: clamp(2rem, 4vw, 3rem); }
24
- .mg-strip :global(.hp-months li.is-current) { background: var(--primary-strong); }
25
- .mg-strip :global(.hp-months li.is-current a) { color: var(--background); font-weight: 600; }
26
- .mg-strip :global(.hp-months li.is-current a:hover) { background: none; color: var(--background); }
27
- .mg-strip :global(.hp-months li.is-current .hp-mark) { color: var(--background); }
28
- </style>
@@ -13,6 +13,7 @@ import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
13
13
  import { Container } from '@sarimarcus/content-sites-ui/layout';
14
14
  import { Image } from 'astro:assets';
15
15
  import Mark from '../sections/Mark.astro';
16
+ import MonthStripNav from './MonthStripNav.astro';
16
17
  import { getLabels } from '../internal/labels';
17
18
  import type { MarkKind } from '../sections/marks.ts';
18
19
  import type { TourismHomeModel } from './tourismHomeModel.ts';
@@ -124,11 +125,7 @@ const showEntry = Boolean(events?.columns.entry);
124
125
  <div class="hp-plan__main">
125
126
  <div class="hp-plan__when">
126
127
  <h3>{plan.when.heading}</h3>
127
- <ol role="list" class="hp-months" aria-label={plan.when.monthsAriaLabel}>
128
- {plan.when.months.map((mo) => (
129
- <li class:list={[{ 'is-peak': mo.peak }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={marks[mo.mark]} decorative locale={locale} />}</a></li>
130
- ))}
131
- </ol>
128
+ <MonthStripNav strip={{ label: plan.when.monthsAriaLabel, items: plan.when.months, marks }} flush locale={locale} />
132
129
  <p set:html={plan.when.note} />
133
130
  </div>
134
131
 
@@ -2,7 +2,7 @@
2
2
  import { ResponsiveImage } from '@sarimarcus/content-sites-ui/primitives';
3
3
  import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
4
4
  import { Container } from '@sarimarcus/content-sites-ui/layout';
5
- import Mark from '../sections/Mark.astro';
5
+ import MonthStripNav from './MonthStripNav.astro';
6
6
  import type { TourismItinerariesModel } from './tourismItinerariesModel';
7
7
 
8
8
  interface Props { model: TourismItinerariesModel }
@@ -10,7 +10,6 @@ const { model } = Astro.props;
10
10
  const { lead, stays, arrivals, trips, routes, plan, faq } = model;
11
11
  const routeLead = routes.lead;
12
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
13
  const showDays = (i: { days?: string; name: string }) => i.days && !i.name.includes(i.days);
15
14
  const slotHtml = async (name: string) => (Astro.slots.has(name) ? (await Astro.slots.render(name)).trim() : '');
16
15
  const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq', 'after-faq'].map(slotHtml));
@@ -157,14 +156,7 @@ const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq',
157
156
  <div class="hp-plan__main">
158
157
  <div class="hp-plan__when">
159
158
  <h3>{plan.monthsHeading}</h3>
160
- <ol role="list" class="hp-months" aria-label={plan.monthsHeading}>
161
- {plan.months.map((mo) => (
162
- <li class:list={[{ 'is-peak': mo.peak }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={plan.marks[mo.mark]} decorative />}</a></li>
163
- ))}
164
- </ol>
165
- <ul role="list" class="hp-key" aria-label={plan.keyLabel}>
166
- {markKinds.map((k) => <li><Mark kind={k} decorative />{plan.marks[k]}</li>)}
167
- </ul>
159
+ <MonthStripNav strip={{ label: plan.monthsHeading, items: plan.months, marks: plan.marks, keyLabel: plan.keyLabel }} flush />
168
160
  <p set:html={plan.note} />
169
161
  </div>
170
162
  </div>
@@ -212,7 +204,7 @@ const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq',
212
204
  .hp .itn-also { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted-foreground); }
213
205
  .hp .itn-byline { margin-top: 1.25rem; }
214
206
  .hp .itn-toc { padding-block: 1.5rem; }
215
- .hp .hp-plan__when .hp-key { margin-bottom: 1rem; }
207
+ .hp .hp-plan__when :global(.hp-key) { margin-bottom: 1rem; }
216
208
  .hp :global(.itn-tours) > div { padding-block: 0.75rem; border-top: var(--hp-rule); display: grid; gap: 0.125rem; }
217
209
  .hp :global(.itn-tours a) { font-weight: 600; }
218
210
 
@@ -102,19 +102,24 @@ const thingMarks = things.marks ?? months.marks;
102
102
  <tr><th scope="col">{events.columns.when}</th><th scope="col">{events.columns.name}</th>{showPlace && <th scope="col">{events.columns.place}</th>}{showEntry && <th scope="col">{events.columns.entry}</th>}</tr>
103
103
  </thead>
104
104
  <tbody>
105
- {events.rows.map((r) => (
105
+ {events.rows.map((r) => {
106
+ const label = <>{r.href ? <a href={r.href}>{r.name}</a> : <span class="mg-evname">{r.name}</span>}{r.note && <span class="mg-note">{r.note}</span>}</>;
107
+ return (
106
108
  <tr>
107
109
  <td class="hp-when">{r.when}</td>
108
110
  <th scope="row">
109
111
  <div class="hp-cal__ev">
110
112
  <span class="hp-cal__thumb">{r.image && <ResponsiveImage src={r.image} alt="" sizes="(min-width: 40rem) 96px, 152px" loading="lazy" />}</span>
111
- <span class="hp-cal__name">{r.href ? <a href={r.href}>{r.name}</a> : <span class="mg-evname">{r.name}</span>}{r.note && <span class="mg-note">{r.note}</span>}</span>
113
+ {r.highlights?.length || r.tips
114
+ ? <div class="hp-cal__name">{label}{r.highlights && r.highlights.length > 0 && <ul role="list" class="mg-ticks mg-ev-hl">{r.highlights.map((h) => <li>{h}</li>)}</ul>}{r.tips && <p class="mg-ev-tip">{events.tipLabel && <strong>{events.tipLabel} </strong>}{r.tips}</p>}</div>
115
+ : <span class="hp-cal__name">{label}</span>}
112
116
  </div>
113
117
  </th>
114
118
  {showPlace && <td class="hp-where">{r.place}</td>}
115
119
  {showEntry && <td class="hp-entry">{r.entry}</td>}
116
120
  </tr>
117
- ))}
121
+ );
122
+ })}
118
123
  </tbody>
119
124
  </table>
120
125
  {events.more && <a class="hp-more" href={events.more.href}>{events.more.label}</a>}
@@ -326,6 +331,8 @@ const thingMarks = things.marks ?? months.marks;
326
331
  .hp .mg-cal .hp-cal__thumb:empty { visibility: hidden; }
327
332
  .hp .mg-evname { font-family: var(--font-display); font-size: 1.125rem; }
328
333
  .hp .mg-note { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
334
+ .hp .mg-ev-hl { margin: 0.5rem 0 0; font-size: 0.875rem; font-weight: 400; }
335
+ .hp .mg-ev-tip { margin: 0.5rem 0 0; font-size: 0.875rem; font-weight: 400; max-width: 40rem; }
329
336
 
330
337
  .hp .mg-things .hp-rank__why { max-width: 44rem; }
331
338
 
@@ -342,6 +349,7 @@ const thingMarks = things.marks ?? months.marks;
342
349
  .hp .mg-ticks > li + li { margin-top: 0.5rem; }
343
350
  .hp .mg-ticks > li::before { content: ""; position: absolute; left: 0.125rem; top: 0.6em; width: 0.4rem; height: 0.4rem; transform: rotate(45deg); background: var(--primary-strong); }
344
351
  .hp .hp-band--inverse .mg-ticks > li::before { background: var(--accent); }
352
+ .hp .mg-ev-hl > li + li { margin-top: 0.25rem; }
345
353
  .hp .mg-food-tips { margin-top: 2rem; font-size: 0.9375rem; }
346
354
  .hp .hp-dishes .mg-dish { font-family: var(--font-display); font-size: 1.1875rem; }
347
355
  .hp .mg-food--solo { grid-template-columns: minmax(0, 1fr); }
@@ -119,6 +119,13 @@
119
119
  .hp .hp-months li a:focus-visible { outline-offset: -2px; }
120
120
  .hp .hp-months li:last-child { border-right: 0; }
121
121
  .hp .hp-months li.is-peak { background: color-mix(in oklch, var(--primary) 9%, var(--background)); }
122
+ /* MonthStripNav */
123
+ .hp .mg-strip { margin-top: clamp(2rem, 4vw, 3rem); }
124
+ .hp .mg-strip--flush { margin-top: 0; }
125
+ .hp .mg-strip .hp-months li.is-current { background: var(--primary-strong); }
126
+ .hp .mg-strip .hp-months li.is-current a { color: var(--background); font-weight: 600; }
127
+ .hp .mg-strip .hp-months li.is-current a:hover { background: none; color: var(--background); }
128
+ .hp .mg-strip .hp-months li.is-current .hp-mark { color: var(--background); }
122
129
  .hp .hp-plan__when p { max-width: 40rem; }
123
130
  .hp .hp-tix > li { padding-block: 0.875rem; border-top: var(--hp-rule); }
124
131
  .hp .hp-tix > li:last-child { border-bottom: var(--hp-rule); }
@@ -33,7 +33,7 @@ export interface MonthClimateTable {
33
33
 
34
34
  export interface MonthPeriod { period: string; range: string; facts: string; text: string }
35
35
 
36
- export interface MonthEventRow { when: string; name: string; href?: string; image?: ImageMetadata; place?: string; entry?: string; note?: string }
36
+ export interface MonthEventRow { when: string; name: string; href?: string; image?: ImageMetadata; place?: string; entry?: string; note?: string; highlights?: string[]; tips?: string }
37
37
 
38
38
  export interface MonthThing { title: string; href?: string; text: string; image?: ImageMetadata; mark?: MarkKind }
39
39
 
@@ -59,7 +59,8 @@ export interface TourismMonthGuideModel {
59
59
  /** `prev`/`next` render at the foot of the page; `kicker` is the small line above each ("Previous month"). */
60
60
  months: MonthStrip & { prev: HomeLink & { kicker: string }; next: HomeLink & { kicker: string }; adjacentLabel: string };
61
61
  weather: HomeHead & { table: MonthClimateTable; periods?: MonthPeriod[]; /** HTML. */ tip?: string };
62
- events?: HomeHead & { caption: string; columns: { when: string; name: string; place: string; entry: string }; rows: MonthEventRow[]; more?: HomeLink };
62
+ /** `tipLabel` prefixes a row's `tips`. */
63
+ events?: HomeHead & { caption: string; columns: { when: string; name: string; place: string; entry: string }; rows: MonthEventRow[]; tipLabel?: string; more?: HomeLink };
63
64
  things: HomeHead & { items: MonthThing[]; marks?: MarkLabels };
64
65
  features?: MonthFeature[];
65
66
  food?: HomeHead & {