@sarimarcus/content-sites-tourism 0.52.0 → 0.53.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,14 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.53.0 (2026-10-29)
|
|
6
|
+
|
|
7
|
+
- `ArticleCardGrid`: card dates print the day only, in the site's `timeZone` (SLA-3590).
|
|
8
|
+
|
|
9
|
+
## 0.52.1 (2026-10-28)
|
|
10
|
+
|
|
11
|
+
- 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).
|
|
12
|
+
|
|
5
13
|
## 0.52.0 (2026-10-27)
|
|
6
14
|
|
|
7
15
|
- 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).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-tourism",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"astro": "^7.0.6",
|
|
40
40
|
"tailwindcss": "^4.1.18",
|
|
41
|
-
"@sarimarcus/content-sites-core": "0.
|
|
42
|
-
"@sarimarcus/content-sites-ui": "0.
|
|
41
|
+
"@sarimarcus/content-sites-core": "0.53.0",
|
|
42
|
+
"@sarimarcus/content-sites-ui": "0.53.0"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import type { ImageMetadata } from 'astro';
|
|
7
7
|
import { ArticleGrid } from '@sarimarcus/content-sites-ui/editorial';
|
|
8
8
|
import { isUpdatedAfterPublication } from '@sarimarcus/content-sites-core/articles';
|
|
9
|
+
import { formatDisplayDay } from '@sarimarcus/content-sites-core/dates';
|
|
9
10
|
import { routePath, url, type SiteRoutes } from '@sarimarcus/content-sites-core/url';
|
|
10
11
|
import { LABELS } from '../internal/labels';
|
|
11
12
|
|
|
@@ -36,15 +37,6 @@ interface Props {
|
|
|
36
37
|
|
|
37
38
|
const { articles, articleImages, timeZone = 'Europe/Madrid', readLabel = LABELS.articleCardGrid.readLabel, updatedLabel = LABELS.articleCardGrid.updatedLabel, routes, class: className = 'grid gap-6 sm:grid-cols-2 lg:grid-cols-3' } = Astro.props;
|
|
38
39
|
|
|
39
|
-
function formatCardDate(dateStr: string | undefined): string {
|
|
40
|
-
if (!dateStr) return '';
|
|
41
|
-
// Articles carry a real HH:MM, so show it here too instead of just the day.
|
|
42
|
-
const date = new Date(dateStr);
|
|
43
|
-
return dateStr.includes('T')
|
|
44
|
-
? date.toLocaleString('en-GB', { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', timeZone })
|
|
45
|
-
: date.toLocaleDateString('en-GB', { year: 'numeric', month: 'long', day: 'numeric', timeZone });
|
|
46
|
-
}
|
|
47
|
-
|
|
48
40
|
const items = articles.map(({ data: a }) => {
|
|
49
41
|
const updated = isUpdatedAfterPublication(a);
|
|
50
42
|
const dateTime = (updated ? a.dateModified : a.datePublished) ?? '';
|
|
@@ -56,7 +48,7 @@ const items = articles.map(({ data: a }) => {
|
|
|
56
48
|
image: articleImages[a.slug],
|
|
57
49
|
imageAlt: a.imageAlt,
|
|
58
50
|
dateTime,
|
|
59
|
-
dateLabel:
|
|
51
|
+
dateLabel: formatDisplayDay(dateTime, 'en-GB', timeZone),
|
|
60
52
|
updated,
|
|
61
53
|
};
|
|
62
54
|
});
|
|
@@ -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
|
|
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>
|
|
@@ -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
|
|
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]')?.
|
|
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;
|