libreria-astro-lefebvre 0.1.30 → 0.1.31
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/package.json +1 -1
- package/src/carbins/Hero_2025_Benidorm.ts +2 -1
- package/src/carbins/Hero_2026_Benidorm.ts +2 -1
- package/src/carbins/Tag_2025_Bolonia.ts +11 -0
- package/src/components/Astro/Hero_2025_Benidorm.astro +2 -2
- package/src/components/Astro/Hero_2026_Benidorm.astro +2 -2
- package/src/components/Astro/Tag_2025_Bolonia.astro +9 -6
package/package.json
CHANGED
|
@@ -108,7 +108,8 @@ export const metadata: ComponentMetadata = {
|
|
|
108
108
|
items: {
|
|
109
109
|
type: 'object',
|
|
110
110
|
fields: [
|
|
111
|
-
{ name: 'tag', type: 'text', help: 'Nombre del tag (texto corto, típicamente una categoría jurídica o temática)', label: 'Nombre del tag', example_value: 'IA Jurídica' }
|
|
111
|
+
{ name: 'tag', type: 'text', help: 'Nombre del tag (texto corto, típicamente una categoría jurídica o temática)', label: 'Nombre del tag', example_value: 'IA Jurídica' },
|
|
112
|
+
{ name: 'url', type: 'text', help: 'URL opcional de enlace del tag. Si se informa, el tag se renderiza como enlace; si se deja vacío, se muestra como texto plano', label: 'URL del tag (enlace)', example_value: 'https://www.lefebvre.es/tags/ia-juridica' }
|
|
112
113
|
]
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -108,7 +108,8 @@ export const metadata: ComponentMetadata = {
|
|
|
108
108
|
items: {
|
|
109
109
|
type: 'object',
|
|
110
110
|
fields: [
|
|
111
|
-
{ name: 'tag', type: 'text', help: 'Nombre del tag (texto corto, típicamente una categoría jurídica o temática)', label: 'Nombre del tag', example_value: 'IA Jurídica' }
|
|
111
|
+
{ name: 'tag', type: 'text', help: 'Nombre del tag (texto corto, típicamente una categoría jurídica o temática)', label: 'Nombre del tag', example_value: 'IA Jurídica' },
|
|
112
|
+
{ name: 'url', type: 'text', help: 'URL opcional de enlace del tag. Si se informa, el tag se renderiza como enlace; si se deja vacío, se muestra como texto plano', label: 'URL del tag (enlace)', example_value: 'https://www.lefebvre.es/tags/ia-juridica' }
|
|
112
113
|
]
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -19,6 +19,17 @@ export const metadata: ComponentMetadata = {
|
|
|
19
19
|
type: 'text',
|
|
20
20
|
example_value: ['IA Jurídica'],
|
|
21
21
|
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'tagsUrls',
|
|
25
|
+
type: 'list',
|
|
26
|
+
help: 'Listado de URLs de enlace para los tags, en el mismo orden que el campo "Listado de tags" (la posición N corresponde al tag N). Si una posición se deja vacía o no se informa, ese tag se muestra como texto plano sin enlace',
|
|
27
|
+
label: 'URLs de los tags (enlaces)',
|
|
28
|
+
mandatory: false,
|
|
29
|
+
items: {
|
|
30
|
+
type: 'text',
|
|
31
|
+
example_value: ['https://www.lefebvre.es/tags/ia-juridica'],
|
|
32
|
+
}
|
|
22
33
|
}
|
|
23
34
|
]
|
|
24
35
|
};
|
|
@@ -58,7 +58,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
58
58
|
full={true}
|
|
59
59
|
minutes={minutes}
|
|
60
60
|
/>
|
|
61
|
-
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} />
|
|
61
|
+
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
64
|
<div class="w-full h-[364px] md:h-auto items-start self-stretch bg-gray-300 bg-cover bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
|
|
@@ -85,7 +85,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
85
85
|
full={false}
|
|
86
86
|
minutes={minutes}
|
|
87
87
|
/>
|
|
88
|
-
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} />
|
|
88
|
+
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
@@ -45,7 +45,7 @@ const imageUrl = extractImageUrl(image);
|
|
|
45
45
|
minutes={minutes}
|
|
46
46
|
imageSize={48}
|
|
47
47
|
/>
|
|
48
|
-
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} />
|
|
48
|
+
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
<div class="w-full h-[364px] md:h-auto items-start self-stretch bg-gray-300 bg-cover bg-center bg-no-repeat" style={`background-image: url('${imageUrl}');`} ></div>
|
|
@@ -72,7 +72,7 @@ const imageUrl = extractImageUrl(image);
|
|
|
72
72
|
full={false}
|
|
73
73
|
minutes={minutes}
|
|
74
74
|
/>
|
|
75
|
-
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} />
|
|
75
|
+
<Tag_2025_Bolonia tags={itemsTagPost.map((item) => item.tag)} tagsUrls={itemsTagPost.map((item) => item.url)} />
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
78
|
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
4
|
tags = [],
|
|
5
|
+
tagsUrls = [], // Opcional: URLs en el mismo orden que tags. Si la posición está vacía/null, el tag no es enlace
|
|
5
6
|
} = Astro.props;
|
|
6
7
|
|
|
8
|
+
const tagClass = "inline-flex items-center px-4 py-1 rounded-2xl border border-[#B6B7BB] bg-[rgba(0,25,120,0.04)] hover:bg-[rgba(0,25,120,0.20)] font-inter text-sm text-[#363942] mr-1 mb-2 cursor-pointer";
|
|
9
|
+
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
<div class="flex flex-row flex-wrap items-center p-4">
|
|
11
|
-
{tags.map((tag: string) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
{tags.map((tag: string, index: number) => {
|
|
15
|
+
const url = tagsUrls?.[index];
|
|
16
|
+
return url
|
|
17
|
+
? <a href={url} class={tagClass}>{tag}</a>
|
|
18
|
+
: <span class={tagClass}>{tag}</span>;
|
|
19
|
+
})}
|
|
16
20
|
</div>
|
|
17
|
-
|