@sarimarcus/content-sites-tourism 0.33.0 → 0.34.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,10 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.34.0 (2026-10-12)
|
|
6
|
+
|
|
7
|
+
- `MonumentHero` and `QuartierHero` join `@sarimarcus/content-sites-tourism/sections` (SLA-3041), built on ui `ContentHero`. The site adapter resolves the optimized image, the placeholder, the copy and the directions link, and passes them as props.
|
|
8
|
+
|
|
5
9
|
## 0.33.0 (2026-10-12)
|
|
6
10
|
|
|
7
11
|
- `./templates` adds `DetailBody` (lede plus one anchored `<section>` per H2, with `data-guide-section` on the article when the body has no H2) and `bodyTocItems`, so an entity page's ToC and body come from one array. Additive; adopting it on Granada's detail routes is an intended layout change (SLA-3043).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sarimarcus/content-sites-tourism",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"astro": "^7.0.6",
|
|
37
37
|
"tailwindcss": "^4.1.18",
|
|
38
|
-
"@sarimarcus/content-sites-core": "0.
|
|
39
|
-
"@sarimarcus/content-sites-ui": "0.
|
|
38
|
+
"@sarimarcus/content-sites-core": "0.34.0",
|
|
39
|
+
"@sarimarcus/content-sites-ui": "0.34.0"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* MonumentHero — ContentHero for a monument: UNESCO badge, tag badges and the hours / fees / directions chips.
|
|
4
|
+
* The site adapter resolves the optimized image and the placeholder; the package never globs site assets.
|
|
5
|
+
*/
|
|
6
|
+
import { Badge } from '@sarimarcus/content-sites-ui/primitives';
|
|
7
|
+
import { ContentHero } from '@sarimarcus/content-sites-ui/layout';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
image?: ImageMetadata;
|
|
13
|
+
imageFallback?: string;
|
|
14
|
+
imagePlaceholder?: string;
|
|
15
|
+
hours?: string;
|
|
16
|
+
fees?: string;
|
|
17
|
+
/** Link of the directions chip; the chip is omitted without it. */
|
|
18
|
+
directionsHref?: string;
|
|
19
|
+
tags?: string[];
|
|
20
|
+
unescoLabel: string;
|
|
21
|
+
directionsLabel: string;
|
|
22
|
+
class?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
name,
|
|
27
|
+
description,
|
|
28
|
+
image,
|
|
29
|
+
imageFallback,
|
|
30
|
+
imagePlaceholder,
|
|
31
|
+
hours,
|
|
32
|
+
fees,
|
|
33
|
+
directionsHref,
|
|
34
|
+
tags = [],
|
|
35
|
+
unescoLabel,
|
|
36
|
+
directionsLabel,
|
|
37
|
+
class: className,
|
|
38
|
+
} = Astro.props;
|
|
39
|
+
|
|
40
|
+
const isUNESCO = tags.includes('unesco');
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<ContentHero
|
|
44
|
+
title={name}
|
|
45
|
+
description={description}
|
|
46
|
+
image={image}
|
|
47
|
+
imageFallback={imageFallback}
|
|
48
|
+
imagePlaceholder={imagePlaceholder}
|
|
49
|
+
imageAlt={name}
|
|
50
|
+
theme="dark"
|
|
51
|
+
class={className}
|
|
52
|
+
>
|
|
53
|
+
<Fragment slot="badges">
|
|
54
|
+
{isUNESCO && (
|
|
55
|
+
<Badge tone="custom" toneClass="bg-accent text-shadow" size="lg" lines={0} class="!py-1">
|
|
56
|
+
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
57
|
+
<path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z" />
|
|
58
|
+
</svg>
|
|
59
|
+
{unescoLabel}
|
|
60
|
+
</Badge>
|
|
61
|
+
)}
|
|
62
|
+
{tags.filter((t) => t !== 'unesco').slice(0, 3).map((tag) => (
|
|
63
|
+
<Badge tone="onImage" size="lg" lines={0} class="!py-1 ![font-weight:inherit]">
|
|
64
|
+
{tag}
|
|
65
|
+
</Badge>
|
|
66
|
+
))}
|
|
67
|
+
</Fragment>
|
|
68
|
+
<Fragment slot="info">
|
|
69
|
+
{hours && (
|
|
70
|
+
<div class="inline-flex items-center gap-2 px-4 py-2 bg-chalk/95 backdrop-blur-sm rounded-lg text-shadow">
|
|
71
|
+
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
72
|
+
<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />
|
|
73
|
+
</svg>
|
|
74
|
+
<span class="text-sm">{hours.split(',')[0]}</span>
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
{fees && (
|
|
78
|
+
<div class="inline-flex items-center gap-2 px-4 py-2 bg-chalk/95 backdrop-blur-sm rounded-lg text-shadow">
|
|
79
|
+
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
80
|
+
<path d="M4 10h12"/><path d="M4 14h9"/><path d="M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2"/>
|
|
81
|
+
</svg>
|
|
82
|
+
<span class="text-sm">{fees}</span>
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
85
|
+
{directionsHref && (
|
|
86
|
+
<a
|
|
87
|
+
href={directionsHref}
|
|
88
|
+
target="_blank"
|
|
89
|
+
class="inline-flex items-center gap-2 px-4 py-2 bg-primary/90 hover:bg-primary backdrop-blur-sm rounded-lg text-chalk transition-colors"
|
|
90
|
+
>
|
|
91
|
+
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
92
|
+
<polygon points="3 11 22 2 13 21 11 13 3 11" />
|
|
93
|
+
</svg>
|
|
94
|
+
<span class="text-sm">{directionsLabel}</span>
|
|
95
|
+
</a>
|
|
96
|
+
)}
|
|
97
|
+
</Fragment>
|
|
98
|
+
<Fragment slot="actions"><slot name="actions" /></Fragment>
|
|
99
|
+
</ContentHero>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* QuartierHero — ContentHero for a neighbourhood: badge and atmosphere tagline. The site adapter resolves the
|
|
4
|
+
* optimized image and the placeholder; the package never globs site assets.
|
|
5
|
+
*/
|
|
6
|
+
import { Badge } from '@sarimarcus/content-sites-ui/primitives';
|
|
7
|
+
import { ContentHero } from '@sarimarcus/content-sites-ui/layout';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
image?: ImageMetadata;
|
|
13
|
+
imageFallback?: string;
|
|
14
|
+
imagePlaceholder?: string;
|
|
15
|
+
atmosphere?: string;
|
|
16
|
+
badgeLabel: string;
|
|
17
|
+
imageAlt: string;
|
|
18
|
+
class?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
name,
|
|
23
|
+
description,
|
|
24
|
+
image,
|
|
25
|
+
imageFallback,
|
|
26
|
+
imagePlaceholder,
|
|
27
|
+
atmosphere,
|
|
28
|
+
badgeLabel,
|
|
29
|
+
imageAlt,
|
|
30
|
+
class: className,
|
|
31
|
+
} = Astro.props;
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
<ContentHero
|
|
35
|
+
title={name}
|
|
36
|
+
description={description}
|
|
37
|
+
image={image}
|
|
38
|
+
imageFallback={imageFallback}
|
|
39
|
+
imagePlaceholder={imagePlaceholder}
|
|
40
|
+
imageAlt={imageAlt}
|
|
41
|
+
theme="dark"
|
|
42
|
+
class={className}
|
|
43
|
+
>
|
|
44
|
+
<Fragment slot="badges">
|
|
45
|
+
<Badge tone="custom" toneClass="bg-primary/90 text-chalk backdrop-blur-sm" size="lg" lines={0} class="!py-1 ![font-weight:inherit] !gap-2">
|
|
46
|
+
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
47
|
+
<rect width="16" height="20" x="4" y="2" rx="2" ry="2" /><path d="M9 22v-4h6v4" /><path d="M8 6h.01" /><path d="M16 6h.01" /><path d="M12 6h.01" /><path d="M12 10h.01" /><path d="M12 14h.01" /><path d="M16 10h.01" /><path d="M16 14h.01" /><path d="M8 10h.01" /><path d="M8 14h.01" />
|
|
48
|
+
</svg>
|
|
49
|
+
{badgeLabel}
|
|
50
|
+
</Badge>
|
|
51
|
+
</Fragment>
|
|
52
|
+
{atmosphere && (
|
|
53
|
+
<p slot="subtitle" class="text-lg sm:text-xl text-accent italic">{atmosphere}</p>
|
|
54
|
+
)}
|
|
55
|
+
</ContentHero>
|
package/src/sections/index.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { default as HomeTripPlanner } from './HomeTripPlanner.astro';
|
|
|
12
12
|
export { default as MonumentBody } from './MonumentBody.astro';
|
|
13
13
|
export { default as MonumentBodySlot } from './MonumentBodySlot.astro';
|
|
14
14
|
export { default as ArticleCardGrid } from './ArticleCardGrid.astro';
|
|
15
|
+
export { default as MonumentHero } from './MonumentHero.astro';
|
|
16
|
+
export { default as QuartierHero } from './QuartierHero.astro';
|
|
15
17
|
export type { WalkStop } from './WalkStops.astro';
|
|
16
18
|
export type { WhoItsForTag } from './WhoItsFor.astro';
|
|
17
19
|
export type { NeighborhoodCategoryType } from './NeighborhoodCategory.astro';
|