libreria-astro-lefebvre 0.1.40 → 0.1.42

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -48,6 +48,7 @@ export const metadata: ComponentMetadata = {
48
48
  { name: 'authorUrl', type: 'text', help: 'Url a la ficha del autor del contenido. Se incluye SIEMPRE en los datos estructurados (JSON-LD author). Si se deja vacío, no se emite autoría', label: 'Url del autor', example_value: 'https://lefebvre.es/genia-l/blog/autor/maria-garcia-lopez/' },
49
49
  { name: 'authorType', type: 'select', options: ['Person', 'Organization'], options_labels: ['Persona', 'Organización'], help: 'Tipo schema.org del autor en el JSON-LD. Usar "Organización" cuando el autor sea la propia entidad (p. ej. "Lefebvre"); en el resto de casos, "Persona". Default: Persona', label: 'Tipo de autor (SEO)', example_value: 'Person' },
50
50
  { name: 'datePublished', type: 'text', help: 'Fecha de publicación en formato ISO 8601 para los datos estructurados (JSON-LD datePublished). No se muestra visualmente. Ej: 2026-01-10T00:00:00.000Z', label: 'Fecha publicación (ISO)', example_value: '2026-01-10T00:00:00.000Z' },
51
+ { name: 'dateModified', type: 'text', help: 'Fecha de última modificación en formato ISO 8601 para los datos estructurados (JSON-LD dateModified). No se muestra visualmente. Si se deja vacía, no se emite. Ej: 2026-02-15T00:00:00.000Z', label: 'Fecha modificación (ISO)', example_value: '2026-02-15T00:00:00.000Z' },
51
52
  { name: 'keywords', type: 'text', help: 'Palabras clave reales para los datos estructurados (JSON-LD keywords), separadas por comas. Se muestran como badge si "Etiqueta visible" es Keywords', label: 'Keywords (SEO)', example_value: 'Legaltech, Contratos, IA' }
52
53
  ]
53
54
  }
@@ -36,23 +36,24 @@ const structuredData = `<script type="application/ld+json">
36
36
 
37
37
  <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 w-full px-8 md:px-0 md:pb-12">
38
38
  {items.map((item) => (
39
- <a href={item.link || '#'} class="w-full flex flex-col cursor-pointer px-0">
40
- <article class="w-full h-full flex flex-col rounded-lg border border-gray-200 items-center shadow-article hover:bg-gradient-to-r from-[#001978] via-[#2134F1] to-[#F81BBD] transition-all duration-300 p-[1px]">
39
+ <div class="w-full flex flex-col px-0">
40
+ <article class="relative w-full h-full flex flex-col rounded-lg border border-gray-200 items-center shadow-article hover:bg-gradient-to-r from-[#001978] via-[#2134F1] to-[#F81BBD] transition-all duration-300 p-[1px]">
41
41
  <div class="bg-white mt-[1px] rounded-tl-[7px] rounded-tr-[7px] w-full h-full">
42
42
  <div class="p-6 flex-grow flex flex-col">
43
43
  <div class="mt-2 flex items-center gap-2 flex-grow">
44
44
  <div class="flex flex-col text-[#262626] h-full">
45
- <h3 class="font-poppins text-2xl font-semibold leading-8 text-[#262626] text-center overflow-hidden text-ellipsis mb-2">{item.title}</h3>
45
+ <a href={item.link || '#'} class="cursor-pointer no-underline after:absolute after:inset-0 after:content-['']"><h3 class="font-poppins text-2xl font-semibold leading-8 text-[#262626] text-center overflow-hidden text-ellipsis mb-2">{item.title}</h3></a>
46
46
  </div>
47
47
  </div>
48
48
  </div>
49
49
  </div>
50
50
  <div class="bg-red-100 h-3"></div>
51
51
  </article>
52
- </a>
52
+ </div>
53
53
  ))}
54
54
  </div>
55
55
 
56
+
56
57
  <style>
57
58
  .shadow-article {
58
59
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
@@ -14,6 +14,7 @@ interface MontevideoItem {
14
14
  authorType?: 'Person' | 'Organization'; // tipo schema.org del autor en el JSON-LD
15
15
  description?: string;
16
16
  datePublished?: string; // ISO 8601, para JSON-LD
17
+ dateModified?: string; // ISO 8601, para JSON-LD (última modificación)
17
18
  keywords?: string; // keywords reales, para JSON-LD y para etiqueta visual
18
19
  }
19
20
 
@@ -46,7 +47,8 @@ const structuredData = `<script type="application/ld+json">
46
47
  "image": "${escapeJson(extractImageUrl(item.image))}"` : ""}${item.link ? `,
47
48
  "url": "${escapeJson(item.link)}"` : ""}${item.author ? `,
48
49
  "author": { "@type": "${item.authorType === 'Organization' ? 'Organization' : 'Person'}", "name": "${escapeJson(item.author)}", "url": "${escapeJson(item.authorUrl)}" }` : ""}${item.datePublished ? `,
49
- "datePublished": "${escapeJson(item.datePublished)}"` : ""}${item.keywords ? `,
50
+ "datePublished": "${escapeJson(item.datePublished)}"` : ""}${item.dateModified ? `,
51
+ "dateModified": "${escapeJson(item.dateModified)}"` : ""}${item.keywords ? `,
50
52
  "keywords": "${escapeJson(item.keywords)}"` : ""}
51
53
  }
52
54
  }`).join(',')}]