@sarimarcus/content-sites-tourism 0.74.3 → 0.74.4
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,15 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.74.4 (2026-11-17)
|
|
6
|
+
|
|
7
|
+
Additive. No codemod; only a site rendering `TourismWhatsOnPage` sees a change (SLA-4311).
|
|
8
|
+
|
|
9
|
+
- `TourismWhatsOnPage`: "On now" runs render as image cards (venue image, title, span and venue, a two-line blurb) instead of a link list.
|
|
10
|
+
- Every timetable row shows its blurb, not only the lead row and festival teasers.
|
|
11
|
+
- External event links (title, tickets, official listing) open in a new tab (`target="_blank" rel="noopener"`).
|
|
12
|
+
- `WhatsOnRun` gains optional `blurb` and `image`; `buildWhatsOnModel` fills them (the image through `venueImage`).
|
|
13
|
+
|
|
5
14
|
## 0.74.3 (2026-11-17)
|
|
6
15
|
|
|
7
16
|
Additive. No codemod; only a site rendering `TourismWhatsOnPage` sees a change.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-tourism",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.4",
|
|
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.74.
|
|
44
|
-
"@sarimarcus/content-sites-ui": "0.74.
|
|
43
|
+
"@sarimarcus/content-sites-core": "0.74.4",
|
|
44
|
+
"@sarimarcus/content-sites-ui": "0.74.4"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -11,7 +11,8 @@ import type { WhatsOnModel } from './whatsOnModel.ts';
|
|
|
11
11
|
interface Props { model: WhatsOnModel }
|
|
12
12
|
const { model } = Astro.props;
|
|
13
13
|
const { head, checked, labels, runs, windows, regulars, months } = model;
|
|
14
|
-
|
|
14
|
+
// An external event page opens in a new tab; a site page keeps the visitor here.
|
|
15
|
+
const out = (external: boolean) => (external ? { target: '_blank', rel: 'noopener' } : {});
|
|
15
16
|
const slotAfter = ['after-window-1', 'after-window-2'].map((name) => (Astro.slots.has(name) ? name : undefined));
|
|
16
17
|
---
|
|
17
18
|
<main class="hp wo" data-whats-on data-tz={model.timezone}>
|
|
@@ -27,11 +28,15 @@ const slotAfter = ['after-window-1', 'after-window-2'].map((name) => (Astro.slot
|
|
|
27
28
|
<section class="hp-band hp-band--muted wo-runs" aria-labelledby="wo-runs-h" data-track-zone="runs">
|
|
28
29
|
<Container>
|
|
29
30
|
<h2 id="wo-runs-h" class="wo-runs__h">{runs.heading}</h2>
|
|
30
|
-
<ul role="list" class="wo-
|
|
31
|
+
<ul role="list" class="wo-cards">
|
|
31
32
|
{runs.items.map((r) => (
|
|
32
|
-
<li data-ends={r.endsOn}>
|
|
33
|
-
<
|
|
34
|
-
<
|
|
33
|
+
<li class="wo-card" data-ends={r.endsOn}>
|
|
34
|
+
{r.image && <span class="wo-card__img"><ResponsiveImage src={r.image.src} alt={r.image.alt} sizes="(min-width: 52rem) 22rem, 100vw" loading="lazy" /></span>}
|
|
35
|
+
<div class="wo-card__body">
|
|
36
|
+
<h3><a href={r.href} {...out(r.external)}>{r.title}</a></h3>
|
|
37
|
+
<p class="hp-meta">{r.span} · {r.venue}</p>
|
|
38
|
+
{r.blurb && <p class="wo-card__blurb">{r.blurb}</p>}
|
|
39
|
+
</div>
|
|
35
40
|
</li>
|
|
36
41
|
))}
|
|
37
42
|
</ul>
|
|
@@ -55,7 +60,7 @@ const slotAfter = ['after-window-1', 'after-window-2'].map((name) => (Astro.slot
|
|
|
55
60
|
<li class:list={['wo-row', { 'is-lead': r.lead }]} data-ends={r.endsOn} data-key={r.id}>
|
|
56
61
|
<span class="wo-row__time">{r.time ?? ''}</span>
|
|
57
62
|
<div class="wo-row__main">
|
|
58
|
-
<h3><a href={r.href}
|
|
63
|
+
<h3><a href={r.href} {...out(r.external)}>{r.title}</a></h3>
|
|
59
64
|
{r.lead && <span class="wo-pick">{labels.pick}</span>}
|
|
60
65
|
{r.until && <span class="hp-meta wo-until">{r.until}</span>}
|
|
61
66
|
{r.blurb && <p class="wo-row__blurb">{r.blurb}</p>}
|
|
@@ -69,8 +74,8 @@ const slotAfter = ['after-window-1', 'after-window-2'].map((name) => (Astro.slot
|
|
|
69
74
|
</div>
|
|
70
75
|
<p class="wo-row__price">
|
|
71
76
|
{r.free && <Badge tone="outline" size="sm" lines={0}>{labels.free}</Badge>}
|
|
72
|
-
{r.sourceHref && <a href={r.sourceHref}
|
|
73
|
-
{r.ticketsHref && <a href={r.ticketsHref}
|
|
77
|
+
{r.sourceHref && <a href={r.sourceHref} {...out(true)}>{labels.source}</a>}
|
|
78
|
+
{r.ticketsHref && <a href={r.ticketsHref} {...out(true)}>{labels.tickets}{r.price ? ` · ${r.price}` : ''}</a>}
|
|
74
79
|
</p>
|
|
75
80
|
</div>
|
|
76
81
|
</li>
|
|
@@ -96,7 +101,7 @@ const slotAfter = ['after-window-1', 'after-window-2'].map((name) => (Astro.slot
|
|
|
96
101
|
<ul role="list" class="wo-reg">
|
|
97
102
|
{regulars.items.map((r) => (
|
|
98
103
|
<li data-ends={r.endsOn}>
|
|
99
|
-
<h3><a href={r.href}
|
|
104
|
+
<h3><a href={r.href} {...out(r.external)}>{r.title}</a></h3>
|
|
100
105
|
<p class="hp-meta">{r.recurrence ? `${r.recurrence} · ` : ''}{r.venue}</p>
|
|
101
106
|
</li>
|
|
102
107
|
))}
|
package/src/templates/home.css
CHANGED
|
@@ -399,14 +399,18 @@
|
|
|
399
399
|
|
|
400
400
|
/* What's on: day-by-day timetable (SLA-4223) */
|
|
401
401
|
.hp.wo [hidden] { display: none !important; }
|
|
402
|
-
.hp :is(.wo-row__main h3, .wo-reg h3) a, .hp :is(.wo-row__venue, .wo-row__price, .wo-
|
|
402
|
+
.hp :is(.wo-row__main h3, .wo-reg h3) a, .hp :is(.wo-row__venue, .wo-row__price, .wo-card h3) a { display: inline-flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; }
|
|
403
403
|
.hp .wo-lead { padding-bottom: 1.5rem; }
|
|
404
404
|
.hp .wo-checked { margin-top: 0.75rem; }
|
|
405
405
|
.hp .wo-band { position: sticky; top: var(--wo-sticky, var(--site-header-offset, 4rem)); z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin: 0 0 1rem; padding-block: 0.625rem; background: var(--background); border-bottom: var(--hp-rule); font-size: 1.25rem; }
|
|
406
406
|
.hp .wo-window { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
|
|
407
407
|
.hp .wo-empty { color: var(--muted-foreground); }
|
|
408
|
-
.hp .wo-
|
|
409
|
-
.hp .wo-
|
|
408
|
+
.hp .wo-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
|
|
409
|
+
.hp .wo-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: var(--hp-rule); border-radius: var(--radius); background: var(--background); }
|
|
410
|
+
.hp .wo-card__img { display: block; aspect-ratio: 16 / 9; background: var(--muted); }
|
|
411
|
+
.hp .wo-card__body { display: grid; align-content: start; gap: 0.25rem; padding: 0.875rem 1rem 1rem; }
|
|
412
|
+
.hp .wo-card h3 { font-size: 1.0625rem; }
|
|
413
|
+
.hp .wo-card__blurb { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-top: 0.25rem; font-size: 0.9375rem; }
|
|
410
414
|
.hp .wo-runs__h { font-size: 1rem; margin-bottom: 0.75rem; }
|
|
411
415
|
.hp .wo-days { display: grid; gap: 0; }
|
|
412
416
|
.hp .wo-day { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0 1rem; padding-block: 1rem; border-bottom: var(--hp-rule); }
|
|
@@ -20,7 +20,7 @@ export interface WhatsOnRow {
|
|
|
20
20
|
ticketsHref?: string;
|
|
21
21
|
/** The official listing of a free item whose title links to a site page. */
|
|
22
22
|
sourceHref?: string;
|
|
23
|
-
/**
|
|
23
|
+
/** What the event is: every row carries its blurb (a teaser when an `/event/` page owns the detail). */
|
|
24
24
|
blurb?: string;
|
|
25
25
|
lead: boolean;
|
|
26
26
|
/** Last day, ISO: the inline script hides the row once it is past. */
|
|
@@ -36,8 +36,13 @@ export interface WhatsOnDay { day: string; weekday: string; numeral: string; mon
|
|
|
36
36
|
|
|
37
37
|
export interface WhatsOnWindow { id: string; heading: string; range: string; days: WhatsOnDay[]; empty: string }
|
|
38
38
|
|
|
39
|
-
/** A multi-day item already under way, shown once with its span. */
|
|
40
|
-
export interface WhatsOnRun {
|
|
39
|
+
/** A multi-day item already under way, shown once as a card with its span. */
|
|
40
|
+
export interface WhatsOnRun {
|
|
41
|
+
id: string; title: string; href: string; external: boolean; span: string; venue: string; endsOn: string;
|
|
42
|
+
blurb?: string;
|
|
43
|
+
/** The venue page's image, when the site resolves one. */
|
|
44
|
+
image?: { src: ImageMetadata; alt: string };
|
|
45
|
+
}
|
|
41
46
|
|
|
42
47
|
/** A recurring item of the thin-week fallback. */
|
|
43
48
|
export interface WhatsOnRegular { id: string; title: string; href: string; external: boolean; recurrence: string; venue: string; endsOn?: string }
|
|
@@ -119,7 +124,7 @@ function toRow(it: AgendaItem, o: WhatsOnBuildOptions, locale: string, lead: boo
|
|
|
119
124
|
price: !free && it.priceFrom !== undefined && it.priceFrom > 0 ? o.labels.from.replace('{n}', String(it.priceFrom)) : undefined,
|
|
120
125
|
ticketsHref: free ? undefined : it.sourceUrl,
|
|
121
126
|
sourceHref: free && !link.external ? it.sourceUrl : undefined,
|
|
122
|
-
blurb:
|
|
127
|
+
blurb: it.blurb,
|
|
123
128
|
lead,
|
|
124
129
|
endsOn: last,
|
|
125
130
|
until: last > startDay(it) ? o.labels.until.replace('{day}', shortDay(last, locale)) : undefined,
|
|
@@ -176,7 +181,10 @@ export function buildWhatsOnModel(o: WhatsOnBuildOptions): Pick<WhatsOnModel, 'r
|
|
|
176
181
|
const regulars = thin ? o.items.filter((i) => i.kind === 'recurring' && !isExpired(i, today) && startDay(i) <= horizon.end) : [];
|
|
177
182
|
return {
|
|
178
183
|
runs: runs.length
|
|
179
|
-
? { heading: h.runs, items: runs.map((i) => ({
|
|
184
|
+
? { heading: h.runs, items: runs.map((i) => ({
|
|
185
|
+
id: i.id, title: i.title, ...target(i), span: rangeLabel({ start: startDay(i), end: lastDay(i) }, locale), venue: i.venue.name, endsOn: lastDay(i),
|
|
186
|
+
blurb: i.blurb, image: i.venue.href ? o.venueImage?.(i.venue.href) : undefined,
|
|
187
|
+
})) }
|
|
180
188
|
: undefined,
|
|
181
189
|
windows,
|
|
182
190
|
regulars: regulars.length
|