fixes ApplicationIMG2
Deploy to VPS / deploy (push) Has been cancelled

This commit is contained in:
2026-04-17 16:28:56 -05:00
parent 7fe1863c68
commit da5a2ce2a2
2 changed files with 13 additions and 3 deletions
+2 -2
View File
@@ -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>
+11 -1
View File
@@ -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
};
});
}