@@ -222,7 +222,7 @@ export default async function ArticlePage({ params }: { params: Promise<{ slug:
|
||||
|
||||
<section className="relative w-full h-[50vh] md:h-[70vh] flex items-end justify-center overflow-hidden bg-[#1D1D1F]">
|
||||
{article.coverImage && (
|
||||
<Image src={`/news/${article.coverImage}`} alt={article.title} fill className="object-cover object-center opacity-60" priority />
|
||||
<Image src={`/news/${slug}/${article.coverImage}`} alt={article.title} fill className="object-cover object-center opacity-60" priority />
|
||||
)}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-white via-white/80 dark:from-[#0A0A0C] dark:via-[#0A0A0C]/80 to-transparent" />
|
||||
|
||||
@@ -253,7 +253,7 @@ export default async function ArticlePage({ params }: { params: Promise<{ slug:
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{gallery.map((imgSrc: string, idx: number) => (
|
||||
<div key={idx} className={`relative rounded-3xl overflow-hidden bg-[#1D1D1F] border border-black/10 dark:border-white/10 ${idx === 0 && gallery.length % 2 !== 0 ? 'sm:col-span-2 h-64 md:h-96' : 'h-48 md:h-64'}`}>
|
||||
<Image src={`/news/${imgSrc}`} alt={`Gallery image ${idx + 1}`} fill className="object-cover hover:scale-105 transition-transform duration-700" />
|
||||
<Image src={`/news/${slug}/gallery/${imgSrc}`} alt={`Gallery image ${idx + 1}`} fill className="object-cover hover:scale-105 transition-transform duration-700" />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -54,7 +54,17 @@ export default async function PartsCatalogPage({
|
||||
const localized = getLocalizedData(part, locale);
|
||||
let coverImage = null;
|
||||
try { const media = JSON.parse(localized.mediaJson || "[]"); if (media.length > 0) coverImage = media[0]; } catch (e) {}
|
||||
return { id: localized.id, sku: localized.sku, title: localized.title, description: localized.description, price: localized.price, showPrice: localized.showPrice, coverImage };
|
||||
return {
|
||||
id: localized.id,
|
||||
sku: localized.sku,
|
||||
title: localized.title,
|
||||
description: localized.description,
|
||||
price: localized.price,
|
||||
showPrice: localized.showPrice,
|
||||
coverImage,
|
||||
mediaJson: localized.mediaJson, // ← AGREGAR
|
||||
specsJson: localized.specsJson, // ← AGREGAR
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user