@sarimarcus/content-sites-tourism 0.70.0 → 0.71.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,26 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.71.0 (2026-11-14)
|
|
6
|
+
|
|
7
|
+
Additive (SLA-4167).
|
|
8
|
+
|
|
9
|
+
- `TourismHomePage` and `TourismItinerariesHub` render their month strips through `MonthStripNav`, which gains optional `flush` and `locale` props; its key renders only when `strip.keyLabel` is set. Model types are unchanged: no codemod, no site wiring change.
|
|
10
|
+
- `MonthStripNav` has no `<style>` block: it is rendered from the `./templates` barrel, so its rules live in `home.css`, which every route rendering a strip already imports. `package-consumer.mjs` probes that no month-strip rule reaches a page that imports the barrel without rendering a strip.
|
|
11
|
+
- Render-diff case `tests/fixtures/render-diff/sla-4167-month-strips.json`. Proof: 3 sites passed, 16 expected page differences each, structured data identical.
|
|
12
|
+
|
|
13
|
+
### Intended output changes
|
|
14
|
+
|
|
15
|
+
- `html:index.html` — the homepage month strip is wrapped in a `<nav>` carrying its aria-label.
|
|
16
|
+
- `html:itineraries.html` — the itineraries month strip is wrapped in the same `<nav>`, and its key no longer renders empty.
|
|
17
|
+
- `css:added` — the month-strip rules move into `home.css`.
|
|
18
|
+
- `turism-cordoba-en=html:plan/months.html` — the months index strip picks up the shared strip stylesheet.
|
|
19
|
+
- `turism-cordoba-en=html:plan/months/*.html` — each month guide's strip picks up the shared strip stylesheet.
|
|
20
|
+
- `turism-granada-en=html:discover/granada-in-*.html` — each month guide's strip picks up the shared strip stylesheet.
|
|
21
|
+
- `turism-granada-en=html:discover/granada-weather.html` — the weather page's strip picks up the shared strip stylesheet.
|
|
22
|
+
- `turism-cadiz-en=html:discover/cadiz-in-*.html` — each month guide's strip picks up the shared strip stylesheet.
|
|
23
|
+
- `turism-cadiz-en=html:discover/cadiz-weather.html` — the weather page's strip picks up the shared strip stylesheet.
|
|
24
|
+
|
|
5
25
|
## 0.70.0 (2026-11-14)
|
|
6
26
|
|
|
7
27
|
Additive (SLA-4152).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-tourism",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"description": "City-tourism vertical: city-entity components, pages templates and utilities for the tourism sites.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"astro": "^7.0.6",
|
|
42
42
|
"tailwindcss": "^4.1.18",
|
|
43
|
-
"@sarimarcus/content-sites-core": "0.
|
|
44
|
-
"@sarimarcus/content-sites-ui": "0.
|
|
43
|
+
"@sarimarcus/content-sites-core": "0.71.0",
|
|
44
|
+
"@sarimarcus/content-sites-ui": "0.71.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
import Mark from '../sections/Mark.astro';
|
|
3
3
|
import type { MonthStrip } from './tourismMonthGuideModel';
|
|
4
|
+
// No style block: rendered from the ./templates barrel, so its rules live in home.css (SLA-4167).
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/** The key renders only with `strip.keyLabel`. */
|
|
7
|
+
interface Props { strip: MonthStrip; flush?: boolean; locale?: string }
|
|
8
|
+
const { strip, flush = false, locale } = Astro.props;
|
|
7
9
|
const kinds = [...new Set(strip.items.flatMap((m) => (m.mark ? [m.mark] : [])))];
|
|
8
10
|
---
|
|
9
|
-
<nav class=
|
|
11
|
+
<nav class:list={['mg-strip', { 'mg-strip--flush': flush }]} aria-label={strip.label}>
|
|
10
12
|
<ol role="list" class="hp-months">
|
|
11
13
|
{strip.items.map((mo) => (
|
|
12
|
-
<li class:list={[{ 'is-peak': mo.peak, 'is-current': mo.current }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel} aria-current={mo.current ? 'page' : undefined}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={strip.marks?.[mo.mark]} decorative />}</a></li>
|
|
14
|
+
<li class:list={[{ 'is-peak': mo.peak, 'is-current': mo.current }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel} aria-current={mo.current ? 'page' : undefined}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={strip.marks?.[mo.mark]} decorative locale={locale} />}</a></li>
|
|
13
15
|
))}
|
|
14
16
|
</ol>
|
|
15
|
-
{kinds.length > 0 && strip.marks && (
|
|
17
|
+
{kinds.length > 0 && strip.marks && strip.keyLabel && (
|
|
16
18
|
<ul role="list" class="hp-key" aria-label={strip.keyLabel}>
|
|
17
|
-
{kinds.map((k) => <li><Mark kind={k} decorative />{strip.marks![k]}</li>)}
|
|
19
|
+
{kinds.map((k) => <li><Mark kind={k} decorative locale={locale} />{strip.marks![k]}</li>)}
|
|
18
20
|
</ul>
|
|
19
21
|
)}
|
|
20
22
|
</nav>
|
|
21
|
-
|
|
22
|
-
<style>
|
|
23
|
-
.mg-strip { margin-top: clamp(2rem, 4vw, 3rem); }
|
|
24
|
-
.mg-strip :global(.hp-months li.is-current) { background: var(--primary-strong); }
|
|
25
|
-
.mg-strip :global(.hp-months li.is-current a) { color: var(--background); font-weight: 600; }
|
|
26
|
-
.mg-strip :global(.hp-months li.is-current a:hover) { background: none; color: var(--background); }
|
|
27
|
-
.mg-strip :global(.hp-months li.is-current .hp-mark) { color: var(--background); }
|
|
28
|
-
</style>
|
|
@@ -13,6 +13,7 @@ import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
|
|
|
13
13
|
import { Container } from '@sarimarcus/content-sites-ui/layout';
|
|
14
14
|
import { Image } from 'astro:assets';
|
|
15
15
|
import Mark from '../sections/Mark.astro';
|
|
16
|
+
import MonthStripNav from './MonthStripNav.astro';
|
|
16
17
|
import { getLabels } from '../internal/labels';
|
|
17
18
|
import type { MarkKind } from '../sections/marks.ts';
|
|
18
19
|
import type { TourismHomeModel } from './tourismHomeModel.ts';
|
|
@@ -124,11 +125,7 @@ const showEntry = Boolean(events?.columns.entry);
|
|
|
124
125
|
<div class="hp-plan__main">
|
|
125
126
|
<div class="hp-plan__when">
|
|
126
127
|
<h3>{plan.when.heading}</h3>
|
|
127
|
-
<
|
|
128
|
-
{plan.when.months.map((mo) => (
|
|
129
|
-
<li class:list={[{ 'is-peak': mo.peak }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={marks[mo.mark]} decorative locale={locale} />}</a></li>
|
|
130
|
-
))}
|
|
131
|
-
</ol>
|
|
128
|
+
<MonthStripNav strip={{ label: plan.when.monthsAriaLabel, items: plan.when.months, marks }} flush locale={locale} />
|
|
132
129
|
<p set:html={plan.when.note} />
|
|
133
130
|
</div>
|
|
134
131
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ResponsiveImage } from '@sarimarcus/content-sites-ui/primitives';
|
|
3
3
|
import { CardCarousel } from '@sarimarcus/content-sites-ui/composed';
|
|
4
4
|
import { Container } from '@sarimarcus/content-sites-ui/layout';
|
|
5
|
-
import
|
|
5
|
+
import MonthStripNav from './MonthStripNav.astro';
|
|
6
6
|
import type { TourismItinerariesModel } from './tourismItinerariesModel';
|
|
7
7
|
|
|
8
8
|
interface Props { model: TourismItinerariesModel }
|
|
@@ -10,7 +10,6 @@ const { model } = Astro.props;
|
|
|
10
10
|
const { lead, stays, arrivals, trips, routes, plan, faq } = model;
|
|
11
11
|
const routeLead = routes.lead;
|
|
12
12
|
const tourLinks = plan?.tours ? await Promise.all(plan.tours.items.map((t) => Astro.slots.render(t.slot))) : [];
|
|
13
|
-
const markKinds = [...new Set((plan?.months ?? []).flatMap((m) => m.mark ? [m.mark] : []))];
|
|
14
13
|
const showDays = (i: { days?: string; name: string }) => i.days && !i.name.includes(i.days);
|
|
15
14
|
const slotHtml = async (name: string) => (Astro.slots.has(name) ? (await Astro.slots.render(name)).trim() : '');
|
|
16
15
|
const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq', 'after-faq'].map(slotHtml));
|
|
@@ -157,14 +156,7 @@ const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq',
|
|
|
157
156
|
<div class="hp-plan__main">
|
|
158
157
|
<div class="hp-plan__when">
|
|
159
158
|
<h3>{plan.monthsHeading}</h3>
|
|
160
|
-
<
|
|
161
|
-
{plan.months.map((mo) => (
|
|
162
|
-
<li class:list={[{ 'is-peak': mo.peak }]}><a class="hp-quiet" href={mo.href} aria-label={mo.ariaLabel}>{mo.label}{mo.mark && <Mark kind={mo.mark} label={plan.marks[mo.mark]} decorative />}</a></li>
|
|
163
|
-
))}
|
|
164
|
-
</ol>
|
|
165
|
-
<ul role="list" class="hp-key" aria-label={plan.keyLabel}>
|
|
166
|
-
{markKinds.map((k) => <li><Mark kind={k} decorative />{plan.marks[k]}</li>)}
|
|
167
|
-
</ul>
|
|
159
|
+
<MonthStripNav strip={{ label: plan.monthsHeading, items: plan.months, marks: plan.marks, keyLabel: plan.keyLabel }} flush />
|
|
168
160
|
<p set:html={plan.note} />
|
|
169
161
|
</div>
|
|
170
162
|
</div>
|
|
@@ -212,7 +204,7 @@ const [toc, tips, faqHtml, afterFaq] = await Promise.all(['toc', 'tips', 'faq',
|
|
|
212
204
|
.hp .itn-also { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted-foreground); }
|
|
213
205
|
.hp .itn-byline { margin-top: 1.25rem; }
|
|
214
206
|
.hp .itn-toc { padding-block: 1.5rem; }
|
|
215
|
-
.hp .hp-plan__when .hp-key { margin-bottom: 1rem; }
|
|
207
|
+
.hp .hp-plan__when :global(.hp-key) { margin-bottom: 1rem; }
|
|
216
208
|
.hp :global(.itn-tours) > div { padding-block: 0.75rem; border-top: var(--hp-rule); display: grid; gap: 0.125rem; }
|
|
217
209
|
.hp :global(.itn-tours a) { font-weight: 600; }
|
|
218
210
|
|
package/src/templates/home.css
CHANGED
|
@@ -119,6 +119,13 @@
|
|
|
119
119
|
.hp .hp-months li a:focus-visible { outline-offset: -2px; }
|
|
120
120
|
.hp .hp-months li:last-child { border-right: 0; }
|
|
121
121
|
.hp .hp-months li.is-peak { background: color-mix(in oklch, var(--primary) 9%, var(--background)); }
|
|
122
|
+
/* MonthStripNav */
|
|
123
|
+
.hp .mg-strip { margin-top: clamp(2rem, 4vw, 3rem); }
|
|
124
|
+
.hp .mg-strip--flush { margin-top: 0; }
|
|
125
|
+
.hp .mg-strip .hp-months li.is-current { background: var(--primary-strong); }
|
|
126
|
+
.hp .mg-strip .hp-months li.is-current a { color: var(--background); font-weight: 600; }
|
|
127
|
+
.hp .mg-strip .hp-months li.is-current a:hover { background: none; color: var(--background); }
|
|
128
|
+
.hp .mg-strip .hp-months li.is-current .hp-mark { color: var(--background); }
|
|
122
129
|
.hp .hp-plan__when p { max-width: 40rem; }
|
|
123
130
|
.hp .hp-tix > li { padding-block: 0.875rem; border-top: var(--hp-rule); }
|
|
124
131
|
.hp .hp-tix > li:last-child { border-bottom: var(--hp-rule); }
|