added text_alt for description of a image inside a image whit text
This commit is contained in:
parent
7e221be057
commit
3988683b4f
|
|
@ -27,6 +27,11 @@ const { images, class: className } = Astro.props;
|
||||||
src={image.image}
|
src={image.image}
|
||||||
alt={image.text}
|
alt={image.text}
|
||||||
/>
|
/>
|
||||||
|
{image.text_alt && (
|
||||||
|
<div class="text-sm text-white px-4 py-2 italic bg-black/50 absolute bottom-2 right-2 rounded">
|
||||||
|
{image.text_alt}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ const news = defineCollection({
|
||||||
tags: z.array(z.string()).optional().describe("News tags"),
|
tags: z.array(z.string()).optional().describe("News tags"),
|
||||||
gallery: z.array(z.object({
|
gallery: z.array(z.object({
|
||||||
image: image().optional(),
|
image: image().optional(),
|
||||||
text: z.string().optional()
|
text: z.string().optional(),
|
||||||
|
text_alt: z.string().optional(),
|
||||||
})).optional().nullable()
|
})).optional().nullable()
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,21 @@ title: 'El rol de Israel y el destino de las naciones en el panorama actual'
|
||||||
date: 2026-04-20
|
date: 2026-04-20
|
||||||
slug: 2026-04-20-el-rol-de-israel-y-el-destino-de-las-naciones-en-el-panorama-actual
|
slug: 2026-04-20-el-rol-de-israel-y-el-destino-de-las-naciones-en-el-panorama-actual
|
||||||
place: ''
|
place: ''
|
||||||
thumbnail: 'https://ik.imagekit.io/crpy/tr:w-1280/comunicado-1.webp'
|
thumbnail: 'https://ik.imagekit.io/crpy/tr:w-1280/Lake-Urmia_NASA.-2.webp'
|
||||||
tags: [Irán, Israel]
|
tags: [Irán, Israel]
|
||||||
gallery: [
|
gallery: [
|
||||||
{
|
{
|
||||||
image: 'https://ik.imagekit.io/crpy/tr:w-1280,h-900,cm-pad_resize,bg-blurred/comunicado-1.webp',
|
image: 'https://ik.imagekit.io/crpy/tr:w-1280,h-900,cm-pad_resize,bg-blurred/Lake-Urmia_NASA.-2.webp',
|
||||||
|
text_alt: 'Lake Urmia in Iran in 2020 (left) and 2023 (right), after being desiccated by drought. NASA'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: 'https://ik.imagekit.io/crpy/tr:w-1280,h-900,cm-pad_resize,bg-blurred/new-042226-2.jpg',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: 'https://ik.imagekit.io/crpy/tr:w-1280,h-900,cm-pad_resize,bg-blurred/new-042226-3.jpg',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: 'https://ik.imagekit.io/crpy/tr:w-1280,h-900,cm-pad_resize,bg-blurred/new-042226-4.jpg',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
---
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue