@sarimarcus/content-sites-tourism 0.68.0 → 0.70.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,25 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.70.0 (2026-11-14)
6
+
7
+ Additive (SLA-4152).
8
+
9
+ - New export `@sarimarcus/content-sites-tourism/templates/months`: `TourismMonthGuide` (one month: lead with facts and jump links, month strip with previous/next, climate table, periods, events table, things to do, features, food, plan with crowds/packing/tips/tours, verdict, FAQ) and `TourismMonthsIndex` (all twelve months: lead, strip, month table with marks and peak tint, season cards, FAQ), each driven by a `TourismMonthGuideModel` / `TourismMonthsIndexModel` with every label from the route. Named slots: the guide takes `after-lead`, `tour-disclosure`, one per tour item, `related` and `after-faq`; the index takes `after-table` and `after-faq`.
10
+ - `MonthStripNav`: the homepage month strip with marks, key and an optional current month, shared by both templates.
11
+ - Internal `ScrollTable` for both climate tables: focusable labelled scroll region, `sr-only` caption, sticky row header.
12
+ - No existing component changes; output of current pages is unchanged (proof: 833 + 699 + 350 pages unchanged).
13
+
14
+ ## 0.69.0 (2026-11-13)
15
+
16
+ Additive (SLA-4111).
17
+
18
+ - `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`).
19
+
20
+ ### Intended output changes
21
+
22
+ - `turism-cordoba-en=html:itineraries.html` — the template's scoped stylesheet gains the `.itn-toc` padding rule; the markup is byte-identical.
23
+
5
24
  ## 0.68.0 (2026-11-13)
6
25
 
7
26
  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.70.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",
@@ -30,6 +30,7 @@
30
30
  "./sections": "./src/sections/index.ts",
31
31
  "./templates": "./src/templates/index.ts",
32
32
  "./templates/itineraries": "./src/templates/itineraries.ts",
33
+ "./templates/months": "./src/templates/months.ts",
33
34
  "./schema": "./src/schema/index.ts",
34
35
  "./neighborhoods": "./src/templates/neighborhoods.ts",
35
36
  "./llms": "./src/llms/index.ts",
@@ -39,7 +40,7 @@
39
40
  "peerDependencies": {
40
41
  "astro": "^7.0.6",
41
42
  "tailwindcss": "^4.1.18",
42
- "@sarimarcus/content-sites-core": "0.68.0",
43
- "@sarimarcus/content-sites-ui": "0.68.0"
43
+ "@sarimarcus/content-sites-core": "0.70.0",
44
+ "@sarimarcus/content-sites-ui": "0.70.0"
44
45
  }
45
46
  }
@@ -0,0 +1,28 @@
1
+ ---
2
+ import Mark from '../sections/Mark.astro';
3
+ import type { MonthStrip } from './tourismMonthGuideModel';
4
+
5
+ interface Props { strip: MonthStrip }
6
+ const { strip } = Astro.props;
7
+ const kinds = [...new Set(strip.items.flatMap((m) => (m.mark ? [m.mark] : [])))];
8
+ ---
9
+ <nav class="mg-strip" aria-label={strip.label}>
10
+ <ol role="list" class="hp-months">
11
+ {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>
13
+ ))}
14
+ </ol>
15
+ {kinds.length > 0 && strip.marks && (
16
+ <ul role="list" class="hp-key" aria-label={strip.keyLabel}>
17
+ {kinds.map((k) => <li><Mark kind={k} decorative />{strip.marks![k]}</li>)}
18
+ </ul>
19
+ )}
20
+ </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>
@@ -0,0 +1,25 @@
1
+ ---
2
+ /**
3
+ * Horizontally scrollable data table: a focusable labelled region, a screen-reader caption and
4
+ * a sticky row-header column. The caller slots <thead>/<tbody> and sets min-width via `class`;
5
+ * the rest props carry the caller's scoped-style attribute onto the table.
6
+ */
7
+ interface Props { caption: string; class?: string }
8
+ const { caption, class: cls, ...rest } = Astro.props;
9
+ ---
10
+ <div class="hp-scroll" role="region" aria-label={caption} tabindex="0">
11
+ <table class:list={['hp-scroll__table', cls]} {...rest}>
12
+ <caption class="sr-only">{caption}</caption>
13
+ <slot />
14
+ </table>
15
+ </div>
16
+
17
+ <style>
18
+ .hp-scroll { overflow-x: auto; border-radius: var(--radius); background: var(--card); }
19
+ .hp-scroll:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
20
+ .hp-scroll__table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9375rem; }
21
+ .hp-scroll__table :global(th), .hp-scroll__table :global(td) { padding: 0.75rem 1rem; text-align: left; border-bottom: var(--hp-rule); }
22
+ .hp-scroll__table :global(thead th) { font-weight: 600; font-size: 0.8125rem; color: var(--muted-foreground); border-bottom: 1px solid var(--foreground); }
23
+ .hp-scroll__table :global(tbody tr:last-child > *) { border-bottom: 0; }
24
+ .hp-scroll__table :global(th[scope="row"]) { font-weight: 400; position: sticky; left: 0; background: var(--card); }
25
+ </style>
@@ -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; }
@@ -0,0 +1,385 @@
1
+ ---
2
+ import { ResponsiveImage } from '@sarimarcus/content-sites-ui/primitives';
3
+ import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
4
+ import { Container } from '@sarimarcus/content-sites-ui/layout';
5
+ import Mark from '../sections/Mark.astro';
6
+ import MonthStripNav from './MonthStripNav.astro';
7
+ import ScrollTable from './ScrollTable.astro';
8
+ import type { TourismMonthGuideModel } from './tourismMonthGuideModel';
9
+
10
+ interface Props { model: TourismMonthGuideModel }
11
+ const { model } = Astro.props;
12
+ const { lead, months, weather, events, things, features, food, plan, verdict, faq } = model;
13
+ const tourLinks = plan.tours ? await Promise.all(plan.tours.items.map((t) => Astro.slots.render(t.slot))) : [];
14
+ const slotHtml = async (name: string) => (Astro.slots.has(name) ? (await Astro.slots.render(name)).trim() : '');
15
+ const [related, afterFaq] = await Promise.all(['related', 'after-faq'].map(slotHtml));
16
+ const showEntry = !!events?.rows.some((r) => r.entry);
17
+ const showPlace = !!events?.rows.some((r) => r.place);
18
+ const thingMarks = things.marks ?? months.marks;
19
+ ---
20
+
21
+ <main class="hp hp--thumbs mg">
22
+
23
+ <section class="hp-lead mg-lead" aria-labelledby="mg-h1" data-track-zone="hero">
24
+ <Container>
25
+ <div class="hp-lead__top">
26
+ <div>
27
+ <h1 id="mg-h1">{lead.heading}</h1>
28
+ <p class="hp-lead__stand">{lead.standfirst}</p>
29
+ <div class="mg-answer" set:html={lead.answer} />
30
+ {lead.facts.length > 0 && (
31
+ <dl class="mg-facts" aria-label={lead.factsLabel}>
32
+ {lead.facts.map((f) => <div><dt>{f.label}</dt><dd>{f.value}</dd></div>)}
33
+ </dl>
34
+ )}
35
+ <p class="hp-meta mg-byline">{lead.byline.byLabel} <a href={lead.byline.author.href}>{lead.byline.author.label}</a> · {lead.byline.updatedLabel} <time datetime={lead.byline.updated.datetime}>{lead.byline.updated.label}</time></p>
36
+ </div>
37
+ <figure class="hp-lead__photo">
38
+ <div>
39
+ <ResponsiveImage src={lead.photo.image} alt={lead.photo.alt} sizes="(min-width: 72rem) 760px, (min-width: 52rem) 64vw, 112vw" loading="eager" fetchpriority="high" />
40
+ </div>
41
+ {lead.photo.caption && <figcaption>{lead.photo.caption}</figcaption>}
42
+ </figure>
43
+ </div>
44
+ <MonthStripNav strip={months} />
45
+ {lead.jump.length > 0 && (
46
+ <>
47
+ <p class="hp-lead__links mg-links">{lead.jump.map((g) => <a href={g.href}>{g.label}</a>)}</p>
48
+ <nav class="hp-jump" aria-label={lead.jumpLabel}>
49
+ <ul role="list">
50
+ {lead.jump.map((g) => <li><a href={g.href}>{g.label}</a></li>)}
51
+ </ul>
52
+ </nav>
53
+ </>
54
+ )}
55
+ </Container>
56
+ </section><slot name="after-lead" />
57
+
58
+ <section class="hp-band hp-band--muted" id="weather" aria-labelledby="weather-h" data-track-zone="weather">
59
+ <Container>
60
+ <div class="hp-head">
61
+ <h2 id="weather-h">{weather.heading}</h2>
62
+ {weather.intro && <p>{weather.intro}</p>}
63
+ </div>
64
+ <ScrollTable caption={weather.table.caption} class="mg-clim">
65
+ <thead>
66
+ <tr>{weather.table.columns.map((c, i) => <th scope="col" class:list={[{ 'mg-num': i > 0 }]}>{c}</th>)}</tr>
67
+ </thead>
68
+ <tbody>
69
+ {weather.table.rows.map((r) => (
70
+ <tr class:list={[{ 'is-current': r.current }]}>
71
+ <th scope="row">{r.href && !r.current ? <a href={r.href}>{r.label}</a> : r.label}</th>
72
+ {r.cells.map((c) => <td class="mg-num">{c}</td>)}
73
+ </tr>
74
+ ))}
75
+ </tbody>
76
+ </ScrollTable>
77
+ {weather.table.source && <p class="hp-meta mg-source" set:html={weather.table.source} />}
78
+ {weather.periods && weather.periods.length > 0 && (
79
+ <div class="mg-periods">
80
+ {weather.periods.map((p) => (
81
+ <div>
82
+ <h3>{p.period}</h3>
83
+ <p class="hp-meta">{p.range} · {p.facts}</p>
84
+ <p>{p.text}</p>
85
+ </div>
86
+ ))}
87
+ </div>
88
+ )}
89
+ {weather.tip && <p class="mg-tip" set:html={weather.tip} />}
90
+ </Container>
91
+ </section>
92
+ {events && events.rows.length > 0 && (
93
+ <section class="hp-band" id="events" aria-labelledby="events-h" data-track-zone="events">
94
+ <Container>
95
+ <div class="hp-head">
96
+ <h2 id="events-h">{events.heading}</h2>
97
+ {events.intro && <p>{events.intro}</p>}
98
+ </div>
99
+ <table class="hp-cal mg-cal" style={`--mg-entry-label: ${JSON.stringify(`${events.columns.entry}: `)}`}>
100
+ <caption class="sr-only">{events.caption}</caption>
101
+ <thead>
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
+ </thead>
104
+ <tbody>
105
+ {events.rows.map((r) => (
106
+ <tr>
107
+ <td class="hp-when">{r.when}</td>
108
+ <th scope="row">
109
+ <div class="hp-cal__ev">
110
+ <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>
112
+ </div>
113
+ </th>
114
+ {showPlace && <td class="hp-where">{r.place}</td>}
115
+ {showEntry && <td class="hp-entry">{r.entry}</td>}
116
+ </tr>
117
+ ))}
118
+ </tbody>
119
+ </table>
120
+ {events.more && <a class="hp-more" href={events.more.href}>{events.more.label}</a>}
121
+ </Container>
122
+ </section>
123
+ )}
124
+ <section class="hp-band" id="things-to-do" aria-labelledby="things-h" data-track-zone="things-to-do">
125
+ <Container>
126
+ <div class="hp-head">
127
+ <h2 id="things-h">{things.heading}</h2>
128
+ {things.intro && <p>{things.intro}</p>}
129
+ </div>
130
+ <ol role="list" class="hp-rank mg-things">
131
+ {things.items.map((t, i) => (
132
+ <li>
133
+ <span class="hp-rank__n" aria-hidden="true">{i + 1}</span>
134
+ {t.mark && <Mark kind={t.mark} label={thingMarks?.[t.mark]} />}
135
+ <span class="hp-rank__thumb">{t.image && <ResponsiveImage src={t.image} alt="" sizes="152px" loading="lazy" />}</span>
136
+ <div class="hp-rank__body">
137
+ <h3>{t.href ? <a href={t.href}>{t.title}</a> : t.title}</h3>
138
+ <p class="hp-rank__why" set:html={t.text} />
139
+ </div>
140
+ </li>
141
+ ))}
142
+ </ol>
143
+ </Container>
144
+ </section>
145
+ {features?.map((f) => (
146
+ <section class="hp-band" id={f.id} aria-labelledby={`${f.id}-h`} data-track-zone={f.trackZone ?? f.id}>
147
+ <Container>
148
+ <div class="hp-head">
149
+ <h2 id={`${f.id}-h`}>{f.heading}</h2>
150
+ {f.intro && <p>{f.intro}</p>}
151
+ </div>
152
+ <div class:list={['mg-feature', { 'mg-feature--img': f.image }]}>
153
+ {f.image && <figure class="mg-feature__fig"><div><ResponsiveImage src={f.image} alt={f.imageAlt ?? ''} sizes="(min-width: 52rem) 400px, 100vw" loading="lazy" /></div></figure>}
154
+ <div class="mg-prose" set:html={f.html} />
155
+ </div>
156
+ </Container>
157
+ </section>
158
+ ))}
159
+ {food && (
160
+ <section class="hp-band hp-band--inverse" id="food" aria-labelledby="food-h" data-track-zone="food-drink">
161
+ <Container>
162
+ <div class:list={['hp-food', { 'mg-food--solo': !food.figure }]}>
163
+ {food.figure && (
164
+ <figure class="hp-food__fig">
165
+ <div><ResponsiveImage src={food.figure.image} alt={food.figure.alt} sizes="(min-width: 52rem) 640px, 141vw" loading="lazy" /></div>
166
+ <figcaption class="hp-soft">{food.figure.href ? <a href={food.figure.href}>{food.figure.caption}</a> : food.figure.caption}</figcaption>
167
+ </figure>
168
+ )}
169
+ <div>
170
+ <div class="hp-head">
171
+ <h2 id="food-h">{food.heading}</h2>
172
+ {food.intro && <p>{food.intro}</p>}
173
+ </div>
174
+ {food.dishes.length > 0 && (
175
+ <CardCarousel staticFrom="sm" ariaLabel={food.carouselAriaLabel} trackClass="hp-dishes hp-swipe">
176
+ {food.dishes.map((d) => (
177
+ <div>
178
+ <div class="hp-img hp-m-only">{d.image && <ResponsiveImage src={d.image} alt="" sizes="(min-width: 40rem) 224px, 82vw" loading="lazy" />}</div>
179
+ {d.href ? <a href={d.href}>{d.name}</a> : <span class="mg-dish">{d.name}</span>}<p class="hp-soft">{d.line}</p>
180
+ </div>
181
+ ))}
182
+ </CardCarousel>
183
+ )}
184
+ {food.more && <a class="hp-more" href={food.more.href}>{food.more.label}</a>}
185
+ {food.wheres && (
186
+ <div class="hp-wheres">
187
+ <h3>{food.wheres.heading}</h3>
188
+ <ul>
189
+ {food.wheres.items.map((html, i) => <>{i > 0 && ' '}<li set:html={html} /></>)}
190
+ </ul>
191
+ </div>
192
+ )}
193
+ {food.tips && food.tips.length > 0 && (
194
+ <ul class="mg-ticks mg-food-tips">
195
+ {food.tips.map((html) => <li set:html={html} />)}
196
+ </ul>
197
+ )}
198
+ </div>
199
+ </div>
200
+ </Container>
201
+ </section>
202
+ )}
203
+ <section class="hp-band" id="plan" aria-labelledby="plan-h" data-track-zone="plan-your-visit">
204
+ <Container>
205
+ <div class="hp-head">
206
+ <h2 id="plan-h">{plan.heading}</h2>
207
+ </div>
208
+ <div class="hp-plan">
209
+ <div class="hp-plan__main">
210
+ {plan.crowds && (
211
+ <div>
212
+ <h3>{plan.crowds.heading}</h3>
213
+ <div class="mg-crowds">
214
+ {[plan.crowds.low, plan.crowds.high].filter((b) => !!b).map((b) => (
215
+ <div>
216
+ <p class="mg-crowds__label">{b.label} <span class="hp-meta">{b.range}</span></p>
217
+ <ul class="mg-ticks">{b.items.map((html) => <li set:html={html} />)}</ul>
218
+ </div>
219
+ ))}
220
+ </div>
221
+ </div>
222
+ )}
223
+ {plan.packing && (
224
+ <div>
225
+ <h3>{plan.packing.heading}</h3>
226
+ {plan.packing.intro && <p class="mg-lede">{plan.packing.intro}</p>}
227
+ <ul class="mg-ticks mg-cols">{plan.packing.items.map((html) => <li set:html={html} />)}</ul>
228
+ {plan.packing.more && <a class="hp-more" href={plan.packing.more.href}>{plan.packing.more.label}</a>}
229
+ </div>
230
+ )}
231
+ {plan.tips && (
232
+ <div>
233
+ <h3>{plan.tips.heading}</h3>
234
+ <dl class="mg-tips">
235
+ {plan.tips.items.map((t) => <div><dt>{t.title}</dt><dd set:html={t.body} /></div>)}
236
+ </dl>
237
+ </div>
238
+ )}
239
+ </div>
240
+ {plan.tours && plan.tours.items.length > 0 && (
241
+ <aside class="hp-tours" aria-labelledby="tours-h" data-track-zone="activities">
242
+ <h3 id="tours-h">{plan.tours.heading}</h3>
243
+ <slot name="tour-disclosure" />
244
+ <CardCarousel staticFrom="base" ariaLabel={plan.tours.heading} trackClass="mg-tours">
245
+ {plan.tours.items.map((t, i) => (
246
+ <div>
247
+ <Fragment set:html={tourLinks[i]} />
248
+ <span class="hp-meta">{t.meta}</span>
249
+ </div>
250
+ ))}
251
+ </CardCarousel>
252
+ {plan.tours.more && <a class="hp-more" href={plan.tours.more.href}>{plan.tours.more.label}</a>}
253
+ </aside>
254
+ )}
255
+ </div>
256
+ </Container>
257
+ </section>
258
+ {verdict && (
259
+ <section class="hp-band" id="verdict" aria-labelledby="verdict-h" data-track-zone="verdict">
260
+ <Container>
261
+ <div class="hp-head">
262
+ <h2 id="verdict-h">{verdict.heading}</h2>
263
+ </div>
264
+ <div class="mg-verdict">
265
+ <div class="mg-verdict__go">
266
+ <h3>{verdict.go.heading}</h3>
267
+ <ul class="mg-ticks">{verdict.go.items.map((html) => <li set:html={html} />)}</ul>
268
+ </div>
269
+ <div class="mg-verdict__skip">
270
+ <h3>{verdict.skip.heading}</h3>
271
+ <ul class="mg-ticks">{verdict.skip.items.map((html) => <li set:html={html} />)}</ul>
272
+ </div>
273
+ </div>
274
+ </Container>
275
+ </section>
276
+ )}{faq && faq.items.length > 0 && (
277
+ <section class="hp-band hp-band--muted" id="faq" aria-labelledby="qa-h" data-track-zone="faq">
278
+ <Container>
279
+ <div class="hp-head">
280
+ <h2 id="qa-h">{faq.heading}</h2>
281
+ </div>
282
+ <dl class="hp-qa">
283
+ {faq.items.map((q) => (
284
+ <div>
285
+ <dt>{q.question}</dt>
286
+ <dd set:html={q.answer} />
287
+ </div>
288
+ ))}
289
+ </dl>
290
+ </Container>
291
+ </section>
292
+ )}{related && <section class="hp-band hp-embed" data-track-zone="related"><Container><Fragment set:html={related} /></Container></section>}{afterFaq && <section class="hp-band hp-embed" data-track-zone="sources"><Container><Fragment set:html={afterFaq} /></Container></section>}
293
+ <nav class="hp-band mg-adj" aria-label={months.adjacentLabel} data-track-zone="adjacent-months">
294
+ <Container>
295
+ <ul role="list">
296
+ <li><span class="hp-meta">{months.prev.kicker}</span><a class="hp-quiet" href={months.prev.href} rel="prev">{months.prev.label}</a></li>
297
+ <li><span class="hp-meta">{months.next.kicker}</span><a class="hp-quiet" href={months.next.href} rel="next">{months.next.label}</a></li>
298
+ </ul>
299
+ </Container>
300
+ </nav>
301
+ </main>
302
+
303
+ <style>
304
+ .hp.mg .mg-lead { padding-top: clamp(2rem, 5vw, 3.5rem); }
305
+ .hp.mg .mg-lead .hp-lead__top { align-items: start; }
306
+ .hp .mg-answer { margin-top: 1rem; max-width: 36rem; }
307
+ .hp .mg-answer :global(p + p) { margin-top: 0.75rem; }
308
+ .hp .mg-facts { margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem 1.5rem; padding-block: 1rem; border-block: var(--hp-rule); }
309
+ .hp .mg-facts div { display: grid; gap: 0.125rem; min-width: 0; }
310
+ .hp .mg-facts dt { font-size: 0.8125rem; color: var(--muted-foreground); }
311
+ .hp .mg-facts dd { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
312
+ .hp .mg-byline { margin-top: 1.25rem; }
313
+ .hp .mg-links { margin-top: 1.25rem; }
314
+
315
+ .hp .mg-clim { min-width: 34rem; }
316
+ .hp .mg-clim th, .hp .mg-clim td { white-space: nowrap; }
317
+ .hp .mg-clim .mg-num { text-align: right; font-variant-numeric: tabular-nums; }
318
+ .hp .mg-clim tr.is-current > * { background: color-mix(in oklch, var(--primary) 9%, var(--card)); font-weight: 600; }
319
+ .hp .mg-source { margin-top: 0.75rem; }
320
+ .hp .mg-periods { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.75rem 3rem; }
321
+ .hp .mg-periods > div { display: grid; gap: 0.375rem; align-content: start; padding-top: 1rem; border-top: 1px solid var(--foreground); }
322
+ .hp .mg-tip { margin-top: 2rem; max-width: 42rem; padding-left: 1rem; border-left: 2px solid var(--primary-strong); }
323
+
324
+ .hp .mg-cal td.hp-entry::before { content: none; }
325
+ .hp .mg-cal td.hp-when { white-space: normal; }
326
+ .hp .mg-cal .hp-cal__thumb:empty { visibility: hidden; }
327
+ .hp .mg-evname { font-family: var(--font-display); font-size: 1.125rem; }
328
+ .hp .mg-note { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
329
+
330
+ .hp .mg-things .hp-rank__why { max-width: 44rem; }
331
+
332
+ .hp .mg-feature { display: grid; gap: 2rem; }
333
+ .hp .mg-feature__fig { margin: 0; }
334
+ .hp .mg-feature__fig div { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--muted); }
335
+ .hp .mg-prose { max-width: 42rem; }
336
+ .hp .mg-prose :global(:is(p, ul, ol, h3) + :is(p, ul, ol, h3)) { margin-top: 1rem; }
337
+ .hp .mg-prose :global(ul) { list-style: disc; padding-left: 1.25rem; }
338
+ .hp .mg-prose :global(ol) { list-style: decimal; padding-left: 1.25rem; }
339
+ .hp .mg-prose :global(li + li) { margin-top: 0.375rem; }
340
+
341
+ .hp .mg-ticks > li { position: relative; padding-left: 1.25rem; }
342
+ .hp .mg-ticks > li + li { margin-top: 0.5rem; }
343
+ .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
+ .hp .hp-band--inverse .mg-ticks > li::before { background: var(--accent); }
345
+ .hp .mg-food-tips { margin-top: 2rem; font-size: 0.9375rem; }
346
+ .hp .hp-dishes .mg-dish { font-family: var(--font-display); font-size: 1.1875rem; }
347
+ .hp .mg-food--solo { grid-template-columns: minmax(0, 1fr); }
348
+
349
+ .hp .mg-crowds { display: grid; gap: 1.75rem 2.5rem; }
350
+ .hp .mg-crowds__label { font-family: var(--font-display); font-size: 1.125rem; margin-bottom: 0.625rem; }
351
+ .hp .mg-crowds__label .hp-meta { font-family: var(--font-body); margin-left: 0.375rem; }
352
+ .hp .mg-lede { margin-bottom: 1rem; color: var(--muted-foreground); max-width: 40rem; }
353
+ .hp .mg-cols { display: grid; gap: 0.5rem 2rem; }
354
+ .hp .mg-cols > li + li { margin-top: 0; }
355
+ .hp .mg-tips { display: grid; gap: 1.25rem; margin: 0; }
356
+ .hp .mg-tips dt { font-weight: 600; }
357
+ .hp .mg-tips dd { margin: 0.25rem 0 0; color: var(--muted-foreground); max-width: 40rem; }
358
+ .hp :global(.mg-tours) > div { padding-block: 0.75rem; border-top: var(--hp-rule); display: grid; gap: 0.125rem; }
359
+ .hp :global(.mg-tours a) { font-weight: 600; }
360
+
361
+ .hp .mg-verdict { display: grid; gap: 1.5rem; }
362
+ .hp .mg-verdict > div { padding: 1.5rem; border-radius: calc(var(--radius) * 1.5); border: var(--hp-rule); background: var(--card); }
363
+ .hp .mg-verdict h3 { margin-bottom: 1rem; }
364
+ .hp .mg-verdict > .mg-verdict__go { border-top: 3px solid var(--primary-strong); }
365
+ .hp .mg-verdict__skip .mg-ticks > li::before { background: var(--muted-foreground); }
366
+
367
+ .hp .mg-adj ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
368
+ .hp .mg-adj li { display: grid; gap: 0.25rem; padding-top: 1rem; border-top: 1px solid var(--foreground); }
369
+ .hp .mg-adj li:last-child { text-align: right; }
370
+ .hp .mg-adj a { font-family: var(--font-display); font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); line-height: 1.2; }
371
+
372
+ @media (min-width: 40rem) {
373
+ .hp .mg-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
374
+ .hp .mg-periods, .hp .mg-crowds, .hp .mg-verdict, .hp .mg-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
375
+ }
376
+ @media (max-width: 39.99rem) {
377
+ .hp .mg-cal td.hp-entry::before { content: var(--mg-entry-label); color: var(--muted-foreground); }
378
+ .hp .mg-cal td:is(.hp-entry, .hp-where):empty { display: none; }
379
+ }
380
+ @media (min-width: 52rem) {
381
+ .hp .mg-things > li { grid-template-columns: 2.5rem 2.5rem 6rem minmax(0, 1fr); }
382
+ .hp .mg-feature--img { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
383
+ .hp .mg-feature__fig { position: sticky; top: 6rem; }
384
+ }
385
+ </style>
@@ -0,0 +1,128 @@
1
+ ---
2
+ import { ResponsiveImage } from '@sarimarcus/content-sites-ui/primitives';
3
+ import { Container } from '@sarimarcus/content-sites-ui/layout';
4
+ import Mark from '../sections/Mark.astro';
5
+ import MonthStripNav from './MonthStripNav.astro';
6
+ import ScrollTable from './ScrollTable.astro';
7
+ import type { TourismMonthsIndexModel } from './tourismMonthGuideModel';
8
+
9
+ interface Props { model: TourismMonthsIndexModel }
10
+ const { model } = Astro.props;
11
+ const { lead, months, table, seasons, faq } = model;
12
+ const slotHtml = async (name: string) => (Astro.slots.has(name) ? (await Astro.slots.render(name)).trim() : '');
13
+ const afterFaq = await slotHtml('after-faq');
14
+ ---
15
+
16
+ <main class="hp hp--thumbs mg mi">
17
+
18
+ <section class="hp-lead mg-lead" aria-labelledby="mi-h1" data-track-zone="hero">
19
+ <Container>
20
+ <div class:list={['hp-lead__top', { 'mi-solo': !lead.photo }]}>
21
+ <div>
22
+ <h1 id="mi-h1">{lead.heading}</h1>
23
+ <p class="hp-lead__stand">{lead.standfirst}</p>
24
+ {lead.answer && <div class="mi-answer" set:html={lead.answer} />}
25
+ {lead.byline && <p class="hp-meta mi-byline">{lead.byline.byLabel} <a href={lead.byline.author.href}>{lead.byline.author.label}</a> · {lead.byline.updatedLabel} <time datetime={lead.byline.updated.datetime}>{lead.byline.updated.label}</time></p>}
26
+ </div>
27
+ {lead.photo && (
28
+ <figure class="hp-lead__photo">
29
+ <div>
30
+ <ResponsiveImage src={lead.photo.image} alt={lead.photo.alt} sizes="(min-width: 72rem) 760px, (min-width: 52rem) 64vw, 112vw" loading="eager" fetchpriority="high" />
31
+ </div>
32
+ {lead.photo.caption && <figcaption>{lead.photo.caption}</figcaption>}
33
+ </figure>
34
+ )}
35
+ </div>
36
+ <MonthStripNav strip={months} />
37
+ </Container>
38
+ </section><slot name="after-lead" />
39
+
40
+ <section class="hp-band hp-band--muted" id="by-month" aria-labelledby="table-h" data-track-zone="months-table">
41
+ <Container>
42
+ <div class="hp-head">
43
+ <h2 id="table-h">{table.heading}</h2>
44
+ {table.intro && <p>{table.intro}</p>}
45
+ </div>
46
+ <ScrollTable caption={table.caption} class="mi-table">
47
+ <thead>
48
+ <tr>{table.columns.map((c, i) => <th scope="col" class:list={[{ 'mi-num': i > 0 }]}>{c}</th>)}<th scope="col">{table.bestForLabel}</th></tr>
49
+ </thead>
50
+ <tbody>
51
+ {table.rows.map((r) => (
52
+ <tr class:list={[{ 'is-peak': r.peak }]}>
53
+ <th scope="row"><a href={r.href}>{r.label}</a>{r.mark && <Mark kind={r.mark} label={months.marks?.[r.mark]} />}</th>
54
+ {r.cells.map((c) => <td class="mi-num">{c}</td>)}
55
+ <td class="mi-best">{r.bestFor}</td>
56
+ </tr>
57
+ ))}
58
+ </tbody>
59
+ </ScrollTable>
60
+ {table.source && <p class="hp-meta mi-source" set:html={table.source} />}
61
+ </Container>
62
+ </section><slot name="after-table" />
63
+ {seasons && seasons.items.length > 0 && (
64
+ <section class="hp-band" id="seasons" aria-labelledby="seasons-h" data-track-zone="seasons">
65
+ <Container>
66
+ <div class="hp-head">
67
+ <h2 id="seasons-h">{seasons.heading}</h2>
68
+ {seasons.intro && <p>{seasons.intro}</p>}
69
+ </div>
70
+ <ul role="list" class="mi-seasons">
71
+ {seasons.items.map((s) => (
72
+ <li>
73
+ {s.image && <div class="mi-seasons__img"><ResponsiveImage src={s.image} alt="" sizes="(min-width: 52rem) 260px, (min-width: 40rem) 45vw, 100vw" loading="lazy" /></div>}
74
+ <h3><a class="hp-quiet" href={s.href}>{s.title}</a></h3>
75
+ <p>{s.text}</p>
76
+ </li>
77
+ ))}
78
+ </ul>
79
+ </Container>
80
+ </section>
81
+ )}{faq && faq.items.length > 0 && (
82
+ <section class="hp-band hp-band--muted" id="faq" aria-labelledby="qa-h" data-track-zone="faq">
83
+ <Container>
84
+ <div class="hp-head">
85
+ <h2 id="qa-h">{faq.heading}</h2>
86
+ </div>
87
+ <dl class="hp-qa">
88
+ {faq.items.map((q) => (
89
+ <div>
90
+ <dt>{q.question}</dt>
91
+ <dd set:html={q.answer} />
92
+ </div>
93
+ ))}
94
+ </dl>
95
+ </Container>
96
+ </section>
97
+ )}{afterFaq && <section class="hp-band hp-embed" data-track-zone="sources"><Container><Fragment set:html={afterFaq} /></Container></section>}
98
+ </main>
99
+
100
+ <style>
101
+ .hp.mi .mg-lead { padding-top: clamp(2rem, 5vw, 3.5rem); }
102
+ .hp .mi-answer { margin-top: 1rem; max-width: 36rem; }
103
+ .hp .mi-answer :global(p + p) { margin-top: 0.75rem; }
104
+ .hp .mi-byline { margin-top: 1.25rem; }
105
+
106
+ .hp .mi-table { min-width: 44rem; }
107
+ .hp .mi-table th, .hp .mi-table td { vertical-align: top; }
108
+ .hp .mi-table thead th, .hp .mi-table th[scope="row"] { white-space: nowrap; }
109
+ .hp .mi-table th[scope="row"] a { font-family: var(--font-display); font-size: 1.125rem; }
110
+ .hp .mi-table th[scope="row"] :global(.hp-mark) { margin-left: 0.5rem; vertical-align: 0.05em; }
111
+ .hp .mi-table tr.is-peak > * { background: color-mix(in oklch, var(--primary) 9%, var(--card)); }
112
+ .hp .mi-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
113
+ .hp .mi-best { min-width: 14rem; color: var(--muted-foreground); }
114
+ .hp .mi-source { margin-top: 0.75rem; }
115
+
116
+ .hp .mi-seasons { display: grid; gap: 2rem; }
117
+ .hp .mi-seasons li { display: grid; gap: 0.375rem; align-content: start; }
118
+ .hp .mi-seasons__img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--muted); margin-bottom: 0.5rem; }
119
+ .hp .mi-seasons p { color: var(--muted-foreground); font-size: 0.9375rem; }
120
+
121
+ @media (min-width: 40rem) {
122
+ .hp .mi-seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
123
+ }
124
+ @media (min-width: 52rem) {
125
+ .hp .mi-solo { grid-template-columns: minmax(0, 1fr); }
126
+ .hp .mi-seasons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
127
+ }
128
+ </style>
@@ -0,0 +1,17 @@
1
+ export { default as TourismMonthGuide } from './TourismMonthGuide.astro';
2
+ export { default as TourismMonthsIndex } from './TourismMonthsIndex.astro';
3
+ export type {
4
+ TourismMonthGuideModel,
5
+ TourismMonthsIndexModel,
6
+ MonthFact,
7
+ MonthByline,
8
+ MonthStrip,
9
+ MonthClimateRow,
10
+ MonthClimateTable,
11
+ MonthPeriod,
12
+ MonthEventRow,
13
+ MonthThing,
14
+ MonthFeature,
15
+ MonthCrowdBlock,
16
+ MonthIndexRow,
17
+ } from './tourismMonthGuideModel';
@@ -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
  }
@@ -0,0 +1,97 @@
1
+ import type { ImageMetadata } from 'astro';
2
+ import type { HomeHead, HomeLink, HomeMonth, HomeDish } from './tourismHomeModel';
3
+ import type { MarkKind, MarkLabels } from '../sections/marks';
4
+
5
+ export interface MonthFact { label: string; value: string }
6
+
7
+ export interface MonthByline {
8
+ author: HomeLink;
9
+ byLabel: string;
10
+ updatedLabel: string;
11
+ updated: { datetime: string; label: string };
12
+ }
13
+
14
+ /** The month strip. `current` marks the page's own month (rendered with aria-current). */
15
+ export interface MonthStrip {
16
+ label: string;
17
+ items: (HomeMonth & { current?: boolean })[];
18
+ marks?: MarkLabels;
19
+ keyLabel?: string;
20
+ }
21
+
22
+ /** One climate table row. Values arrive formatted ("18°C", "8 days"); the template never computes. */
23
+ export interface MonthClimateRow { label: string; href?: string; current?: boolean; cells: string[] }
24
+
25
+ export interface MonthClimateTable {
26
+ caption: string;
27
+ /** First entry heads the row-label column. */
28
+ columns: string[];
29
+ rows: MonthClimateRow[];
30
+ /** HTML. Source line under the table. */
31
+ source?: string;
32
+ }
33
+
34
+ export interface MonthPeriod { period: string; range: string; facts: string; text: string }
35
+
36
+ export interface MonthEventRow { when: string; name: string; href?: string; image?: ImageMetadata; place?: string; entry?: string; note?: string }
37
+
38
+ export interface MonthThing { title: string; href?: string; text: string; image?: ImageMetadata; mark?: MarkKind }
39
+
40
+ /** A city-specific section (carnival, skiing, sea). Body is trusted HTML. */
41
+ export interface MonthFeature { id: string; heading: string; intro?: string; html: string; image?: ImageMetadata; imageAlt?: string; trackZone?: string }
42
+
43
+ export interface MonthCrowdBlock { label: string; range: string; items: string[] }
44
+
45
+ /** Optional sections render nothing when omitted. Named slots: any `{ slot }` in `plan.tours.items`, `tour-disclosure`, `after-lead`, `after-faq` (sources), `related`. */
46
+ export interface TourismMonthGuideModel {
47
+ lead: {
48
+ heading: string;
49
+ standfirst: string;
50
+ /** HTML. The 2–3 sentence direct answer. */
51
+ answer: string;
52
+ facts: MonthFact[];
53
+ factsLabel: string;
54
+ photo: { image: ImageMetadata; alt: string; caption?: string };
55
+ byline: MonthByline;
56
+ jumpLabel: string;
57
+ jump: HomeLink[];
58
+ };
59
+ /** `prev`/`next` render at the foot of the page; `kicker` is the small line above each ("Previous month"). */
60
+ months: MonthStrip & { prev: HomeLink & { kicker: string }; next: HomeLink & { kicker: string }; adjacentLabel: string };
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 };
63
+ things: HomeHead & { items: MonthThing[]; marks?: MarkLabels };
64
+ features?: MonthFeature[];
65
+ food?: HomeHead & {
66
+ /** A dish without its own page omits `href` and renders unlinked. */
67
+ dishes: (Omit<HomeDish, 'href'> & { href?: string })[];
68
+ carouselAriaLabel: string;
69
+ more?: HomeLink;
70
+ figure?: { image: ImageMetadata; alt: string; caption: string; href?: string };
71
+ /** Each item HTML. */
72
+ wheres?: { heading: string; items: string[] };
73
+ tips?: string[];
74
+ };
75
+ plan: {
76
+ heading: string;
77
+ crowds?: { heading: string; low: MonthCrowdBlock; high?: MonthCrowdBlock };
78
+ /** Each item HTML. */
79
+ packing?: { heading: string; intro?: string; items: string[]; more?: HomeLink };
80
+ tips?: { heading: string; items: { title: string; body: string }[] };
81
+ /** Each named slot contains the site's affiliate link. */
82
+ tours?: { heading: string; items: { slot: string; meta: string }[]; more?: HomeLink };
83
+ };
84
+ verdict?: { heading: string; go: { heading: string; items: string[] }; skip: { heading: string; items: string[] } };
85
+ faq?: { heading: string; items: { question: string; /** HTML. */ answer: string }[] };
86
+ }
87
+
88
+ export interface MonthIndexRow { label: string; href: string; mark?: MarkKind; peak?: boolean; cells: string[]; bestFor: string }
89
+
90
+ /** Named slots: `after-lead`, `after-table`, `after-faq` (sources). */
91
+ export interface TourismMonthsIndexModel {
92
+ lead: { heading: string; standfirst: string; /** HTML. */ answer?: string; photo?: { image: ImageMetadata; alt: string; caption?: string }; byline?: MonthByline };
93
+ months: MonthStrip;
94
+ table: HomeHead & { caption: string; columns: string[]; bestForLabel: string; rows: MonthIndexRow[]; /** HTML. */ source?: string };
95
+ seasons?: HomeHead & { items: { title: string; href: string; text: string; image?: ImageMetadata }[] };
96
+ faq?: { heading: string; items: { question: string; /** HTML. */ answer: string }[] };
97
+ }