@sarimarcus/content-sites-tourism 0.31.1 → 0.31.3

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,17 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.31.3 (2026-10-08)
6
+
7
+ - `./cards`: `EventCard` renders on ui `EntityCard` (poster variant, `h-48 sm:h-56` media) with a ui `ArrowLabel` "Discover" CTA in place of the `Icon` arrow-right (svg gains `shrink-0`); props are unchanged. Intended output changes: the image gains the reduced-motion zoom cancel (`motion-reduce:group-hover:scale-100`), non-priority images no longer emit `fetchpriority="auto"`, and whitespace around the frame changes. Pages: `events` and `index` on both tourism sites and Granada's `neighborhood/` pages that rail EventCards (SLA-3019).
8
+ - `./cards`: `NeighborhoodCard` stays off EntityCard but takes its frame conventions: the card link gains the focus-visible ring (`ring-2 ring-primary ring-offset-2 rounded-xl`), `motion-reduce:group-hover:scale-100` cancels the image's hover zoom under `prefers-reduced-motion` (replacing the scoped `article img` transition rule; the attractions-panel rule stays), and non-priority images no longer emit `fetchpriority="auto"` (featured or index 0 keeps `"high"`). The dropped selector leaves the inline `<style>` of every page that bundles NeighborhoodCard's scoped CSS (137 Córdoba and 118 Granada pages whose markup is otherwise unchanged) (SLA-3019).
9
+ - `./sections`: `NeighborhoodHubHero` (badge) and `NeighborhoodCategory` (the `authentic` header) draw map-pin through ui `Icon`; the glyph takes Lucide's current map-pin outline at the same size and colour. Markup changes: `neighborhoods` on both tourism sites (hub hero badge and `authentic` header) (SLA-3019).
10
+
11
+ ## 0.31.2 (2026-10-08)
12
+
13
+ - `./cards`: `RestaurantCard`, `BarCard`, `MonumentCard`/`MuseumCard`, `DishCard` and `WalkCard` render on ui `EntityCard`; every card's props are unchanged and Monument, Dish and Restaurant keep `eager` default 1 and `priority`. Intended output changes: Restaurant, Monument/Museum and Dish non-priority images drop `fetchpriority="auto"` (the spec default); the first `WalkCard` gains `fetchpriority="high"`; Monument's scoped `<style>` and its cid attributes are gone (its reduced-motion zoom cancel, which did not stop Tailwind's `scale`, is replaced by EntityCard's); whitespace around the frame changes (SLA-3019).
14
+ - `./cards`: the hand-written arrow CTAs (Restaurant, Bar, Hotel, Dish) become ui `ArrowLabel` (svg gains `shrink-0`); map-pin (Restaurant, Bar, Monument, Hotel, Activity), euro, circle-dollar-sign and Activity's clock draw through ui `Icon` (map-pin takes Lucide's current outline; Hotel's landmark and Restaurant's budget glyph keep stroke 2.5); Restaurant, Bar and Hotel stars use ui `RatingStars` (Hotel's star attributes reorder). `NeighborhoodCard` stays off EntityCard; only its restaurant and hotel count glyphs become `Icon` utensils and bed. Pages: the restaurant, dish, bar, hotel, activity, monument/museum, walk and neighbourhood listings and their category/facet pages, `index`, and the `dish/`, `restaurant/`, `neighborhood/` and Córdoba `discover/` pages that rail these cards (SLA-3019).
15
+
5
16
  ## 0.31.1 (2026-10-08)
6
17
 
7
18
  - `FacetHero` (the Category, Neighborhood and Proximity facet pages) renders its breadcrumb strip through ui `<BreadcrumbBand ignore={false}>` instead of a hand-written copy; the output is byte-identical (SLA-3018).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.31.1",
3
+ "version": "0.31.3",
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",
@@ -36,7 +36,7 @@
36
36
  "peerDependencies": {
37
37
  "astro": "^7.0.6",
38
38
  "tailwindcss": "^4.1.18",
39
- "@sarimarcus/content-sites-core": "0.31.1",
40
- "@sarimarcus/content-sites-ui": "0.31.1"
39
+ "@sarimarcus/content-sites-core": "0.31.3",
40
+ "@sarimarcus/content-sites-ui": "0.31.3"
41
41
  }
42
42
  }
@@ -5,7 +5,7 @@
5
5
  * other visible string come from the site adapter, which also resolves the image, href and placeholder.
6
6
  */
7
7
  import type { ImageMetadata } from 'astro';
8
- import { ArrowLabel, Badge } from '@sarimarcus/content-sites-ui/primitives';
8
+ import { ArrowLabel, Badge, Icon } from '@sarimarcus/content-sites-ui/primitives';
9
9
  import { EntityCard } from '@sarimarcus/content-sites-ui/composed';
10
10
 
11
11
  export interface ActivityCardStrings {
@@ -98,18 +98,14 @@ const categoryColor = categoryColors[category] || 'bg-accent text-foreground';
98
98
  <div class="flex flex-wrap gap-3 text-sm text-muted-foreground mb-4">
99
99
  {duration && (
100
100
  <span class="inline-flex items-center gap-1.5">
101
- <svg class="w-3.5 h-3.5 text-accent-strong" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
102
- <circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />
103
- </svg>
101
+ <Icon name="clock" class="w-3.5 h-3.5 text-accent-strong" />
104
102
  <span class="sr-only">{strings.duration}</span>
105
103
  <span>{duration}</span>
106
104
  </span>
107
105
  )}
108
106
  {priceLabel && (
109
107
  <span class="inline-flex items-center gap-1.5">
110
- <svg class="w-3.5 h-3.5 text-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
111
- <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"/>
112
- </svg>
108
+ <Icon name="euro" class="w-3.5 h-3.5 text-accent" />
113
109
  <span class="sr-only">{strings.price}</span>
114
110
  <span>{priceLabel}</span>
115
111
  </span>
@@ -125,9 +121,7 @@ const categoryColor = categoryColors[category] || 'bg-accent text-foreground';
125
121
  )}
126
122
 
127
123
  <span slot="footer-meta" class="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
128
- <svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
129
- <path d="M12 22s-8-4.5-8-11.8A8 8 0 0 1 12 2a8 8 0 0 1 8 8.2c0 7.3-8 11.8-8 11.8z" /><circle cx="12" cy="10" r="3" />
130
- </svg>
124
+ <Icon name="map-pin" class="w-3.5 h-3.5" />
131
125
  <span class="sr-only">{strings.location}</span>
132
126
  {locationLabel}
133
127
  </span>
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  /**
3
- * BarCard — bar teaser. The category key picks the badge colour; its label, the feature labels and icons (sites store
4
- * different feature keys), the closing line and every other visible string come from the site adapter, which also
5
- * resolves the image, href and placeholder. The price pill renders only when the value is label-length.
3
+ * BarCard — bar teaser on the ui EntityCard frame (media variant). The category key picks the badge colour; its
4
+ * label, the feature labels and icons (sites store different feature keys), the closing line and every other visible
5
+ * string come from the site adapter, which also resolves the image, href and placeholder. The price pill renders only
6
+ * when the value is label-length.
6
7
  */
7
8
  import type { ImageMetadata } from 'astro';
8
- import { Badge, isBadgeLength, PRICE_LABEL_MAX, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
9
+ import { ArrowLabel, Badge, Icon, RatingStars, isBadgeLength, PRICE_LABEL_MAX } from '@sarimarcus/content-sites-ui/primitives';
10
+ import { EntityCard } from '@sarimarcus/content-sites-ui/composed';
9
11
  import type { CardRating } from './RestaurantCard.astro';
10
12
 
11
13
  export interface BarFeature {
@@ -78,142 +80,93 @@ const categoryColors: Record<string, { bg: string; text: string }> = {
78
80
  const categoryStyle = categoryColors[category] || { bg: 'bg-muted', text: 'text-muted-foreground' };
79
81
  ---
80
82
 
81
- <article class:list={['group relative bg-card rounded-xl overflow-hidden card-lift border border-border flex flex-col h-full', className]}>
82
- <a href={href} class="flex flex-col flex-1 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
83
- <div class="relative h-56 overflow-hidden img-placeholder shrink-0">
84
- {image ? (
85
- <ResponsivePicture
86
- src={image}
87
- alt={imageAlt}
88
- sizes="(max-width: 1023px) 100vw, 50vw"
89
- pictureAttributes={{ class: 'block w-full h-full' }}
90
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
91
- loading={index < 3 ? "eager" : "lazy"}
92
- fetchpriority={index === 0 ? "high" : undefined}
93
- decoding="async"
94
- />
95
- ) : (
96
- <img
97
- src={fallbackSrc}
98
- alt={imageAlt}
99
- width="320"
100
- height="192"
101
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
102
- loading={index < 3 ? "eager" : "lazy"}
103
- fetchpriority={index === 0 ? "high" : undefined}
104
- decoding="async"
105
- />
106
- )}
83
+ <EntityCard href={href} image={image} fallbackSrc={fallbackSrc} imageAlt={imageAlt} index={index} mediaClass="h-56" sizes="(max-width: 1023px) 100vw, 50vw" class={className}>
84
+ <Fragment slot="overlay">
85
+ <div class="absolute top-3 left-3">
86
+ <Badge tone="custom" toneClass={`${categoryStyle.bg} ${categoryStyle.text}`} size="lg" lines={0} class="shadow-md backdrop-blur-sm">
87
+ {categoryLabel}
88
+ </Badge>
89
+ </div>
107
90
 
108
- <div class="absolute top-3 left-3">
109
- <Badge tone="custom" toneClass={`${categoryStyle.bg} ${categoryStyle.text}`} size="lg" lines={0} class="shadow-md backdrop-blur-sm">
110
- {categoryLabel}
91
+ {isBadgeLength(priceLabel, PRICE_LABEL_MAX) && (
92
+ <div class="absolute bottom-3 left-3 max-w-[calc(100%-1.5rem)]">
93
+ <Badge tone="onImage" size="lg" lines={0} class="!px-2 !py-1">
94
+ <Icon name="euro" class="w-3 h-3 text-accent shrink-0" />{priceLabel}
111
95
  </Badge>
112
96
  </div>
97
+ )}
98
+ </Fragment>
113
99
 
114
- {isBadgeLength(priceLabel, PRICE_LABEL_MAX) && (
115
- <div class="absolute bottom-3 left-3 max-w-[calc(100%-1.5rem)]">
116
- <Badge tone="onImage" size="lg" lines={0} class="!px-2 !py-1">
117
- <svg class="w-3 h-3 text-accent shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
118
- <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"/>
119
- </svg>{priceLabel}
120
- </Badge>
121
- </div>
122
- )}
123
- </div>
124
-
125
- <div class="flex-1 p-4 sm:p-5 flex flex-col">
126
- <div class="flex-1">
127
- <div class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-1 sm:gap-2 mb-2">
128
- <h3
129
- class="text-lg sm:text-xl font-semibold text-card-foreground leading-tight font-display"
130
- >
131
- {name}
132
- </h3>
133
- {rating && (
134
- <div class="flex items-center gap-1.5">
135
- <div class="flex items-center gap-0.5" role="img" aria-label={rating.ariaLabel}>
136
- {[1, 2, 3, 4, 5].map((star) => (
137
- <svg
138
- class={`w-4 h-4 ${star <= Math.round(rating.value) ? 'text-accent fill-current' : 'text-muted fill-current'}`}
139
- aria-hidden="true"
140
- viewBox="0 0 24 24"
141
- >
142
- <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" />
143
- </svg>
144
- ))}
145
- </div>
146
- <span class="text-sm text-muted-foreground">{rating.text}</span>
147
- </div>
148
- )}
149
- </div>
150
-
151
- <p class="text-sm sm:text-base text-muted-foreground line-clamp-2 mb-3">
152
- {description}
153
- </p>
154
-
155
- {atmosphere && (
156
- <div class="mb-3">
157
- <span class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-muted/90 text-muted-foreground rounded">
158
- <svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
159
- <path d="M9 18V5l12-2v13M6 18c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm12 0c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z" />
160
- </svg>
161
- {atmosphere}
162
- </span>
163
- </div>
164
- )}
100
+ <div class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-1 sm:gap-2 mb-2">
101
+ <h3
102
+ class="text-lg sm:text-xl font-semibold text-card-foreground leading-tight font-display"
103
+ >
104
+ {name}
105
+ </h3>
106
+ {rating && (
107
+ <div class="flex items-center gap-1.5">
108
+ <RatingStars value={rating.value} ariaLabel={rating.ariaLabel} sizeClass="w-4 h-4" />
109
+ <span class="text-sm text-muted-foreground">{rating.text}</span>
110
+ </div>
111
+ )}
112
+ </div>
165
113
 
166
- {features.length > 0 && (
167
- <div class="flex flex-wrap gap-1.5 mb-4">
168
- {features.slice(0, 3).map((feature) => (
169
- <span class="inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-muted/90 text-muted-foreground rounded" title={feature.key}>
170
- {feature.iconPath && (
171
- <svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
172
- <path d={feature.iconPath} />
173
- </svg>
174
- )}
175
- {feature.label}
176
- </span>
177
- ))}
178
- {featuresMoreLabel && (
179
- <span class="inline-flex items-center px-2 py-0.5 text-xs bg-muted/60 text-muted-foreground rounded">
180
- {featuresMoreLabel}
181
- </span>
182
- )}
183
- </div>
184
- )}
114
+ <p class="text-sm sm:text-base text-muted-foreground line-clamp-2 mb-3">
115
+ {description}
116
+ </p>
185
117
 
186
- {tagLabels.length > 0 && (
187
- <div class="flex flex-wrap gap-1.5 mb-3">
188
- {tagLabels.map((label) => (
189
- <Badge tone="primary" size="sm">{label}</Badge>
190
- ))}
191
- </div>
192
- )}
193
- </div>
118
+ {atmosphere && (
119
+ <div class="mb-3">
120
+ <span class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-muted/90 text-muted-foreground rounded">
121
+ <svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
122
+ <path d="M9 18V5l12-2v13M6 18c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm12 0c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z" />
123
+ </svg>
124
+ {atmosphere}
125
+ </span>
126
+ </div>
127
+ )}
194
128
 
195
- <div class="flex items-center justify-between pt-3 border-t border-border">
196
- <div class="flex flex-col gap-1">
197
- <span class="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
198
- <svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
199
- <path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" /><circle cx="12" cy="10" r="3" />
129
+ {features.length > 0 && (
130
+ <div class="flex flex-wrap gap-1.5 mb-4">
131
+ {features.slice(0, 3).map((feature) => (
132
+ <span class="inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-muted/90 text-muted-foreground rounded" title={feature.key}>
133
+ {feature.iconPath && (
134
+ <svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
135
+ <path d={feature.iconPath} />
200
136
  </svg>
201
- {neighborhood}
202
- </span>
203
- {closingLabel && (
204
- <span class="text-sm text-muted-foreground">
205
- {closingLabel}
206
- </span>
207
137
  )}
208
- </div>
209
-
210
- <span class="inline-flex items-center gap-2 text-sm font-medium text-primary group-hover:text-primary-strong transition-colors">
211
- {ctaLabel}
212
- <svg class="w-4 h-4 transition-transform group-hover:translate-x-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
213
- <path d="M5 12h14" /><path d="m12 5 7 7-7 7" />
214
- </svg>
138
+ {feature.label}
215
139
  </span>
216
- </div>
140
+ ))}
141
+ {featuresMoreLabel && (
142
+ <span class="inline-flex items-center px-2 py-0.5 text-xs bg-muted/60 text-muted-foreground rounded">
143
+ {featuresMoreLabel}
144
+ </span>
145
+ )}
146
+ </div>
147
+ )}
148
+
149
+ {tagLabels.length > 0 && (
150
+ <div class="flex flex-wrap gap-1.5 mb-3">
151
+ {tagLabels.map((label) => (
152
+ <Badge tone="primary" size="sm">{label}</Badge>
153
+ ))}
217
154
  </div>
218
- </a>
219
- </article>
155
+ )}
156
+
157
+ <div slot="footer-meta" class="flex flex-col gap-1">
158
+ <span class="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
159
+ <Icon name="map-pin" class="w-3.5 h-3.5" />
160
+ {neighborhood}
161
+ </span>
162
+ {closingLabel && (
163
+ <span class="text-sm text-muted-foreground">
164
+ {closingLabel}
165
+ </span>
166
+ )}
167
+ </div>
168
+
169
+ <ArrowLabel slot="footer-cta" class="text-sm font-medium text-primary group-hover:text-primary-strong transition-colors">
170
+ {ctaLabel}
171
+ </ArrowLabel>
172
+ </EntityCard>
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  /**
3
- * DishCard — dish teaser. The category key picks the badge colour; the label, tags and every other visible string
4
- * come from the site adapter, which also resolves the image, href and placeholder.
3
+ * DishCard — dish teaser on the ui EntityCard frame (poster variant, no footer row: the CTA ends the body). The
4
+ * category key picks the badge colour; the label, tags and every other visible string come from the site adapter,
5
+ * which also resolves the image, href and placeholder.
5
6
  */
6
7
  import type { ImageMetadata } from 'astro';
7
- import { Badge, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
8
+ import { ArrowLabel, Badge } from '@sarimarcus/content-sites-ui/primitives';
9
+ import { EntityCard } from '@sarimarcus/content-sites-ui/composed';
8
10
 
9
11
  interface Props {
10
12
  href: string;
@@ -45,9 +47,6 @@ const {
45
47
  class: className,
46
48
  } = Astro.props;
47
49
 
48
- const fetchPriority = priority || index === 0 ? "high" : "auto";
49
- const loadingStrategy = index < eager ? "eager" : "lazy";
50
-
51
50
  // Contrast is AA for 12px text on every pairing.
52
51
  const categoryColors: Record<string, string> = {
53
52
  'starter': 'bg-primary text-overlay-foreground',
@@ -60,75 +59,42 @@ const categoryColor = categoryColors[category] || 'bg-accent text-foreground';
60
59
  const audienceLabels = tagLabels.slice(0, 3);
61
60
  ---
62
61
 
63
- <article class:list={['group relative bg-card rounded-xl overflow-hidden card-lift border border-border flex flex-col h-full', className]}>
64
- <a href={href} class="flex flex-col h-full focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
65
- <div class="relative h-56 overflow-hidden img-placeholder shrink-0">
66
- {image ? (
67
- <ResponsivePicture
68
- src={image}
69
- alt={imageAlt}
70
- sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
71
- pictureAttributes={{ class: 'block w-full h-full' }}
72
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
73
- loading={loadingStrategy}
74
- fetchpriority={fetchPriority}
75
- decoding="async"
76
- />
77
- ) : (
78
- <img
79
- src={fallbackSrc}
80
- alt={imageAlt}
81
- width="640"
82
- height="384"
83
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
84
- loading={loadingStrategy}
85
- fetchpriority={fetchPriority}
86
- decoding="async"
87
- />
88
- )}
89
-
90
- <div class="absolute top-3 left-3">
91
- <Badge tone="custom" toneClass={categoryColor} size="lg" lines={0}>
92
- {categoryLabel}
93
- </Badge>
94
- </div>
95
- </div>
96
-
97
- <div class="p-4 sm:p-5 flex flex-col flex-1">
98
- <h3
99
- class="text-xl font-semibold text-card-foreground mb-2 group-hover:text-primary transition-colors font-display"
100
- >
101
- {name}
102
- </h3>
62
+ <EntityCard variant="poster" mediaClass="h-56" fallbackWidth="640" fallbackHeight="384" footer={false} href={href} image={image} fallbackSrc={fallbackSrc} imageAlt={imageAlt} index={index} eager={eager} priority={priority} class={className}>
63
+ <div slot="overlay" class="absolute top-3 left-3">
64
+ <Badge tone="custom" toneClass={categoryColor} size="lg" lines={0}>
65
+ {categoryLabel}
66
+ </Badge>
67
+ </div>
103
68
 
104
- <p class="text-base text-muted-foreground line-clamp-3 mb-4">
105
- {description}
106
- </p>
69
+ <h3
70
+ class="text-xl font-semibold text-card-foreground mb-2 group-hover:text-primary transition-colors font-display"
71
+ >
72
+ {name}
73
+ </h3>
107
74
 
108
- {tags.length > 0 && (
109
- <div class="flex flex-wrap gap-1.5 mb-4">
110
- {tags.slice(0, 3).map((tag) => (
111
- <span class="px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded">
112
- {tag}
113
- </span>
114
- ))}
115
- </div>
116
- )}
75
+ <p class="text-base text-muted-foreground line-clamp-3 mb-4">
76
+ {description}
77
+ </p>
117
78
 
118
- {audienceLabels.length > 0 && (
119
- <div class="flex flex-wrap gap-1.5 mb-3">
120
- {audienceLabels.map((label) => (
121
- <Badge tone="primary" size="sm">{label}</Badge>
122
- ))}
123
- </div>
124
- )}
79
+ {tags.length > 0 && (
80
+ <div class="flex flex-wrap gap-1.5 mb-4">
81
+ {tags.slice(0, 3).map((tag) => (
82
+ <span class="px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded">
83
+ {tag}
84
+ </span>
85
+ ))}
86
+ </div>
87
+ )}
125
88
 
126
- <div class="flex items-center gap-2 text-sm font-medium text-primary group-hover:text-primary-strong transition-colors mt-auto">
127
- <span>{ctaLabel}</span>
128
- <svg class="w-4 h-4 transition-transform group-hover:translate-x-1" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
129
- <path d="M5 12h14" /><path d="m12 5 7 7-7 7" />
130
- </svg>
131
- </div>
89
+ {audienceLabels.length > 0 && (
90
+ <div class="flex flex-wrap gap-1.5 mb-3">
91
+ {audienceLabels.map((label) => (
92
+ <Badge tone="primary" size="sm">{label}</Badge>
93
+ ))}
132
94
  </div>
133
- </a>
134
- </article>
95
+ )}
96
+
97
+ <ArrowLabel class="text-sm font-medium text-primary group-hover:text-primary-strong transition-colors mt-auto">
98
+ {ctaLabel}
99
+ </ArrowLabel>
100
+ </EntityCard>
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  /**
3
3
  * EventCard — event teaser: period badge coloured by event type, UNESCO and free pills, dates, price, audience
4
- * badges. The site adapter resolves the href, the optimised image, the fallback, the alt text and the tag labels.
4
+ * badges, on the ui EntityCard frame (poster variant). The site adapter resolves the href, the optimised image, the
5
+ * fallback, the alt text and the tag labels.
5
6
  */
6
7
  import type { ImageMetadata } from 'astro';
7
- import { Badge, Icon, ResponsivePicture } from '@sarimarcus/content-sites-ui/primitives';
8
+ import { ArrowLabel, Badge, Icon } from '@sarimarcus/content-sites-ui/primitives';
9
+ import { EntityCard } from '@sarimarcus/content-sites-ui/composed';
8
10
 
9
11
  interface Props {
10
12
  href: string;
@@ -48,9 +50,6 @@ const {
48
50
  eager = 1,
49
51
  } = Astro.props;
50
52
 
51
- const fetchPriority = priority || index === 0 ? "high" : "auto";
52
- const loadingStrategy = index < eager ? "eager" : "lazy";
53
-
54
53
  const isUNESCO = tags.includes('unesco');
55
54
  const isFree = tags.includes('free') || price?.toLowerCase().includes('free');
56
55
 
@@ -63,97 +62,66 @@ const typeColors: Record<string, string> = {
63
62
  };
64
63
  const typeColor = typeColors[type] || 'bg-shadow text-chalk';
65
64
  const labels = tagLabels.slice(0, 3);
65
+ const typeLabels: Record<string, string> = { festival: 'Festival', feria: 'Feria', gastronomie: 'Gastronomy', religieux: 'Tradition' };
66
+ const typeLabel = typeLabels[type] ?? 'Event';
66
67
  ---
67
68
 
68
- <article class:list={['group relative bg-card rounded-xl overflow-hidden card-lift border border-border flex flex-col h-full', className]}>
69
- <a href={href} class="flex flex-col h-full focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
70
- <div class="relative h-48 sm:h-56 overflow-hidden img-placeholder shrink-0">
71
- {image ? (
72
- <ResponsivePicture
73
- src={image}
74
- alt={imageAlt}
75
- sizes="(max-width: 639px) 100vw, (max-width: 1023px) 50vw, 33vw"
76
- pictureAttributes={{ class: 'block w-full h-full' }}
77
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
78
- loading={loadingStrategy}
79
- fetchpriority={fetchPriority}
80
- decoding="async"
81
- />
82
- ) : (
83
- <img
84
- src={fallbackSrc}
85
- alt={imageAlt}
86
- width="400"
87
- height="224"
88
- class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"
89
- loading={loadingStrategy}
90
- fetchpriority={fetchPriority}
91
- decoding="async"
92
- />
93
- )}
94
-
95
- <div class="absolute top-3 right-3 max-w-[55%]">
96
- <Badge tone="custom" toneClass={`${typeColor} backdrop-blur-sm`} size="lg" lines={1}>{period}</Badge>
97
- </div>
69
+ <EntityCard variant="poster" mediaClass="h-48 sm:h-56" href={href} image={image} fallbackSrc={fallbackSrc} imageAlt={imageAlt} index={index} eager={eager} priority={priority} class={className}>
70
+ <div slot="overlay" class="absolute top-3 right-3 max-w-[55%]">
71
+ <Badge tone="custom" toneClass={`${typeColor} backdrop-blur-sm`} size="lg" lines={1}>{period}</Badge>
98
72
  </div>
99
73
 
100
- <div class="p-4 sm:p-5 flex flex-col flex-1">
101
- <span class="text-xs text-muted-foreground uppercase tracking-wider mb-1 block">{category}</span>
102
- <h3 class="text-lg sm:text-xl font-semibold text-foreground leading-tight font-display mb-2">
103
- {name}
104
- </h3>
74
+ <span class="text-xs text-muted-foreground uppercase tracking-wider mb-1 block">{category}</span>
75
+ <h3 class="text-lg sm:text-xl font-semibold text-foreground leading-tight font-display mb-2">
76
+ {name}
77
+ </h3>
105
78
 
106
- {(isUNESCO || isFree) && (
107
- <div class="flex flex-wrap gap-1.5 mb-3">
108
- {isUNESCO && (
109
- <Badge tone="custom" toneClass="bg-accent-strong/10 text-accent-strong" size="sm" lines={1}>
110
- <Icon name="star" filled class="w-3 h-3 inline-block align-[-1px] mr-1" aria-hidden="true" />UNESCO
111
- </Badge>
112
- )}
113
- {isFree && (
114
- <Badge tone="custom" toneClass="bg-secondary/10 text-secondary" size="sm" lines={1}>Free</Badge>
115
- )}
116
- </div>
117
- )}
118
-
119
- <p class="text-base text-muted-foreground line-clamp-2 mb-4">
120
- {description}
121
- </p>
122
-
123
- <div class="flex flex-wrap gap-3 text-sm text-shadow-light mb-4">
124
- {dates && (
125
- <span class="inline-flex items-center gap-1.5">
126
- <Icon name="calendar" class="w-3.5 h-3.5 text-primary" aria-hidden="true" />
127
- <span>{dates}</span>
128
- </span>
79
+ {(isUNESCO || isFree) && (
80
+ <div class="flex flex-wrap gap-1.5 mb-3">
81
+ {isUNESCO && (
82
+ <Badge tone="custom" toneClass="bg-accent-strong/10 text-accent-strong" size="sm" lines={1}>
83
+ <Icon name="star" filled class="w-3 h-3 inline-block align-[-1px] mr-1" aria-hidden="true" />UNESCO
84
+ </Badge>
129
85
  )}
130
- {price && (
131
- <span class="inline-flex items-center gap-1.5">
132
- <Icon name="credit-card" class="w-3.5 h-3.5 text-accent" aria-hidden="true" />
133
- <span>{price.split(',')[0]}</span>
134
- </span>
86
+ {isFree && (
87
+ <Badge tone="custom" toneClass="bg-secondary/10 text-secondary" size="sm" lines={1}>Free</Badge>
135
88
  )}
136
89
  </div>
90
+ )}
137
91
 
138
- {labels.length > 0 && (
139
- <div class="flex flex-wrap gap-1.5 mb-3">
140
- {labels.map((label: string) => (
141
- <Badge tone="primary" size="sm">{label}</Badge>
142
- ))}
143
- </div>
144
- )}
92
+ <p class="text-base text-muted-foreground line-clamp-2 mb-4">
93
+ {description}
94
+ </p>
145
95
 
146
- <div class="flex items-center justify-between pt-3 border-t border-border mt-auto">
147
- <span class="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
148
- <Icon name="calendar" class="w-3.5 h-3.5" aria-hidden="true" />
149
- {type === 'festival' ? 'Festival' : type === 'feria' ? 'Feria' : type === 'gastronomie' ? 'Gastronomy' : type === 'religieux' ? 'Tradition' : 'Event'}
96
+ <div class="flex flex-wrap gap-3 text-sm text-shadow-light mb-4">
97
+ {dates && (
98
+ <span class="inline-flex items-center gap-1.5">
99
+ <Icon name="calendar" class="w-3.5 h-3.5 text-primary" aria-hidden="true" />
100
+ <span>{dates}</span>
150
101
  </span>
151
-
152
- <span class="inline-flex items-center gap-2 text-sm font-medium text-primary group-hover:text-primary-strong transition-colors">
153
- Discover
154
- <Icon name="arrow-right" class="w-4 h-4 transition-transform group-hover:translate-x-1" aria-hidden="true" />
102
+ )}
103
+ {price && (
104
+ <span class="inline-flex items-center gap-1.5">
105
+ <Icon name="credit-card" class="w-3.5 h-3.5 text-accent" aria-hidden="true" />
106
+ <span>{price.split(',')[0]}</span>
155
107
  </span>
156
- </div>
108
+ )}
157
109
  </div>
158
- </a>
159
- </article>
110
+
111
+ {labels.length > 0 && (
112
+ <div class="flex flex-wrap gap-1.5 mb-3">
113
+ {labels.map((label: string) => (
114
+ <Badge tone="primary" size="sm">{label}</Badge>
115
+ ))}
116
+ </div>
117
+ )}
118
+
119
+ <span slot="footer-meta" class="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
120
+ <Icon name="calendar" class="w-3.5 h-3.5" aria-hidden="true" />
121
+ {typeLabel}
122
+ </span>
123
+
124
+ <ArrowLabel slot="footer-cta" class="text-sm font-medium text-primary group-hover:text-primary-strong transition-colors">
125
+ Discover
126
+ </ArrowLabel>
127
+ </EntityCard>