libreria-astro-lefebvre 0.1.95 → 0.1.96
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
|
@@ -4,10 +4,10 @@ export const metadata: ComponentMetadata = {
|
|
|
4
4
|
component_name: 'Grid_2026_Aldaia',
|
|
5
5
|
category: 'Contenido con listas',
|
|
6
6
|
name: 'Grid de cards con imagen, etiqueta, título y enlace "Más información" (4 columnas) 2026',
|
|
7
|
-
description: 'Bloque con título opcional (h2 centrado) y un grid de cards: 4 columnas en escritorio
|
|
7
|
+
description: 'Bloque con título opcional (h2 centrado) y un grid de cards: 4 columnas en escritorio y 2 en tablet, que crece en filas según el número de ítems; en móvil las cards se disponen en una fila con scroll horizontal y snap. Cada card muestra la imagen recortada a 154px de alto, una etiqueta en mayúsculas (fecha o keywords), el título y un enlace "Más información" con flecha; toda la card es clicable. Emite un ItemList en JSON-LD con los ítems',
|
|
8
8
|
framework: 'Astro',
|
|
9
9
|
priority: 1,
|
|
10
|
-
tags: ['grid', 'card', 'imagen', 'boletines', 'listado', 'enlace'],
|
|
10
|
+
tags: ['grid', 'card', 'carrusel', 'scroll', 'imagen', 'boletines', 'listado', 'enlace'],
|
|
11
11
|
fields: [
|
|
12
12
|
{
|
|
13
13
|
name: 'title',
|
|
@@ -40,7 +40,7 @@ export const metadata: ComponentMetadata = {
|
|
|
40
40
|
type: 'list',
|
|
41
41
|
label: 'Listado de cards',
|
|
42
42
|
mandatory: false,
|
|
43
|
-
help: 'Cards del bloque. Se muestran en un grid de 4 columnas en escritorio (a partir de la quinta card se crea una nueva fila), 2 en tablet y
|
|
43
|
+
help: 'Cards del bloque. Se muestran en un grid de 4 columnas en escritorio (a partir de la quinta card se crea una nueva fila), 2 en tablet, y en móvil en una fila con scroll horizontal',
|
|
44
44
|
items: {
|
|
45
45
|
type: 'object',
|
|
46
46
|
fields: [
|
|
@@ -47,11 +47,11 @@ const structuredData = `<script type="application/ld+json">
|
|
|
47
47
|
{title && title.trim() !== '' && (
|
|
48
48
|
<h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-8 md:mb-8 px-8" set:html={title}></h2>
|
|
49
49
|
)}
|
|
50
|
-
<ul class="list-none m-0 w-full
|
|
50
|
+
<ul class="aldaia-list list-none m-0 w-full flex gap-4 overflow-x-auto snap-x snap-mandatory px-8 scroll-px-8 pb-4 mt-4 md:grid md:grid-cols-2 lg:grid-cols-4 md:gap-8 md:overflow-visible md:pb-0 md:mt-0 lg:px-0">
|
|
51
51
|
{items.map((item: AldaiaItem) => {
|
|
52
52
|
const tag = etiquetaVisible === "fecha" ? item.fecha : item.keywords;
|
|
53
53
|
return (
|
|
54
|
-
<li class="w-
|
|
54
|
+
<li class="shrink-0 w-72 snap-start flex flex-col md:w-auto">
|
|
55
55
|
<article class="relative w-full h-full flex flex-col rounded-lg border border-gray-200 shadow-article hover:bg-gradient-to-r from-[#001978] via-[#2134F1] to-[#F81BBD] transition-all duration-300 p-px">
|
|
56
56
|
<div class="w-full h-full flex flex-col bg-white mt-px rounded-tl-[7px] rounded-tr-[7px] rounded-b-lg overflow-hidden">
|
|
57
57
|
<img class="w-full h-[154px] object-cover object-top" src={extractImageUrl(item.image)} alt={item.altImage ?? ''} width="400" height="154" loading="lazy" />
|
|
@@ -79,9 +79,16 @@ const structuredData = `<script type="application/ld+json">
|
|
|
79
79
|
.shadow-article {
|
|
80
80
|
box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
|
|
81
81
|
}
|
|
82
|
+
/* El SVG ya apunta a la derecha (8x15); el rotate(-90deg) del diseño lo dejaba apuntando hacia arriba. */
|
|
82
83
|
.chevron {
|
|
83
|
-
width:
|
|
84
|
-
height:
|
|
85
|
-
|
|
84
|
+
width: 7.5px;
|
|
85
|
+
height: 15px;
|
|
86
|
+
}
|
|
87
|
+
/* Carrusel en móvil: se navega con gesto/snap, sin barra de scroll visible. */
|
|
88
|
+
.aldaia-list {
|
|
89
|
+
scrollbar-width: none;
|
|
90
|
+
}
|
|
91
|
+
.aldaia-list::-webkit-scrollbar {
|
|
92
|
+
display: none;
|
|
86
93
|
}
|
|
87
94
|
</style>
|