libreria-astro-lefebvre 0.1.66 → 0.1.68
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
|
@@ -144,7 +144,7 @@ export const metadata: ComponentMetadata = {
|
|
|
144
144
|
{
|
|
145
145
|
name: 'image',
|
|
146
146
|
type: 'image',
|
|
147
|
-
help: 'URL de la imagen principal. Solo se renderiza si "Mostrar imagen" está activado. Mutuamente exclusivo con el vídeo:
|
|
147
|
+
help: 'URL de la imagen principal. Solo se renderiza si "Mostrar imagen" está activado. Mutuamente exclusivo con el vídeo: si "URL del video" está relleno, se muestra el vídeo en su lugar',
|
|
148
148
|
label: 'Src de la imagen',
|
|
149
149
|
mandatory: false,
|
|
150
150
|
exclusive_group: 'media',
|
|
@@ -154,12 +154,12 @@ export const metadata: ComponentMetadata = {
|
|
|
154
154
|
{
|
|
155
155
|
name: 'iframeSrc',
|
|
156
156
|
type: 'video',
|
|
157
|
-
help: 'URL del vídeo MP4 lateral (se reproduce con autoplay, muted y loop). Solo se renderiza si "Mostrar imagen" está activado. Mutuamente exclusivo con la imagen:
|
|
157
|
+
help: 'URL del vídeo MP4 lateral (se reproduce con autoplay, muted y loop). Solo se renderiza si "Mostrar imagen" está activado. Mutuamente exclusivo con la imagen: si este campo está relleno, se muestra el vídeo; si está vacío, la imagen',
|
|
158
158
|
label: 'URL del video',
|
|
159
159
|
mandatory: false,
|
|
160
160
|
exclusive_group: 'media',
|
|
161
161
|
exclusive_group_label: 'Contenido multimedia',
|
|
162
|
-
example_value: '
|
|
162
|
+
example_value: ''
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
name: 'loading',
|
|
@@ -47,11 +47,10 @@ const imageSkyscraper = crops['skyscraper'] || ''; // Disponible para uso en el
|
|
|
47
47
|
// Fallback: si solo viene una URL directa, usar extractImageUrl.
|
|
48
48
|
// Si no hay imagen configurada, se muestra una imagen por defecto
|
|
49
49
|
const DEFAULT_IMAGE = 'https://assets.lefebvre.es/media/img/preview-comp/comp-w-4-3.png';
|
|
50
|
-
const hasImage = !!(imageBase || extractImageUrl(image));
|
|
51
50
|
const imageUrl = imageBase || extractImageUrl(image) || DEFAULT_IMAGE;
|
|
52
|
-
// Imagen y vídeo son excluyentes (toggle en Mecano): el
|
|
53
|
-
//
|
|
54
|
-
const videoUrl =
|
|
51
|
+
// Imagen y vídeo son excluyentes (toggle en Mecano): si el campo de vídeo
|
|
52
|
+
// está relleno se muestra el vídeo; si no, la imagen
|
|
53
|
+
const videoUrl = iframeSrc || '';
|
|
55
54
|
---
|
|
56
55
|
|
|
57
56
|
<section class="w-full flex items-center justify-center">
|