@sarimarcus/content-sites-tourism 0.51.2 → 0.52.1

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.52.1 (2026-10-28)
6
+
7
+ - Fixed a layout shift on the neighbourhood hub page: the filter chip bar now keeps its space (`invisible`) until `hubFilter` reveals it, instead of starting `hidden` and pushing the list down about 80 px when the script ran (CLS 0.045 to 0). Without JavaScript the bar stays invisible and its space stays reserved (SLA-3566).
8
+
9
+ ## 0.52.0 (2026-10-27)
10
+
11
+ - Added `TourismHomePage` (`@sarimarcus/content-sites-tourism/templates`): the tourism home page rendered from a resolved `TourismHomeModel`, with the `top-experiences`, `booking` and ticket slots; model helpers (`formatSpan`, `eventName`, `eventPlace`, `eventEntry`, `selectHomeEvents`, `handLinkedHrefs`, `countWord`); the `./home.css` stylesheet export, which the route imports; and the `Mark` section with `MARK_LABELS` (SLA-3517).
12
+
5
13
  ## 0.51.2 (2026-10-27)
6
14
 
7
15
  - Lockstep release, no change (SLA-3537).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.51.2",
3
+ "version": "0.52.1",
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",
@@ -32,12 +32,13 @@
32
32
  "./schema": "./src/schema/index.ts",
33
33
  "./neighborhoods": "./src/templates/neighborhoods.ts",
34
34
  "./llms": "./src/llms/index.ts",
35
- "./tailwind.css": "./src/tailwind.css"
35
+ "./tailwind.css": "./src/tailwind.css",
36
+ "./home.css": "./src/templates/home.css"
36
37
  },
37
38
  "peerDependencies": {
38
39
  "astro": "^7.0.6",
39
40
  "tailwindcss": "^4.1.18",
40
- "@sarimarcus/content-sites-core": "0.51.2",
41
- "@sarimarcus/content-sites-ui": "0.51.2"
41
+ "@sarimarcus/content-sites-core": "0.52.1",
42
+ "@sarimarcus/content-sites-ui": "0.52.1"
42
43
  }
43
44
  }
@@ -2,6 +2,10 @@
2
2
  // reader-visible text itself (validate-packages refuses it); it reads a prop whose default is here.
3
3
  export const LABELS = {
4
4
  articleCardGrid: { readLabel: 'Read', updatedLabel: 'Updated' },
5
+ tourismHomePage: {
6
+ marks: { trip: 'Worth the trip', detour: 'Worth a detour', season: 'In season' },
7
+ separator: ' · ',
8
+ },
5
9
  homeTripPlanner: { eyebrow: 'Build your trip', heading: 'What shape is your visit taking?' },
6
10
  itineraryTeaser: { badgeLabel: 'Suggested itinerary' },
7
11
  rankedListingRow: { ctaLabel: 'Read more', ratingSuffix: 'out of 5' },
@@ -0,0 +1,19 @@
1
+ ---
2
+ /**
3
+ * Mark — the home page's ranking glyph: two diamonds (worth the trip), one (worth a detour) or a dot (in season).
4
+ * `label` names it for assistive tech; in the key the label sits beside the glyph, so the glyph is `decorative`.
5
+ */
6
+ import { Icon } from '@sarimarcus/content-sites-ui/primitives';
7
+ import { LABELS } from '../internal/labels';
8
+ import type { MarkKind } from './marks';
9
+
10
+ interface Props {
11
+ kind: MarkKind;
12
+ decorative?: boolean;
13
+ label?: string;
14
+ }
15
+
16
+ const { kind, decorative = false, label = LABELS.tourismHomePage.marks[kind] } = Astro.props;
17
+ const glyphs = kind === 'trip' ? ['diamond', 'diamond'] : kind === 'detour' ? ['diamond'] : ['circle-dot'];
18
+ ---
19
+ <span class={`hp-mark hp-mark--${kind}`} aria-hidden={decorative ? 'true' : undefined} role={decorative ? undefined : 'img'} aria-label={decorative ? undefined : label}>{glyphs.map((name) => <Icon name={name} filled={name === 'diamond'} strokeWidth={2} class="" />)}</span>
@@ -37,3 +37,6 @@ export type {
37
37
  export { navMonths, upcomingEventLinks } from './tourismNavigation.ts';
38
38
  export type { TourismNavigationProps, TourismNavHubLink, TourismNavMonth, TourismNavDuration } from './tourismNavigation.ts';
39
39
  export type { RelatedBlockCard, RelatedBlockDeps } from './relatedBlock.ts';
40
+ export { default as Mark } from './Mark.astro';
41
+ export { MARK_LABELS } from './marks.ts';
42
+ export type { MarkKind, MarkLabels } from './marks.ts';
@@ -0,0 +1,7 @@
1
+ import { LABELS } from '../internal/labels';
2
+
3
+ export type MarkKind = 'trip' | 'detour' | 'season';
4
+
5
+ export type MarkLabels = Record<MarkKind, string>;
6
+
7
+ export const MARK_LABELS: MarkLabels = LABELS.tourismHomePage.marks;
@@ -38,7 +38,7 @@ const status = countText(statusTemplate, total, total);
38
38
  <p class="mt-3 max-w-deck text-lg text-muted-foreground">{standfirst}</p>
39
39
  </header>
40
40
  {filters.length > 0 && (
41
- <div data-hub-filters hidden role="group" aria-label={filterAriaLabel} class="mt-5 flex gap-2 overflow-x-auto pb-1">
41
+ <div data-hub-filters role="group" aria-label={filterAriaLabel} class="invisible mt-5 flex gap-2 overflow-x-auto pb-1">
42
42
  <Chip as="button" type="button" size="md" active={true} hover={false} data-hub-filter="" aria-pressed="true">{allLabel}</Chip>
43
43
  {filters.map((f) => <Chip as="button" type="button" size="md" active={false} hover={false} data-hub-filter={f.value} aria-pressed="false">{f.label}</Chip>)}
44
44
  </div>
@@ -0,0 +1,415 @@
1
+ ---
2
+ /**
3
+ * TourismHomePage — the tourism home page from a resolved view model (SLA-3517): lead with the ranked essentials,
4
+ * itineraries, trip planning, dates ahead, latest articles, monuments, eras and people, walks and day trips, food,
5
+ * neighbourhoods and the FAQ. Markup, classes, ids and data-track-zone names are the SLA-3515 homepage's.
6
+ *
7
+ * The route keeps Layout, StructuredData, data loading and every string. Site-only widgets come in as slots:
8
+ * `top-experiences` (when `model.topExperiences`), `booking` (when `model.booking`) and the `{ slot }` parts of the
9
+ * plan tickets.
10
+ */
11
+ import { ResponsiveImage } from '@sarimarcus/content-sites-ui/primitives';
12
+ import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
13
+ import { Container } from '@sarimarcus/content-sites-ui/layout';
14
+ import { Image } from 'astro:assets';
15
+ import Mark from '../sections/Mark.astro';
16
+ import { LABELS } from '../internal/labels';
17
+ import type { MarkKind } from '../sections/marks.ts';
18
+ import type { TourismHomeModel } from './tourismHomeModel.ts';
19
+
20
+ interface Props {
21
+ model: TourismHomeModel;
22
+ }
23
+
24
+ const { model: m } = Astro.props;
25
+ const marks = m.marks ?? LABELS.tourismHomePage.marks;
26
+ const sep = m.separator ?? LABELS.tourismHomePage.separator;
27
+ const markKinds = Object.keys(marks) as MarkKind[];
28
+ const { lead, essentials, itineraries, plan, events, articles, monuments, history, outings, food, stay, faq } = m;
29
+ ---
30
+
31
+ <div data-pagefind-ignore>
32
+ <main class="hp">
33
+
34
+ <section class="hp-lead" aria-labelledby="hp-h1">
35
+ <Container>
36
+ <div class="hp-lead__top" data-track-zone="hero">
37
+ <div>
38
+ <h1 id="hp-h1">{lead.heading}</h1>
39
+ <p class="hp-lead__stand">{lead.standfirst}</p>
40
+ <p class="hp-lead__links">{lead.links.map((l) => <a href={l.href}>{l.label}</a>)}</p>
41
+ <nav class="hp-jump" aria-label={lead.jump.ariaLabel}>
42
+ <ul role="list">
43
+ {lead.jump.links.map((j) => <li><a href={j.href}>{j.label}</a></li>)}
44
+ </ul>
45
+ </nav>
46
+ </div>
47
+ <figure class="hp-lead__photo">
48
+ <div>
49
+ <ResponsiveImage
50
+ src={lead.photo.image}
51
+ alt={lead.photo.alt}
52
+ sizes={lead.photo.sizes ?? '(min-width: 72rem) 640px, (min-width: 52rem) 56vw, 100vw'}
53
+ loading="eager"
54
+ fetchpriority="high"
55
+ />
56
+ </div>
57
+ <figcaption>{lead.photo.caption}</figcaption>
58
+ </figure>
59
+ </div>
60
+
61
+ <section class="hp-ess" aria-labelledby="hp-ess-h" data-track-zone="essentials">
62
+ <div class="hp-ess__head">
63
+ <h2 id="hp-ess-h">{essentials.heading}</h2>
64
+ <ul role="list" class="hp-key" aria-label={essentials.keyAriaLabel}>
65
+ {markKinds.map((kind) => <li><Mark kind={kind} decorative />{marks[kind]}</li>)}
66
+ </ul>
67
+ </div>
68
+ <ol role="list" class="hp-rank">
69
+ {essentials.items.map((e, i) => (
70
+ <li>
71
+ <span class="hp-rank__n" aria-hidden="true">{i + 1}</span>
72
+ <Mark kind={e.mark} label={marks[e.mark]} />
73
+ <span class="hp-rank__thumb">{e.image && <ResponsiveImage src={e.image} alt="" sizes="(min-width: 52rem) 96px, 72px" loading="lazy" />}</span>
74
+ <div class="hp-rank__body">
75
+ <h3><a href={e.href}>{e.title}</a></h3>
76
+ <p class="hp-rank__why" set:html={e.why} />
77
+ </div>
78
+ <p class="hp-rank__fact" set:html={e.fact} />
79
+ </li>
80
+ ))}
81
+ </ol>
82
+ </section>
83
+ </Container>
84
+ </section>
85
+
86
+ {m.topExperiences && (
87
+ <section class="hp-band hp-embed" data-track-zone="top-experiences">
88
+ <Container>
89
+ <slot name="top-experiences" />
90
+ </Container>
91
+ </section>
92
+ )}
93
+
94
+ <section class="hp-band hp-band--muted" id="hp-itin" aria-labelledby="hp-itin-h" data-track-zone="itineraries">
95
+ <Container>
96
+ <div class="hp-head">
97
+ <h2 id="hp-itin-h">{itineraries.heading}</h2>
98
+ {itineraries.intro && <p>{itineraries.intro}</p>}
99
+ </div>
100
+ <CardCarousel staticFrom="sm" ariaLabel={itineraries.carouselAriaLabel} trackClass="hp-itins hp-swipe">
101
+ {itineraries.items.map((it) => (
102
+ <div class="hp-itin">
103
+ <div class="hp-img">{it.image && <ResponsiveImage src={it.image} alt="" sizes="(min-width: 40rem) 33vw, 82vw" loading="lazy" />}</div>
104
+ <span class="hp-itin__len">{it.length}</span>
105
+ <h3><a href={it.href}>{it.title}</a></h3>
106
+ <p>{it.text}</p>
107
+ </div>
108
+ ))}
109
+ </CardCarousel>
110
+ <a class="hp-more" href={itineraries.more.href}>{itineraries.more.label}</a>
111
+ </Container>
112
+ </section>
113
+
114
+ <section class="hp-band" id="hp-plan" aria-labelledby="hp-plan-h" data-track-zone="plan-your-visit">
115
+ <Container>
116
+ <div class="hp-head">
117
+ <h2 id="hp-plan-h">{plan.heading}</h2>
118
+ {plan.intro && <p set:html={plan.intro} />}
119
+ </div>
120
+ <div class="hp-plan">
121
+ <div class="hp-plan__main">
122
+ <div class="hp-plan__when">
123
+ <h3>{plan.when.heading}</h3>
124
+ <ol role="list" class="hp-months" aria-label={plan.when.monthsAriaLabel}>
125
+ {plan.when.months.map((mo) => (
126
+ <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 />}</a></li>
127
+ ))}
128
+ </ol>
129
+ <p set:html={plan.when.note} />
130
+ </div>
131
+
132
+ <div>
133
+ <h3>{plan.tickets.heading}</h3>
134
+ <ul role="list" class="hp-tix">
135
+ {plan.tickets.items.map((t, i) => (
136
+ <>{i > 0 && ' '}<li><h4><a href={t.href}>{t.title}</a></h4> <p>{t.parts.map((p) => typeof p === 'string' ? <Fragment set:html={p} /> : <slot name={p.slot} />)}</p></li></>
137
+ ))}
138
+ </ul>
139
+ </div>
140
+ </div>
141
+
142
+ <aside class="hp-tours" aria-labelledby="hp-tours-h" data-track-zone="activities">
143
+ <h3 id="hp-tours-h">{plan.tours.heading}</h3>
144
+ <p class="hp-tours__note">{plan.tours.note}</p>
145
+ <CardCarousel staticFrom="sm" ariaLabel={plan.tours.carouselAriaLabel} trackClass="hp-swipe">
146
+ {plan.tours.items.map((t) => (
147
+ <div>
148
+ <div class="hp-img hp-m-only">{t.image && <ResponsiveImage src={t.image} alt="" sizes="82vw" loading="lazy" />}</div>
149
+ <a href={t.href}>{t.label}</a>
150
+ <span class="hp-meta">{t.meta}</span>
151
+ </div>
152
+ ))}
153
+ </CardCarousel>
154
+ <a class="hp-more" href={plan.tours.more.href}>{plan.tours.more.label}</a>
155
+ </aside>
156
+ </div>
157
+ </Container>
158
+ </section>
159
+
160
+ {events && events.rows.length > 0 && (
161
+ <section class="hp-band hp-band--muted" aria-labelledby="hp-cal-h" data-track-zone="events">
162
+ <Container>
163
+ <div class="hp-head">
164
+ <h2 id="hp-cal-h">{events.heading}</h2>
165
+ {events.intro && <p>{events.intro}</p>}
166
+ </div>
167
+ <table class="hp-cal">
168
+ <caption class="sr-only">{events.caption}</caption>
169
+ <thead>
170
+ <tr><th scope="col">{events.columns.when}</th><th scope="col">{events.columns.event}</th><th scope="col">{events.columns.where}</th><th scope="col">{events.columns.entry}</th></tr>
171
+ </thead>
172
+ <tbody>
173
+ {events.rows.map((r) => (
174
+ <tr>
175
+ <td class="hp-when">{r.when}</td>
176
+ <th scope="row">
177
+ <div class="hp-cal__ev">
178
+ <span class="hp-cal__thumb">{r.image && <ResponsiveImage src={r.image} alt="" sizes="64px" loading="lazy" />}</span>
179
+ <span class="hp-cal__name"><a href={r.href}>{r.name}</a>{r.seasonal && <Mark kind="season" label={marks.season} />}</span>
180
+ </div>
181
+ </th>
182
+ <td class="hp-where">{r.place}</td>
183
+ <td class="hp-entry">{r.entry}</td>
184
+ </tr>
185
+ ))}
186
+ </tbody>
187
+ </table>
188
+ <p class="hp-events__after">
189
+ {events.links.map((l, i) => <>{i > 0 && ' '}<a href={l.href}>{l.label}</a></>)}
190
+ </p>
191
+ </Container>
192
+ </section>
193
+ )}
194
+
195
+ {articles && (
196
+ <section class="hp-band" aria-labelledby="hp-feed-h" data-track-zone="latest-articles">
197
+ <Container>
198
+ <div class="hp-head">
199
+ <h2 id="hp-feed-h">{articles.heading}</h2>
200
+ {articles.intro && <p>{articles.intro}</p>}
201
+ </div>
202
+ <div class="hp-feed">
203
+ <article class="hp-feed__lead">
204
+ <div class="hp-img">{articles.lead.image && <ResponsiveImage src={articles.lead.image} alt="" sizes="(min-width: 52rem) 640px, 100vw" loading="lazy" />}</div>
205
+ <h3><a href={articles.lead.href}>{articles.lead.title}</a></h3>
206
+ <p class="hp-dek">{articles.lead.description}</p>
207
+ <p class="hp-meta">
208
+ {articles.lead.author}
209
+ {sep}<time datetime={articles.lead.datetime}>{articles.lead.dateLabel}</time>
210
+ </p>
211
+ </article>
212
+ <CardCarousel staticFrom="sm" ariaLabel={articles.moreAriaLabel} trackClass="hp-feed__list hp-swipe">
213
+ {articles.more.map((a) => (
214
+ <div>
215
+ <div>
216
+ <h3><a href={a.href}>{a.title}</a></h3>
217
+ <p>{a.description}</p>
218
+ <p class="hp-meta">{a.author}{sep}<time datetime={a.datetime}>{a.dateLabel}</time></p>
219
+ </div>
220
+ <div class="hp-thumb">{a.image && <ResponsiveImage src={a.image} alt="" sizes="(min-width: 40rem) 88px, 82vw" loading="lazy" />}</div>
221
+ </div>
222
+ ))}
223
+ </CardCarousel>
224
+ </div>
225
+ <a class="hp-more" href={articles.all.href}>{articles.all.label}</a>
226
+
227
+ <div class="hp-writers" data-track-zone="authors">
228
+ <div class="hp-writers__head">
229
+ <h3>{articles.writers.heading}</h3>
230
+ <a href={articles.writers.all.href}>{articles.writers.all.label}</a>
231
+ </div>
232
+ <ul role="list">
233
+ {articles.writers.items.map((w) => (
234
+ <li>
235
+ <span class="hp-writers__photo">{w.photo && <ResponsiveImage src={w.photo} alt="" sizes="56px" loading="lazy" />}</span>
236
+ <span class="hp-writers__who">
237
+ <a class="hp-quiet" href={w.href}>{w.name}</a>
238
+ <span class="hp-writers__beat">{w.beat}</span>
239
+ </span>
240
+ </li>
241
+ ))}
242
+ </ul>
243
+ </div>
244
+ </Container>
245
+ </section>
246
+ )}
247
+
248
+ <section class="hp-band" aria-labelledby="hp-mon-h" data-track-zone="monuments">
249
+ <Container>
250
+ <div class="hp-head">
251
+ <h2 id="hp-mon-h">{monuments.heading}</h2>
252
+ {monuments.intro && <p>{monuments.intro}</p>}
253
+ </div>
254
+ <CardCarousel staticFrom="sm" ariaLabel={monuments.carouselAriaLabel} trackClass="hp-mons hp-swipe">
255
+ {monuments.items.map((mo) => (
256
+ <div>
257
+ <div class="hp-thumb">{mo.image && <ResponsiveImage src={mo.image} alt="" sizes="(min-width: 40rem) 120px, 82vw" loading="lazy" />}</div>
258
+ <div>
259
+ <h3><a href={mo.href}>{mo.title}</a></h3>
260
+ <p class="hp-meta">{mo.meta}{mo.tickets && <> <a href={mo.tickets.href}>{mo.tickets.label}</a></>}</p>
261
+ <p class="hp-tip"><b>{mo.tipLead}</b> <Fragment set:html={mo.tip} /></p>
262
+ </div>
263
+ </div>
264
+ ))}
265
+ </CardCarousel>
266
+ <p class="hp-more">{monuments.links.map((l, i) => <>{i > 0 && sep}<a href={l.href}>{l.label}</a></>)}</p>
267
+ </Container>
268
+ </section>
269
+
270
+ <section class="hp-band hp-band--muted" aria-labelledby="hp-hist-h" data-track-zone="history">
271
+ <Container>
272
+ <div class="hp-head">
273
+ <h2 id="hp-hist-h">{history.heading}</h2>
274
+ {history.intro && <p>{history.intro}</p>}
275
+ </div>
276
+ <CardCarousel ariaLabel={history.carouselAriaLabel} trackClass="hp-eras">
277
+ {history.eras.map((era) => (
278
+ <div class="hp-era">
279
+ <p class="hp-era__range">{era.rangeLabel}</p>
280
+ <h3><a href={era.href}>{era.label}</a></h3>
281
+ <div class="hp-era__img">{era.image && <ResponsiveImage src={era.image} alt="" sizes="(min-width: 40rem) 256px, 82vw" loading="lazy" />}</div>
282
+ <p class="hp-era__hook">{era.hook}</p>
283
+ {era.people.length > 0 && (
284
+ <ul role="list" class="hp-people">
285
+ {era.people.map((p) => (
286
+ <li>
287
+ <div class="hp-por">{p.portrait && <Image src={p.portrait} alt={p.alt ?? ''} width={80} height={80} loading="lazy" />}</div>
288
+ <div><a href={p.href}>{p.name}</a> {p.dates && <span class="hp-meta">{p.dates}</span>}<p>{p.knownFor}</p></div>
289
+ </li>
290
+ ))}
291
+ </ul>
292
+ )}
293
+ </div>
294
+ ))}
295
+ </CardCarousel>
296
+
297
+ <div class="hp-context">
298
+ <h3>{history.context.heading}</h3>
299
+ <ul>
300
+ {history.context.items.map((c, i) => <>{i > 0 && ' '}<li><a href={c.href}>{c.label}</a><p>{c.text}</p></li></>)}
301
+ </ul>
302
+ </div>
303
+ </Container>
304
+ </section>
305
+
306
+ <section class="hp-band" aria-labelledby="hp-out-h">
307
+ <Container>
308
+ <div class="hp-head">
309
+ <h2 id="hp-out-h">{outings.heading}</h2>
310
+ {outings.intro && <p>{outings.intro}</p>}
311
+ </div>
312
+ <div class="hp-out">
313
+ <div data-track-zone="walks">
314
+ <h3 class="hp-sub">{outings.walks.heading}</h3>
315
+ <CardCarousel staticFrom="sm" ariaLabel={outings.walks.carouselAriaLabel} trackClass="hp-walks hp-swipe">
316
+ {outings.walks.items.map((w) => (
317
+ <div>
318
+ <div class="hp-img hp-m-only">{w.image && <ResponsiveImage src={w.image} alt="" sizes="82vw" loading="lazy" />}</div>
319
+ <a href={w.href}>{w.label}</a><span class="hp-meta">{w.meta}</span>
320
+ </div>
321
+ ))}
322
+ </CardCarousel>
323
+ <a class="hp-more" href={outings.walks.more.href}>{outings.walks.more.label}</a>
324
+ </div>
325
+ <div data-track-zone="day-trips">
326
+ <h3 class="hp-sub">{outings.trips.heading}</h3>
327
+ <CardCarousel staticFrom="sm" ariaLabel={outings.trips.carouselAriaLabel} trackClass="hp-trips hp-swipe">
328
+ {outings.trips.items.map((t) => (
329
+ <div>
330
+ <div class="hp-img hp-m-only">{t.image && <ResponsiveImage src={t.image} alt="" sizes="82vw" loading="lazy" />}</div>
331
+ <h4><a class="hp-quiet" href={t.href}>{t.title}</a></h4>
332
+ <p>{t.text}</p>
333
+ </div>
334
+ ))}
335
+ </CardCarousel>
336
+ </div>
337
+ </div>
338
+ </Container>
339
+ </section>
340
+
341
+ <section class="hp-band hp-band--inverse" aria-labelledby="hp-food-h" data-track-zone="food-drink">
342
+ <Container>
343
+ <div class="hp-food">
344
+ <figure class="hp-food__fig">
345
+ <div>{food.feature.image && <ResponsiveImage src={food.feature.image} alt={food.feature.alt} sizes="(min-width: 52rem) 460px, 100vw" loading="lazy" />}</div>
346
+ <figcaption class="hp-soft">{food.feature.caption}</figcaption>
347
+ </figure>
348
+ <div>
349
+ <div class="hp-head">
350
+ <h2 id="hp-food-h">{food.heading}</h2>
351
+ {food.intro && <p>{food.intro}</p>}
352
+ </div>
353
+ <CardCarousel staticFrom="sm" ariaLabel={food.carouselAriaLabel} trackClass="hp-dishes hp-swipe">
354
+ {food.dishes.map((d) => (
355
+ <div>
356
+ <div class="hp-img hp-m-only">{d.image && <ResponsiveImage src={d.image} alt="" sizes="82vw" loading="lazy" />}</div>
357
+ <a href={d.href}>{d.name}</a><p class="hp-soft">{d.line}</p>
358
+ </div>
359
+ ))}
360
+ </CardCarousel>
361
+ <div class="hp-wheres">
362
+ <h3>{food.wheres.heading}</h3>
363
+ <ul>
364
+ {food.wheres.items.map((html, i) => <>{i > 0 && ' '}<li set:html={html} /></>)}
365
+ </ul>
366
+ </div>
367
+ </div>
368
+ </div>
369
+ </Container>
370
+ </section>
371
+
372
+ <section class="hp-band" aria-labelledby="hp-stay-h" data-track-zone="neighborhoods">
373
+ <Container>
374
+ <div class="hp-head">
375
+ <h2 id="hp-stay-h">{stay.heading}</h2>
376
+ {stay.intro && <p>{stay.intro}</p>}
377
+ </div>
378
+ <CardCarousel staticFrom="sm" ariaLabel={stay.carouselAriaLabel} trackClass="hp-quarters hp-swipe">
379
+ {stay.quarters.map((q) => (
380
+ <div>
381
+ <div class="hp-img">{q.image && <ResponsiveImage src={q.image} alt="" sizes="(min-width: 52rem) 270px, (min-width: 40rem) 45vw, 82vw" loading="lazy" />}</div>
382
+ <h3><a class="hp-quiet" href={q.href}>{q.title}</a></h3>
383
+ <p>{q.text}</p>
384
+ </div>
385
+ ))}
386
+ </CardCarousel>
387
+ <p class="hp-also">{stay.also.label} {stay.also.items.map((n, i) => <>{i > 0 && ', '}<a href={n.href}>{n.label}</a></>)}. <a href={stay.also.comparison.href}>{stay.also.comparison.label}</a></p>
388
+ <p class="hp-stay__links"><a class="hp-stay__main" href={stay.main.href}>{stay.main.label}</a><span set:html={stay.extra} /></p>
389
+ </Container>
390
+ </section>
391
+
392
+ {m.booking && (
393
+ <div class="hp-embed" data-track-zone="hotels">
394
+ <slot name="booking" />
395
+ </div>
396
+ )}
397
+
398
+ <section class="hp-band hp-band--muted" aria-labelledby="hp-qa-h" data-track-zone="faq">
399
+ <Container>
400
+ <div class="hp-head">
401
+ <h2 id="hp-qa-h">{faq.heading}</h2>
402
+ </div>
403
+ <dl class="hp-qa">
404
+ {faq.items.map((q) => (
405
+ <div>
406
+ <dt>{q.question}</dt>
407
+ <dd set:html={q.answer} />
408
+ </div>
409
+ ))}
410
+ </dl>
411
+ </Container>
412
+ </section>
413
+
414
+ </main>
415
+ </div>
@@ -0,0 +1,366 @@
1
+ /* Tourism home page (SLA-3515, packaged SLA-3517), imported by templates/TourismHomePage.astro. Theme roles only. */
2
+ .hp {
3
+ --hp-gutter: clamp(1rem, 4vw, 2rem);
4
+ --hp-band: clamp(3.5rem, 7vw, 6rem);
5
+ --hp-rule: 1px solid var(--border);
6
+ font-family: var(--font-body);
7
+ color: var(--foreground);
8
+ background: var(--background);
9
+ line-height: 1.6;
10
+ font-size: 1rem;
11
+ font-variant-numeric: lining-nums;
12
+ }
13
+ .hp *, .hp *::before, .hp *::after { box-sizing: border-box; }
14
+ .hp ::selection { background: color-mix(in oklch, var(--accent) 45%, transparent); color: var(--foreground); }
15
+ .hp [id] { scroll-margin-top: 5rem; }
16
+
17
+ /* ---------- shared ---------- */
18
+ .hp .hp-band { padding-block: var(--hp-band); }
19
+ .hp .hp-band:not(.hp-band--muted):not(.hp-band--inverse) + .hp-band:not(.hp-band--muted):not(.hp-band--inverse) { border-top: var(--hp-rule); }
20
+ .hp .hp-band--muted { background: var(--muted); }
21
+ .hp .hp-band--inverse { background: var(--inverse); color: var(--inverse-foreground); }
22
+
23
+ /* Element rules skip .hp-embed: shared components style themselves. :where keeps specificity unchanged. */
24
+ .hp :is(h1, h2, h3, h4):where(:not(.hp-embed *)) {
25
+ font-family: var(--font-display);
26
+ font-weight: 400;
27
+ letter-spacing: -0.01em;
28
+ text-wrap: balance;
29
+ margin: 0;
30
+ color: inherit;
31
+ }
32
+ .hp h2:where(:not(.hp-embed *)) { font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.75rem); line-height: 1.1; }
33
+ .hp h3:where(:not(.hp-embed *)) { font-size: 1.25rem; line-height: 1.3; }
34
+ .hp p:where(:not(.hp-embed *)) { margin: 0; }
35
+ .hp :is(ul, ol):where(:not(.hp-embed *)) { list-style: none; margin: 0; padding: 0; }
36
+ .hp img:where(:not(.hp-embed *)) { display: block; width: 100%; height: 100%; object-fit: cover; }
37
+
38
+ .hp a:where(:not(.hp-embed *)) { color: var(--secondary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in oklch, var(--secondary) 40%, transparent); transition: color 160ms ease-out, text-decoration-color 160ms ease-out; }
39
+ .hp a:hover:where(:not(.hp-embed *)) { color: var(--primary-strong); text-decoration-color: currentColor; }
40
+ .hp a:focus-visible:where(:not(.hp-embed *)) { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
41
+ .hp .hp-quiet { color: inherit; text-decoration: none; }
42
+ .hp .hp-quiet:hover { color: var(--primary-strong); text-decoration: underline; }
43
+
44
+ .hp .hp-head { display: grid; gap: 0.75rem; margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 46rem; }
45
+ .hp .hp-head p { color: var(--muted-foreground); font-size: 1.0625rem; max-width: 42rem; }
46
+ .hp .hp-meta { font-size: 0.875rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
47
+ .hp .hp-more { display: inline-block; margin-top: 1.5rem; font-size: 0.9375rem; }
48
+
49
+ /* marks */
50
+ .hp .hp-mark { display: inline-flex; gap: 2px; align-items: center; flex: none; }
51
+ .hp .hp-mark svg { width: 0.875rem; height: 0.875rem; display: block; }
52
+ .hp .hp-mark--trip, .hp .hp-mark--detour { color: var(--primary-strong); }
53
+ .hp .hp-mark--season { color: var(--secondary); }
54
+
55
+ /* ---------- 1. lead ---------- */
56
+ /* 4rem clears the fixed site header */
57
+ .hp .hp-lead { padding-block: calc(4rem + clamp(2rem, 5vw, 4rem)) var(--hp-band); }
58
+ .hp .hp-lead__top { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
59
+ .hp .hp-lead h1 { font-size: clamp(2.75rem, 2rem + 4vw, 5rem); line-height: 1; letter-spacing: -0.02em; }
60
+ .hp .hp-lead__stand { margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; max-width: 36rem; }
61
+ .hp .hp-lead__links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.9375rem; }
62
+ .hp .hp-jump { display: none; }
63
+ /* Grid items default to min-width: auto, so the scrolling jump row would widen the lead column past the viewport. */
64
+ .hp .hp-lead__top > * { min-width: 0; }
65
+ @media (max-width: 39.99rem) {
66
+ .hp .hp-lead__links { display: none; }
67
+ .hp .hp-jump { display: block; margin: 1.25rem -1rem 0; }
68
+ .hp .hp-jump ul { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.125rem 1rem 0.375rem; scrollbar-width: none; scroll-padding-inline: 1rem; }
69
+ .hp .hp-jump ul::-webkit-scrollbar { display: none; }
70
+ .hp .hp-jump a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; white-space: nowrap; font-size: 0.9375rem; color: var(--foreground); text-decoration: none; background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
71
+ .hp .hp-jump a:hover { border-color: var(--secondary); }
72
+ }
73
+ .hp .hp-lead__photo { margin: 0; }
74
+ .hp .hp-lead__photo div { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--muted); }
75
+ .hp .hp-lead__photo figcaption { margin-top: 0.625rem; font-size: 0.8125rem; color: var(--muted-foreground); }
76
+
77
+ .hp .hp-ess { margin-top: clamp(2.5rem, 5vw, 4rem); }
78
+ .hp .hp-ess__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--foreground); }
79
+ .hp .hp-ess__head h2 { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); }
80
+ .hp .hp-key { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; font-size: 0.8125rem; color: var(--muted-foreground); }
81
+ .hp .hp-key li { display: inline-flex; align-items: center; gap: 0.4rem; }
82
+
83
+ .hp .hp-rank > li {
84
+ display: grid;
85
+ grid-template-columns: 2rem 2.25rem minmax(0, 1fr) 4.5rem;
86
+ gap: 0 0.75rem;
87
+ padding-block: 1.125rem;
88
+ border-bottom: var(--hp-rule);
89
+ }
90
+ .hp .hp-rank__n { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
91
+ .hp .hp-rank .hp-mark { padding-top: 0.45rem; }
92
+ .hp .hp-rank h3 { font-size: 1.25rem; }
93
+ .hp .hp-rank h3 a { color: var(--foreground); text-decoration: none; }
94
+ .hp .hp-rank h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
95
+ .hp .hp-rank__why { margin-top: 0.25rem; color: var(--muted-foreground); max-width: 40rem; }
96
+ .hp .hp-rank__n { grid-column: 1; grid-row: 1; }
97
+ .hp .hp-rank > li > .hp-mark { grid-column: 2; grid-row: 1; }
98
+ .hp .hp-rank__body { grid-column: 3; grid-row: 1; }
99
+ .hp .hp-rank__thumb { grid-column: 4; grid-row: 1 / span 2; width: 4.5rem; height: 4.5rem; border-radius: calc(var(--radius) * 0.5); overflow: hidden; background: var(--muted); }
100
+ .hp .hp-rank__fact { grid-column: 3; grid-row: 2; margin-top: 0.5rem; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
101
+
102
+ /* ---------- 2. itineraries ---------- */
103
+ .hp .hp-itin { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
104
+ .hp .hp-itin .hp-img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--card); margin-bottom: 0.75rem; }
105
+ .hp .hp-itin__len { display: block; font-family: var(--font-display); font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3rem); line-height: 1; letter-spacing: -0.02em; color: var(--primary-strong); }
106
+ .hp .hp-itin h3 { font-size: 1.375rem; line-height: 1.25; }
107
+ .hp .hp-itin h3 a { color: var(--foreground); text-decoration: none; }
108
+ .hp .hp-itin h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
109
+ .hp .hp-itin p { color: var(--muted-foreground); }
110
+
111
+ /* ---------- 3. plan ---------- */
112
+ .hp .hp-plan { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
113
+ .hp .hp-plan__main { display: grid; gap: 2.75rem; }
114
+ .hp .hp-plan h3 { font-size: 1.375rem; margin-bottom: 1rem; }
115
+ .hp .hp-months { display: grid; grid-template-columns: repeat(12, 1fr); border: var(--hp-rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
116
+ .hp .hp-months li { text-align: center; font-size: 0.8125rem; border-right: var(--hp-rule); }
117
+ .hp .hp-months li a { padding: 0.625rem 0.25rem 0.5rem; display: grid; justify-items: center; gap: 0.375rem; min-height: 3.75rem; height: 100%; align-content: start; transition: background-color 160ms ease-out; }
118
+ .hp .hp-months li a:hover { background: color-mix(in oklch, var(--secondary) 10%, transparent); }
119
+ .hp .hp-months li a:focus-visible { outline-offset: -2px; }
120
+ .hp .hp-months li:last-child { border-right: 0; }
121
+ .hp .hp-months li.is-peak { background: color-mix(in oklch, var(--primary) 9%, var(--background)); }
122
+ .hp .hp-plan__when p { max-width: 40rem; }
123
+ .hp .hp-tix > li { padding-block: 0.875rem; border-top: var(--hp-rule); }
124
+ .hp .hp-tix > li:last-child { border-bottom: var(--hp-rule); }
125
+ .hp .hp-tix h4 { font-size: 1.125rem; display: inline; }
126
+ .hp .hp-tix p { display: inline; color: var(--muted-foreground); }
127
+
128
+ .hp .hp-tours { align-self: start; background: var(--card); border: var(--hp-rule); border-radius: calc(var(--radius) * 1.5); padding: 1.5rem; }
129
+ .hp .hp-tours h3 { font-size: 1.375rem; margin-bottom: 0.375rem; }
130
+ .hp .hp-tours__note { font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 1rem; }
131
+ .hp .hp-tours .hp-swipe > * { padding-block: 0.75rem; border-top: var(--hp-rule); display: grid; gap: 0.125rem; }
132
+ .hp .hp-tours .hp-swipe > * a { font-weight: 600; }
133
+ .hp .hp-tours .hp-meta { font-size: 0.8125rem; }
134
+
135
+ /* ---------- 4. events ---------- */
136
+ .hp .hp-cal { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9375rem; background: var(--card); border-radius: var(--radius); overflow: hidden; }
137
+ .hp .hp-cal caption { text-align: left; caption-side: top; padding-bottom: 1rem; color: var(--muted-foreground); }
138
+ .hp .hp-cal th, .hp .hp-cal td { text-align: left; padding: 0.875rem 1rem; border-bottom: var(--hp-rule); vertical-align: top; }
139
+ .hp .hp-cal thead th { font-family: var(--font-body); font-weight: 600; font-size: 0.8125rem; color: var(--muted-foreground); background: var(--card); border-bottom: 1px solid var(--foreground); }
140
+ .hp .hp-cal tbody tr:last-child > * { border-bottom: 0; }
141
+ .hp .hp-cal td.hp-when { white-space: nowrap; font-variant-numeric: tabular-nums; width: 11rem; }
142
+ .hp .hp-cal th[scope="row"] { font-weight: 400; }
143
+ .hp .hp-cal th[scope="row"] a { font-family: var(--font-display); font-size: 1.125rem; }
144
+ .hp .hp-cal th[scope="row"] .hp-mark { margin-left: 0.5rem; vertical-align: 0.05em; }
145
+ .hp .hp-cal .hp-where { color: var(--muted-foreground); }
146
+ .hp .hp-cal__ev { display: flex; align-items: center; gap: 0.875rem; }
147
+ .hp .hp-cal__thumb { flex: 0 0 4rem; width: 4rem; height: 3rem; border-radius: calc(var(--radius) * 0.5); overflow: hidden; background: var(--muted); }
148
+ .hp .hp-events__after { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-size: 0.9375rem; }
149
+
150
+ /* ---------- 5. articles ---------- */
151
+ .hp .hp-feed { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
152
+ .hp .hp-feed__lead .hp-img { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--muted); margin-bottom: 1.25rem; }
153
+ .hp .hp-feed__lead h3 { font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.25rem); line-height: 1.15; }
154
+ .hp .hp-feed__lead h3 a, .hp .hp-feed__list h3 a { color: var(--foreground); text-decoration: none; }
155
+ .hp .hp-feed__lead h3 a:hover, .hp .hp-feed__list h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
156
+ .hp .hp-feed__lead p.hp-dek { margin-top: 0.75rem; font-size: 1.0625rem; max-width: 38rem; }
157
+ .hp .hp-feed__lead .hp-meta { margin-top: 0.75rem; }
158
+ .hp .hp-feed__list > * { display: grid; grid-template-columns: 1fr 5.5rem; gap: 1rem; padding-block: 1.125rem; border-top: var(--hp-rule); }
159
+ .hp .hp-feed__list > *:first-child { border-top: 0; padding-top: 0; }
160
+ .hp .hp-feed__list h3 { font-size: 1.1875rem; }
161
+ .hp .hp-feed__list p { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--muted-foreground); }
162
+ .hp .hp-feed__list .hp-meta { margin-top: 0.375rem; font-size: 0.8125rem; }
163
+ .hp .hp-feed__list .hp-thumb { aspect-ratio: 1; border-radius: calc(var(--radius) * 0.75); overflow: hidden; background: var(--muted); }
164
+ .hp .hp-writers { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.25rem; border-top: 1px solid var(--foreground); display: grid; gap: 1.25rem; }
165
+ .hp .hp-writers__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
166
+ .hp .hp-writers h3 { font-size: 1.125rem; }
167
+ .hp .hp-writers__head a { font-size: 0.9375rem; }
168
+ .hp .hp-writers ul { display: grid; gap: 0.625rem; }
169
+ .hp .hp-writers li { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 160ms ease-out; }
170
+ .hp .hp-writers li:hover { border-color: color-mix(in oklch, var(--secondary) 45%, var(--border)); }
171
+ .hp .hp-writers__photo { flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; overflow: hidden; background: var(--muted); }
172
+ .hp .hp-writers__who { display: grid; gap: 0.125rem; min-width: 0; }
173
+ .hp .hp-writers__who a { font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.25; }
174
+ .hp .hp-writers__who a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
175
+ .hp .hp-writers__who a:focus-visible { outline: none; }
176
+ .hp .hp-writers li:has(a:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
177
+ .hp .hp-writers__beat { font-size: 0.875rem; line-height: 1.35; color: var(--muted-foreground); }
178
+ .hp .hp-writers__photo :is(picture, img) { display: block; width: 100%; height: 100%; object-fit: cover; }
179
+ @media (min-width: 40rem) {
180
+ .hp .hp-writers ul { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.875rem; }
181
+ .hp .hp-writers li { flex-direction: column; text-align: center; padding: 1.25rem 0.75rem 1rem; gap: 0.625rem; }
182
+ .hp .hp-writers__photo { flex-basis: auto; width: 4.5rem; height: 4.5rem; }
183
+ .hp .hp-writers__who { justify-items: center; }
184
+ }
185
+
186
+ /* ---------- 6. monuments ---------- */
187
+ .hp .hp-mons > * { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem; align-items: start; }
188
+ .hp .hp-mons .hp-thumb { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--muted); }
189
+ .hp .hp-mons h3 { font-size: 1.25rem; }
190
+ .hp .hp-mons h3 a { color: var(--foreground); text-decoration: none; }
191
+ .hp .hp-mons h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
192
+ .hp .hp-mons .hp-meta { margin-top: 0.25rem; }
193
+ .hp .hp-mons p.hp-tip { margin-top: 0.5rem; font-size: 0.9375rem; }
194
+ .hp .hp-mons p.hp-tip b { font-weight: 600; }
195
+
196
+ /* ---------- 7. eras ---------- */
197
+ .hp .hp-era { position: relative; flex: 0 0 16rem; min-width: 0; scroll-snap-align: start; padding-top: 1.375rem; display: flex; flex-direction: column; gap: 0.375rem; }
198
+ .hp .hp-era::before { content: ""; position: absolute; top: 0.5rem; left: 0; right: -1rem; height: 1px; background: var(--foreground); }
199
+ .hp .hp-era:last-child::before { right: 0; }
200
+ .hp .hp-era::after { content: ""; position: absolute; top: 0.125rem; left: 0.0625rem; width: 0.75rem; height: 0.75rem; transform: rotate(45deg); background: var(--primary-strong); }
201
+ .hp .hp-era__range { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
202
+ .hp .hp-era h3 { font-size: 1.1875rem; line-height: 1.2; }
203
+ .hp .hp-era h3 a { color: var(--foreground); text-decoration: none; }
204
+ .hp .hp-era h3 a:hover { color: var(--primary-strong); text-decoration: underline; }
205
+ .hp .hp-era__img { aspect-ratio: 5 / 2; border-radius: calc(var(--radius) * 0.75); overflow: hidden; background: var(--card); margin-block: 0.125rem; }
206
+ .hp .hp-era__hook { font-size: 0.875rem; line-height: 1.45; }
207
+ .hp .hp-people { margin-top: 0.25rem; padding-top: 0.625rem; border-top: var(--hp-rule); display: grid; gap: 0.625rem; }
208
+ .hp .hp-people li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.625rem; align-items: start; }
209
+ .hp .hp-por { width: 2.5rem; height: 2.5rem; border-radius: 50%; overflow: hidden; background: var(--card); }
210
+ .hp .hp-people a { font-weight: 600; font-size: 0.9375rem; }
211
+ .hp .hp-people .hp-meta { font-size: 0.75rem; white-space: nowrap; }
212
+ .hp .hp-people p { font-size: 0.8125rem; line-height: 1.4; color: var(--muted-foreground); }
213
+ .hp .hp-context { margin-top: 1.75rem; padding-top: 1.25rem; border-top: var(--hp-rule); display: grid; gap: 1rem; }
214
+ .hp .hp-context ul { display: grid; gap: 0.875rem 2.5rem; }
215
+ .hp .hp-context li a { font-family: var(--font-display); font-size: 1.125rem; }
216
+ .hp .hp-context li p { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.125rem; }
217
+
218
+ /* ---------- 8. walks + day trips ---------- */
219
+ .hp .hp-out { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
220
+ .hp .hp-out h3.hp-sub { font-size: 1.375rem; margin-bottom: 0.75rem; }
221
+ .hp .hp-walks > * { display: grid; grid-template-columns: 1fr auto; gap: 0.125rem 1rem; align-items: baseline; padding-block: 0.75rem; border-top: var(--hp-rule); }
222
+ .hp .hp-walks > *:last-child { border-bottom: var(--hp-rule); }
223
+ .hp .hp-walks > * a { font-weight: 600; }
224
+ .hp .hp-walks .hp-meta { white-space: nowrap; }
225
+ .hp .hp-trips > * { padding-block: 1rem; border-top: var(--hp-rule); }
226
+ .hp .hp-trips > *:last-child { border-bottom: var(--hp-rule); }
227
+ .hp .hp-trips h4 { font-size: 1.1875rem; }
228
+ .hp .hp-trips p { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--muted-foreground); }
229
+
230
+ /* ---------- 9. food (inverse) ---------- */
231
+ .hp .hp-band--inverse a { color: var(--inverse-foreground); text-decoration-color: color-mix(in oklch, var(--accent) 70%, transparent); }
232
+ .hp .hp-band--inverse a:hover { color: var(--inverse-foreground); text-decoration-color: var(--accent); }
233
+ .hp .hp-band--inverse a:focus-visible { outline-color: var(--accent); }
234
+ .hp .hp-band--inverse [data-carousel-arrows] button { color: var(--foreground); }
235
+ .hp .hp-band--inverse .hp-head p, .hp .hp-band--inverse .hp-soft { color: color-mix(in oklch, var(--inverse-foreground) 78%, var(--inverse)); }
236
+ .hp .hp-food { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
237
+ .hp .hp-food__fig { margin: 0; }
238
+ .hp .hp-food__fig div { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: color-mix(in oklch, var(--inverse-foreground) 10%, var(--inverse)); }
239
+ .hp .hp-food__fig figcaption { margin-top: 0.625rem; font-size: 0.8125rem; }
240
+ .hp .hp-dishes > * { padding-block: 0.875rem; border-top: 1px solid color-mix(in oklch, var(--inverse-foreground) 18%, var(--inverse)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
241
+ .hp .hp-dishes > * a { font-family: var(--font-display); font-size: 1.1875rem; }
242
+ .hp .hp-dishes > * p { font-size: 0.9375rem; }
243
+ .hp .hp-wheres { margin-top: 2rem; padding-top: 1.25rem; border-top: 2px solid var(--accent); }
244
+ .hp .hp-wheres h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
245
+ .hp .hp-wheres ul { display: grid; gap: 0.5rem 2rem; font-size: 0.9375rem; }
246
+
247
+ /* ---------- 10. stay ---------- */
248
+ .hp .hp-quarters .hp-img { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--muted); margin-bottom: 0.75rem; }
249
+ .hp .hp-quarters h3 { font-size: 1.25rem; }
250
+ .hp .hp-quarters p { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--muted-foreground); }
251
+ .hp .hp-also { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--muted-foreground); }
252
+ .hp .hp-stay__links { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.75rem; }
253
+ .hp .hp-stay__links .hp-stay__main { font-family: var(--font-display); font-size: 1.25rem; }
254
+ .hp .hp-stay__links span { font-size: 0.9375rem; color: var(--muted-foreground); }
255
+
256
+ /* ---------- 11. questions ---------- */
257
+ .hp .hp-qa { display: grid; gap: 2rem 3.5rem; }
258
+ .hp .hp-qa > div { display: grid; gap: 0.5rem; align-content: start; }
259
+ .hp .hp-qa dt { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.3; }
260
+ .hp .hp-qa dd { margin: 0; color: var(--muted-foreground); max-width: 36rem; }
261
+
262
+ /* mobile-only extras (images added for swipe rows) */
263
+ .hp .hp-m-only { display: none; }
264
+
265
+ /* ---------- breakpoints ---------- */
266
+ @media (min-width: 40rem) {
267
+ /* from here up the CardCarousel tracks (staticFrom="sm") take the comp's static layouts */
268
+ .hp .hp-itins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
269
+ .hp .hp-mons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
270
+ .hp .hp-dishes { display: grid; gap: 0; }
271
+ .hp .hp-quarters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }
272
+ .hp .hp-feed__list, .hp .hp-walks, .hp .hp-trips, .hp .hp-tours .hp-swipe { display: block; }
273
+ .hp .hp-context ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
274
+ .hp .hp-wheres ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
275
+ .hp .hp-qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
276
+ }
277
+ @media (min-width: 52rem) {
278
+ .hp .hp-lead__top { grid-template-columns: 5fr 7fr; }
279
+ .hp .hp-rank > li { grid-template-columns: 2.5rem 2.5rem 6rem minmax(0, 1fr) 16rem; gap: 0 1.25rem; }
280
+ .hp .hp-rank__thumb { grid-column: 3; grid-row: 1; width: 6rem; height: 4.5rem; }
281
+ .hp .hp-rank__body { grid-column: 4; }
282
+ .hp .hp-rank__fact { grid-column: 5; grid-row: 1; margin-top: 0.2rem; text-align: right; }
283
+ .hp .hp-itins { gap: 2.5rem; }
284
+ .hp .hp-plan { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
285
+ .hp .hp-feed { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
286
+ .hp .hp-quarters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
287
+ .hp .hp-food { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
288
+ .hp .hp-dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
289
+ .hp .hp-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
290
+ }
291
+ @media (min-width: 64rem) {
292
+ .hp .hp-months li { font-size: 0.875rem; }
293
+ }
294
+
295
+ /* small screens */
296
+ @media (max-width: 39.99rem) {
297
+ .hp .hp-months { grid-template-columns: repeat(6, 1fr); }
298
+ .hp .hp-months li:nth-child(6) { border-right: 0; }
299
+ .hp .hp-months li:nth-child(-n+6) { border-bottom: var(--hp-rule); }
300
+ .hp .hp-cal, .hp .hp-cal tbody, .hp .hp-cal tr, .hp .hp-cal td, .hp .hp-cal th { display: block; width: auto; }
301
+ .hp .hp-cal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
302
+ /* Each row becomes a media object: square thumbnail left, date / name / place / entry stacked right. */
303
+ .hp .hp-cal tr { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); column-gap: 0.875rem; row-gap: 0.1875rem; align-content: start; padding: 0.875rem 1rem; border-bottom: var(--hp-rule); }
304
+ .hp .hp-cal tbody tr:last-child { border-bottom: 0; }
305
+ .hp .hp-cal th, .hp .hp-cal td { padding: 0; border: 0; }
306
+ .hp .hp-cal th[scope="row"], .hp .hp-cal__ev { display: contents; }
307
+ .hp .hp-cal__thumb { grid-column: 1; grid-row: 1 / span 4; align-self: start; width: 4.75rem; height: 4.75rem; }
308
+ .hp .hp-cal td.hp-when { grid-column: 2; grid-row: 1; width: auto; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--muted-foreground); }
309
+ .hp .hp-cal__name { grid-column: 2; grid-row: 2; }
310
+ .hp .hp-cal th[scope="row"] a { font-size: 1.0625rem; line-height: 1.3; }
311
+ .hp .hp-cal td.hp-where { grid-column: 2; grid-row: 3; font-size: 0.875rem; line-height: 1.4; }
312
+ .hp .hp-cal td.hp-entry { grid-column: 2; grid-row: 4; font-size: 0.875rem; line-height: 1.4; }
313
+ .hp .hp-cal td.hp-entry::before { content: "Entry: "; color: var(--muted-foreground); }
314
+
315
+ /* carousel cards (the CardCarousel track scrolls them) */
316
+ .hp .hp-swipe.hp-swipe > *:nth-child(n) {
317
+ flex: 0 0 82%;
318
+ min-width: 0;
319
+ scroll-snap-align: start;
320
+ display: flex;
321
+ flex-direction: column;
322
+ gap: 0.3rem;
323
+ padding: 0;
324
+ border: 0;
325
+ }
326
+ .hp .hp-swipe .hp-m-only { display: block; }
327
+ .hp .hp-swipe .hp-thumb,
328
+ .hp .hp-swipe .hp-img {
329
+ order: -1;
330
+ width: 100%;
331
+ aspect-ratio: 3 / 2;
332
+ margin: 0 0 0.5rem;
333
+ border-radius: var(--radius);
334
+ overflow: hidden;
335
+ background: var(--muted);
336
+ }
337
+ .hp .hp-swipe > * > div:not(.hp-img):not(.hp-thumb) { display: flex; flex-direction: column; gap: 0.3rem; }
338
+ .hp .hp-swipe h3, .hp .hp-swipe h4, .hp .hp-swipe > * > a {
339
+ font-family: var(--font-display);
340
+ font-weight: 400;
341
+ font-size: 1.1875rem;
342
+ line-height: 1.3;
343
+ }
344
+ .hp .hp-swipe > * > a { display: block; }
345
+ .hp .hp-swipe p { margin: 0; font-size: 0.9375rem; }
346
+ .hp .hp-swipe .hp-meta { order: 2; margin: 0; font-size: 0.8125rem; white-space: normal; }
347
+ .hp .hp-swipe a:focus-visible { outline-offset: 2px; }
348
+ .hp .hp-itins .hp-itin__len { font-size: 2rem; }
349
+
350
+ /* swipe rows must not size their parent columns */
351
+ .hp .hp-plan, .hp .hp-feed, .hp .hp-food, .hp .hp-out { grid-template-columns: minmax(0, 1fr); }
352
+ .hp .hp-plan > *, .hp .hp-feed > *, .hp .hp-food > *, .hp .hp-out > * { min-width: 0; }
353
+
354
+ .hp .hp-food__fig { display: none; }
355
+
356
+ .hp .hp-era { flex-basis: 82%; }
357
+
358
+ /* tours module: drop the panel chrome so the row can bleed */
359
+ .hp .hp-tours { background: none; border: 0; border-radius: 0; padding: 0; }
360
+ }
361
+ @media (prefers-reduced-motion: reduce) {
362
+ .hp a { transition: none; }
363
+ }
364
+
365
+ /* a grid item stretches to the row; keep the glyphs on the title's first line */
366
+ .hp .hp-rank .hp-mark { align-self: start; }
@@ -1,7 +1,7 @@
1
1
  // NeighborhoodHubPage's best-for filter: one Chip per value plus "all"; a press shows the rows (and locator points)
2
2
  // carrying that value. Chip state is written as data-active="true|false" and aria-pressed, never as classes. The
3
3
  // count line is re-announced through its aria-live region. Without this script every row stays visible and the
4
- // filter group stays hidden.
4
+ // filter group stays invisible: it keeps its space so revealing it does not shift the list (CLS).
5
5
  import { fill } from '../internal/fill.ts';
6
6
 
7
7
  export function rowMatches(tags: string, value: string): boolean {
@@ -18,7 +18,7 @@ function init(root: HTMLElement): void {
18
18
  const points = [...root.querySelectorAll<SVGGElement>('[data-locator-point]')];
19
19
  const status = root.querySelector<HTMLElement>('[data-hub-filter-status]');
20
20
  const template = status?.dataset.template ?? '';
21
- root.querySelector<HTMLElement>('[data-hub-filters]')?.removeAttribute('hidden');
21
+ root.querySelector<HTMLElement>('[data-hub-filters]')?.classList.remove('invisible');
22
22
  const apply = (value: string) => {
23
23
  chips.forEach((c) => {
24
24
  const on = (c.dataset.hubFilter ?? '') === value;
@@ -15,3 +15,6 @@ export type { CategoryFacetTone } from './CategoryFacetPage.astro';
15
15
  export { default as DetailBody } from './DetailBody.astro';
16
16
  export { bodyTocItems } from './detailBody.ts';
17
17
  export type { DetailBodyContent, DetailBodySection, TocItem } from './detailBody.ts';
18
+ export { default as TourismHomePage } from './TourismHomePage.astro';
19
+ export { formatSpan, eventName, eventPlace, eventEntry, selectHomeEvents, handLinkedHrefs, countWord } from './tourismHomeModel.ts';
20
+ export type * from './tourismHomeModel.ts';
@@ -0,0 +1,160 @@
1
+ // View model of TourismHomePage (SLA-3517): every string, href and image is resolved by the route; the template only lays it out.
2
+ import type { ImageMetadata } from 'astro';
3
+ import type { MarkKind, MarkLabels } from '../sections/marks.ts';
4
+
5
+ export type { MarkKind, MarkLabels };
6
+
7
+ export interface HomeLink { href: string; label: string }
8
+ export interface HomeHead { heading: string; intro?: string }
9
+
10
+ export interface HomeEssential {
11
+ mark: MarkKind;
12
+ title: string;
13
+ href: string;
14
+ /** HTML. */
15
+ why: string;
16
+ /** HTML. */
17
+ fact: string;
18
+ image?: ImageMetadata;
19
+ }
20
+
21
+ export interface HomeItineraryItem { length: string; title: string; href: string; text: string; image?: ImageMetadata }
22
+
23
+ export interface HomeMonth { label: string; href: string; ariaLabel: string; mark?: MarkKind; peak?: boolean }
24
+
25
+ /** A tickets entry's body: HTML strings, and `{ slot }` parts the route fills with a named slot (an affiliate link). */
26
+ export interface HomeTicket { href: string; title: string; parts: (string | { slot: string })[] }
27
+
28
+ export interface HomeTourItem { href: string; label: string; meta: string; image?: ImageMetadata }
29
+
30
+ export interface HomeCalendarRow { when: string; name: string; href: string; image?: ImageMetadata; place?: string; entry: string; seasonal?: boolean }
31
+
32
+ export interface HomeArticle { title: string; href: string; description: string; author: string; datetime: string; dateLabel: string; image?: ImageMetadata }
33
+
34
+ export interface HomeWriter { name: string; href: string; beat: string; photo?: ImageMetadata }
35
+
36
+ export interface HomeMonumentTip { title: string; href: string; image?: ImageMetadata; meta: string; tickets?: HomeLink; tipLead: string; /** HTML. */ tip: string }
37
+
38
+ export interface HomePerson { name: string; href: string; dates?: string; knownFor: string; portrait?: ImageMetadata; alt?: string }
39
+
40
+ export interface HomeEra { label: string; href: string; rangeLabel: string; hook: string; image?: ImageMetadata; people: HomePerson[] }
41
+
42
+ export interface HomeCardItem { title: string; href: string; text: string; image?: ImageMetadata }
43
+
44
+ export interface HomeMetaItem { label: string; href: string; meta: string; image?: ImageMetadata }
45
+
46
+ export interface HomeDish { name: string; href: string; line: string; image?: ImageMetadata }
47
+
48
+ export interface TourismHomeModel {
49
+ /** Mark names (key and aria-label); the English defaults apply when omitted. */
50
+ marks?: MarkLabels;
51
+ /** Between inline links and in article meta lines. */
52
+ separator?: string;
53
+ lead: {
54
+ heading: string;
55
+ standfirst: string;
56
+ links: HomeLink[];
57
+ jump: { ariaLabel: string; links: HomeLink[] };
58
+ photo: { image: ImageMetadata; alt: string; caption: string; sizes?: string };
59
+ };
60
+ essentials: { heading: string; keyAriaLabel: string; items: HomeEssential[] };
61
+ /** The route passes the `top-experiences` slot. */
62
+ topExperiences?: boolean;
63
+ itineraries: HomeHead & { carouselAriaLabel: string; items: HomeItineraryItem[]; more: HomeLink };
64
+ plan: HomeHead & {
65
+ when: { heading: string; monthsAriaLabel: string; months: HomeMonth[]; /** HTML. */ note: string };
66
+ tickets: { heading: string; items: HomeTicket[] };
67
+ tours: { heading: string; note: string; carouselAriaLabel: string; items: HomeTourItem[]; more: HomeLink };
68
+ };
69
+ /** Omitted when there is no upcoming event. */
70
+ events?: HomeHead & {
71
+ caption: string;
72
+ columns: { when: string; event: string; where: string; entry: string };
73
+ rows: HomeCalendarRow[];
74
+ links: HomeLink[];
75
+ };
76
+ /** Omitted when there is no article. */
77
+ articles?: HomeHead & {
78
+ lead: HomeArticle;
79
+ more: HomeArticle[];
80
+ moreAriaLabel: string;
81
+ all: HomeLink;
82
+ writers: { heading: string; all: HomeLink; items: HomeWriter[] };
83
+ };
84
+ monuments: HomeHead & { carouselAriaLabel: string; items: HomeMonumentTip[]; links: HomeLink[] };
85
+ history: HomeHead & {
86
+ carouselAriaLabel: string;
87
+ eras: HomeEra[];
88
+ context: { heading: string; items: { href: string; label: string; text: string }[] };
89
+ };
90
+ outings: HomeHead & {
91
+ walks: { heading: string; carouselAriaLabel: string; items: HomeMetaItem[]; more: HomeLink };
92
+ trips: { heading: string; carouselAriaLabel: string; items: HomeCardItem[] };
93
+ };
94
+ food: HomeHead & {
95
+ carouselAriaLabel: string;
96
+ feature: { image?: ImageMetadata; alt: string; caption: string };
97
+ dishes: HomeDish[];
98
+ wheres: { heading: string; /** Each an HTML string. */ items: string[] };
99
+ };
100
+ stay: HomeHead & {
101
+ carouselAriaLabel: string;
102
+ quarters: HomeCardItem[];
103
+ also: { label: string; items: HomeLink[]; comparison: HomeLink };
104
+ main: HomeLink;
105
+ /** HTML after the main link. */
106
+ extra: string;
107
+ };
108
+ /** The route passes the `booking` slot. */
109
+ booking?: boolean;
110
+ faq: { heading: string; items: { question: string; /** HTML. */ answer: string }[] };
111
+ }
112
+
113
+ const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
114
+ const parts = (iso: string) => {
115
+ const [y, m, d] = iso.split('-').map(Number);
116
+ return { y, m: MONTHS[m - 1], d };
117
+ };
118
+
119
+ const VALID_DAY = /^\d{4}-(0[1-9]|1[0-2])-\d{2}/;
120
+
121
+ /** "27–29 Oct 2026", "30 Oct – 2 Nov 2026" or "31 Dec 2026 – 2 Jan 2027"; '' for a malformed date. */
122
+ export function formatSpan(start: string, end?: string): string {
123
+ if (!VALID_DAY.test(start) || (end && !VALID_DAY.test(end))) return '';
124
+ const s = parts(start);
125
+ if (!end || end === start) return `${s.d} ${s.m} ${s.y}`;
126
+ const e = parts(end);
127
+ if (s.y !== e.y) return `${s.d} ${s.m} ${s.y} – ${e.d} ${e.m} ${e.y}`;
128
+ if (s.m !== e.m) return `${s.d} ${s.m} – ${e.d} ${e.m} ${e.y}`;
129
+ return `${s.d}–${e.d} ${e.m} ${e.y}`;
130
+ }
131
+
132
+ /** The event's name without parentheticals and a trailing year. */
133
+ export const eventName = (name: string) => name.replace(/\s*\([^)]*\)/g, '').replace(/\s+\d{4}$/, '').trim();
134
+ export const eventPlace = (location?: string) => location?.split(' (')[0].trim();
135
+ /** First sentence of the price, or `fallback` when there is none. */
136
+ export const eventEntry = (price: string | undefined, fallback: string) => (price ? price.split(/\.\s/)[0].replace(/\.$/, '') : fallback);
137
+
138
+ export interface DatedEvent { startDate?: string; endDate?: string }
139
+
140
+ /**
141
+ * The soonest event starting within `leadDays` of `todayIso` (or running now) is `seasonal`; the next `limit` after it
142
+ * are `calendar`. An event drops out by itself once it ends. Dates are `YYYY-MM-DD`.
143
+ */
144
+ export function selectHomeEvents<T extends DatedEvent>(events: readonly T[], todayIso: string, leadDays: number, limit = 9) {
145
+ const leadIso = new Date(Date.parse(todayIso) + leadDays * 86_400_000).toISOString().slice(0, 10);
146
+ const upcoming = events
147
+ .filter((e) => e.startDate && (e.endDate ?? e.startDate) >= todayIso)
148
+ .sort((a, b) => a.startDate!.localeCompare(b.startDate!));
149
+ const inSeason = (e: T) => e.startDate! <= leadIso;
150
+ const seasonal = upcoming.find(inSeason);
151
+ return { seasonal, calendar: upcoming.filter((e) => e !== seasonal).slice(0, limit), inSeason };
152
+ }
153
+
154
+ /** Every href in the given HTML strings (and the strings that are a bare path): what hand-written copy already links. */
155
+ export function handLinkedHrefs(strings: readonly string[]): Set<string> {
156
+ return new Set(strings.flatMap((s) => [...s.matchAll(/href="([^"]+)"/g)].map((m) => m[1]).concat(s.startsWith('/') ? [s] : [])));
157
+ }
158
+
159
+ const NUMBER_WORDS = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'];
160
+ export const countWord = (n: number) => NUMBER_WORDS[n] ?? String(n);