@sarimarcus/content-sites-tourism 0.31.2 → 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,12 @@
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
+
5
11
  ## 0.31.2 (2026-10-08)
6
12
 
7
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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-tourism",
3
- "version": "0.31.2",
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.2",
40
- "@sarimarcus/content-sites-ui": "0.31.2"
39
+ "@sarimarcus/content-sites-core": "0.31.3",
40
+ "@sarimarcus/content-sites-ui": "0.31.3"
41
41
  }
42
42
  }
@@ -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>
@@ -77,7 +77,7 @@ const badgeTones: Record<NeighborhoodBadgeTone, string> = {
77
77
  overlay: 'bg-overlay text-accent',
78
78
  };
79
79
 
80
- const fetchPriority = featured || index === 0 ? "high" : "auto";
80
+ const fetchPriority = featured || index === 0 ? "high" : undefined;
81
81
  const loadingStrategy = index < 2 ? "eager" : "lazy";
82
82
 
83
83
  const cardHeight = 'h-72 sm:h-80';
@@ -91,7 +91,7 @@ const cardHeight = 'h-72 sm:h-80';
91
91
  ]}
92
92
  data-neighborhood-card={slug}
93
93
  >
94
- <a href={href} class="block h-full">
94
+ <a href={href} class="block h-full focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 rounded-xl">
95
95
  <div class:list={['relative overflow-hidden img-placeholder', cardHeight]}>
96
96
  {image ? (
97
97
  <ResponsivePicture
@@ -99,7 +99,7 @@ const cardHeight = 'h-72 sm:h-80';
99
99
  alt={imageAlt}
100
100
  sizes="(max-width: 767px) 100vw, (max-width: 1023px) 50vw, 33vw"
101
101
  pictureAttributes={{ class: 'block w-full h-full' }}
102
- class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
102
+ class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 motion-reduce:group-hover:scale-100"
103
103
  loading={loadingStrategy}
104
104
  fetchpriority={fetchPriority}
105
105
  decoding="async"
@@ -110,7 +110,7 @@ const cardHeight = 'h-72 sm:h-80';
110
110
  alt={imageAlt}
111
111
  width="600"
112
112
  height="288"
113
- class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
113
+ class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110 motion-reduce:group-hover:scale-100"
114
114
  loading={loadingStrategy}
115
115
  fetchpriority={fetchPriority}
116
116
  decoding="async"
@@ -218,10 +218,6 @@ const cardHeight = 'h-72 sm:h-80';
218
218
 
219
219
  <style>
220
220
  @media (prefers-reduced-motion: reduce) {
221
- article img {
222
- transition: none !important;
223
- }
224
-
225
221
  article div[class*="translate-y"] {
226
222
  transition: none !important;
227
223
  }
@@ -3,6 +3,7 @@
3
3
  * NeighborhoodCategory — a thematic group of neighbourhood cards on the neighbourhoods hub, with a category-tinted
4
4
  * header. Cards go in the default slot. The site adapter supplies the title, description and count label.
5
5
  */
6
+ import { Icon } from '@sarimarcus/content-sites-ui/primitives';
6
7
 
7
8
  export type NeighborhoodCategoryType = 'historic' | 'authentic' | 'modern';
8
9
 
@@ -45,9 +46,8 @@ const categoryConfig: Record<NeighborhoodCategoryType, {
45
46
 
46
47
  const config = categoryConfig[category];
47
48
 
48
- const categoryIcons: Record<NeighborhoodCategoryType, string> = {
49
+ const categoryIcons: Record<Exclude<NeighborhoodCategoryType, 'authentic'>, string> = {
49
50
  'historic': 'M3 21h18M3 7v1a3 3 0 0 0 6 0V7m0 1a3 3 0 0 0 6 0V7m0 1a3 3 0 0 0 6 0V7M6 21V7m6 0v14m6-14v14M4 7h16M4 21h16',
50
- 'authentic': '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 M12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z',
51
51
  'modern': 'M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2 M18 14h-8M15 18h-5',
52
52
  };
53
53
  ---
@@ -60,9 +60,13 @@ const categoryIcons: Record<NeighborhoodCategoryType, string> = {
60
60
  <div class="mb-8 pb-6">
61
61
  <div class="flex items-start gap-4 mb-3">
62
62
  <div class:list={['flex-shrink-0 w-10 h-10 rounded-lg flex items-center justify-center', config.iconBg]}>
63
- <svg class:list={['w-5 h-5', config.accentColor]} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
64
- <path d={categoryIcons[category]} />
65
- </svg>
63
+ {category === 'authentic' ? (
64
+ <Icon name="map-pin" class={`w-5 h-5 ${config.accentColor}`} />
65
+ ) : (
66
+ <svg class:list={['w-5 h-5', config.accentColor]} viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
67
+ <path d={categoryIcons[category]} />
68
+ </svg>
69
+ )}
66
70
  </div>
67
71
 
68
72
  <div class="flex-1 min-w-0">
@@ -43,10 +43,7 @@ const {
43
43
  <div class="max-w-measure-wide mx-auto">
44
44
  <div class="space-y-6">
45
45
  <Badge tone="custom" toneClass="bg-overlay-foreground/10 text-overlay-foreground/90 backdrop-blur-sm border border-overlay-foreground/10" size="lg" lines={0} class="!px-4 !py-2 !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
- <path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" />
48
- <circle cx="12" cy="10" r="3" />
49
- </svg>
46
+ <Icon name="map-pin" class="w-4 h-4" />
50
47
  {badgeLabel}
51
48
  </Badge>
52
49