MAJ gestion des pages services

This commit is contained in:
sebvtl728
2025-10-26 15:38:17 +01:00
parent 82406fb046
commit f242bcc5d6
11 changed files with 1866 additions and 195 deletions
+31 -3
View File
@@ -27,18 +27,46 @@ const ServiceCinq = () => {
return <p>Chargement...</p>;
}
const getStoredValue = (key) =>
typeof window !== "undefined" ? window.localStorage.getItem(key) : null;
const storedHeroBackground = getStoredValue(`hero_bg_${pageId}`);
const storedHeroImage = getStoredValue(`hero_img_${pageId}`);
const heroBackground =
acfData?.hero_background ||
acfData?.background_hero ||
acfData?.hero_bg ||
storedHeroBackground ||
"linear-gradient(135deg, #050d1f 0%, #02050d 85%)";
const heroImage =
acfData?.hero_background_image ||
acfData?.hero_background_image_url ||
acfData?.hero_image_url ||
acfData?.hero_image ||
acfData?.image_hero ||
acfData?.img_hero_url ||
acfData?.img_hero ||
storedHeroImage ||
"https://picsum.photos/id/1026/1920/1080.webp";
const serviceDetails = {
// Hero
title: acfData?.titre_principal_tce || "Titre héros !", // ✅ Modifiable individuellement
subtitle: <span dangerouslySetInnerHTML={{ __html: acfData?.description_principal_tce || "Description, héros" }} />,
subtitle:
acfData?.description_principal_tce ||
"<p>Description, héros</p>",
image: "https://picsum.photos/id/1026/1920/1080.webp",
image: heroImage,
heroBackground,
ctaText: "En savoir plus",
ctaLink: "/contact",
// section 1
interestTitle: acfData?.second_titre_tce || "Titre interet", // ✅ Modifiable individuellement
description: <span dangerouslySetInnerHTML={{ __html: acfData?.second_description_tce || "Description interet" }} />,
description:
acfData?.second_description_tce || "<p>Description interet</p>",
// section 2
desirTitle: "Titre", // ✅ Modifiable individuellement