diff --git a/public/images/bks.png b/public/images/bks.png new file mode 100644 index 0000000..fbd19aa Binary files /dev/null and b/public/images/bks.png differ diff --git a/public/images/poignee.png b/public/images/poignee.png new file mode 100644 index 0000000..6864c1b Binary files /dev/null and b/public/images/poignee.png differ diff --git a/public/images/selle.png b/public/images/selle.png index d51945d..2996b53 100644 Binary files a/public/images/selle.png and b/public/images/selle.png differ diff --git a/src/components/global/TemplateConfig.astro b/src/components/global/TemplateConfig.astro index b55f87d..ee99d8d 100644 --- a/src/components/global/TemplateConfig.astro +++ b/src/components/global/TemplateConfig.astro @@ -1,7 +1,6 @@ --- -const { title, enderTitle, typeMotor, typeMotor1, description, price, images, pieces, logo, alt } = Astro.props; +const { title, enderTitle, typeMotor, typeMotor1, description, price, images, pieces, logo, alt, link } = Astro.props; import { ChevronDown, ChevronLeft, ChevronRight } from 'lucide-astro'; -import motor from '/public/images/motor.png'; import Picture from 'components/global/Picture.astro'; --- @@ -49,7 +48,7 @@ import Picture from 'components/global/Picture.astro'; )}
{typeMotor && ( - + moteur

{typeMotor}

{typeMotor1 && ( @@ -60,10 +59,12 @@ import Picture from 'components/global/Picture.astro';
-
-

Coût total :

-

{price}€

-
+ {price && ( +
+

Coût total :

+

{price}€

+
+ )}
{pieces && (
@@ -80,6 +81,11 @@ import Picture from 'components/global/Picture.astro'; )}
+ )} + {link &&( + + Consulter le site + )} diff --git a/src/libs/esthetique.ts b/src/libs/esthetique.ts new file mode 100644 index 0000000..9c3d51a --- /dev/null +++ b/src/libs/esthetique.ts @@ -0,0 +1,36 @@ +export const getCurrentEsthe = (esthetique: string | number) => configurations[esthetique] || configurations["bks"]; +const imagePrefix = "/images"; + +// Fonction de création de configuration +const createConfig = (title: string, logo: string, alt: string, description: string, link: string, images: any[]) => ({ + title, + logo, + alt, + description, + link, + images: images.map((image: any) => `${imagePrefix}/${image}`), +}); + +const configurations = { + "bks": createConfig( + "Bikes sellier", + `${imagePrefix}/bks.png`, + "housse de selle", + ` + Fabriquant français de housses de selles personnalisées
pour motos 50cc (Derbi, Rieju, Beta, Yamaha, MBK, Sherco, Aprilia, Honda...), kits déco, caches allumages et pièces imprimés en 3D.
Votre spécialiste de housse de selle 50cc totalement personnalisable et sur mesure, mousse de guidon personnalisées ainsi que des poignées personnalisable. + `, + "https://bikesellier.fr/", + ["selle.png", "poignee.png"], + ), + "test": createConfig( + "test", + `${imagePrefix}/bks.png`, + "housse de selle", + ` + Fabriquant français de housses de selles personnalisées
pour motos 50cc (Derbi, Rieju, Beta, Yamaha, MBK, Sherco, Aprilia, Honda...), kits déco, caches allumages et pièces imprimés en 3D.
Votre spécialiste de housse de selle 50cc totalement personnalisable et sur mesure, mousse de guidon personnalisées ainsi que des poignées personnalisable. + `, + "https://bikesellier.fr/", + ["selle.png", "poignee.png"], + ), +}; + diff --git a/src/libs/produit-outillage.ts b/src/libs/produit-outillage.ts index e24ba89..ead8c87 100644 --- a/src/libs/produit-outillage.ts +++ b/src/libs/produit-outillage.ts @@ -1,16 +1,16 @@ import { config } from 'libs/donner'; -export const getCurrentProduit = (produit) => configurations[produit] || configurations["nettoyant"]; +export const getCurrentProduit = (produits: string | number) => configurations[produits] || configurations["nettoyant"]; const imagePrefix = "/images"; // Fonction de création de configuration -const createConfig = (title, logo, alt, description, price, images) => ({ +const createConfig = (title: string, logo: string, alt: string, description: string, price: number | undefined, images: any[]) => ({ title, logo, alt, description, price, - images: images.map(image => `${imagePrefix}/${image}`), + images: images.map((image: any) => `${imagePrefix}/${image}`), }); const configurations = { diff --git a/src/pages/categorie/esthetique.astro b/src/pages/categorie/esthetique.astro index 014e7f5..a4534fb 100644 --- a/src/pages/categorie/esthetique.astro +++ b/src/pages/categorie/esthetique.astro @@ -34,7 +34,7 @@ import { MoveUp } from 'lucide-astro'; lien="" />
+