complète les pièces
This commit is contained in:
parent
dcd89d9825
commit
dbb11977fa
3 changed files with 54 additions and 63 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
// Import the necessary modules
|
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import PrimaryCTA from "@components/ui/buttons/PrimaryCTA.astro";
|
import PrimaryCTA from "@components/ui/buttons/PrimaryCTA.astro";
|
||||||
// Destructure the props passed to the Astro component
|
import { LightboxImage } from "@/components/LightboxImage";
|
||||||
|
|
||||||
const { title, subTitle, btnExists, btnTitle, btnURL, img, imgAlt } =
|
const { title, subTitle, btnExists, btnTitle, btnURL, img, imgAlt } =
|
||||||
Astro.props;
|
Astro.props;
|
||||||
// Define TypeScript interface for props
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
subTitle: string;
|
subTitle: string;
|
||||||
|
|
@ -21,14 +21,15 @@ interface Props {
|
||||||
<section
|
<section
|
||||||
class="mx-auto max-w-[85rem] items-center gap-8 px-4 py-10 sm:px-6 sm:py-16 md:grid md:grid-cols-2 lg:grid lg:grid-cols-2 lg:px-8 lg:py-14 xl:gap-16 2xl:max-w-full"
|
class="mx-auto max-w-[85rem] items-center gap-8 px-4 py-10 sm:px-6 sm:py-16 md:grid md:grid-cols-2 lg:grid lg:grid-cols-2 lg:px-8 lg:py-14 xl:gap-16 2xl:max-w-full"
|
||||||
>
|
>
|
||||||
<!-- The Image component which renders the image -->
|
<LightboxImage alt={imgAlt} image={img} client:idle >
|
||||||
<Image
|
<Image
|
||||||
class="w-full rounded-xl"
|
class="w-full rounded-xl"
|
||||||
src={img}
|
src={img}
|
||||||
alt={imgAlt}
|
alt={imgAlt}
|
||||||
draggable={"false"}
|
draggable={"false"}
|
||||||
format={"avif"}
|
format={"avif"}
|
||||||
/>
|
/>
|
||||||
|
</LightboxImage>
|
||||||
<!-- The container for title, subtitle, and optional CTA button -->
|
<!-- The container for title, subtitle, and optional CTA button -->
|
||||||
<div class="mt-4 md:mt-0">
|
<div class="mt-4 md:mt-0">
|
||||||
<!-- The title of the section -->
|
<!-- The title of the section -->
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
// Import the required modules
|
|
||||||
import { Image } from "astro:assets";
|
import { Image } from "astro:assets";
|
||||||
import PrimaryCTA from "@components/ui/buttons/PrimaryCTA.astro";
|
import PrimaryCTA from "@components/ui/buttons/PrimaryCTA.astro";
|
||||||
// Extract properties from Astro.props
|
import { LightboxImage } from "@components/LightboxImage";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
subTitle,
|
subTitle,
|
||||||
|
|
@ -15,7 +15,7 @@ const {
|
||||||
imgTwo,
|
imgTwo,
|
||||||
imgTwoAlt,
|
imgTwoAlt,
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
// Define TypeScript interface for the properties
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
subTitle: string;
|
subTitle: string;
|
||||||
|
|
@ -53,32 +53,36 @@ interface Props {
|
||||||
{
|
{
|
||||||
single ? (
|
single ? (
|
||||||
<div class="mt-8">
|
<div class="mt-8">
|
||||||
<!-- Single image -->
|
<LightboxImage client:idle alt={imgOneAlt} image={imgOne} >
|
||||||
<Image
|
<Image
|
||||||
class="w-full rounded-lg"
|
class="w-full rounded-lg"
|
||||||
src={imgOne}
|
src={imgOne}
|
||||||
alt={imgOneAlt}
|
alt={imgOneAlt}
|
||||||
format={"avif"}
|
format={"avif"}
|
||||||
/>
|
/>
|
||||||
|
</LightboxImage>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div class="mt-8 grid grid-cols-2 gap-4">
|
<div class="mt-8 grid grid-cols-2 gap-4">
|
||||||
<!-- First image in a two-image layout -->
|
<LightboxImage client:idle alt={imgOneAlt} image={imgOne} >
|
||||||
<Image
|
<Image
|
||||||
class="w-full rounded-xl"
|
class="w-full rounded-xl"
|
||||||
src={imgOne}
|
src={imgOne}
|
||||||
alt={imgOneAlt}
|
alt={imgOneAlt}
|
||||||
draggable={"false"}
|
draggable={"false"}
|
||||||
format={"avif"}
|
format={"avif"}
|
||||||
/>
|
/>
|
||||||
<!-- Second image in a two-image layout -->
|
</LightboxImage>
|
||||||
<Image
|
|
||||||
class="mt-4 w-full rounded-xl lg:mt-10"
|
<LightboxImage client:idle alt={imgTwoAlt} image={imgTwo} >
|
||||||
src={imgTwo}
|
<Image
|
||||||
alt={imgTwoAlt}
|
class="mt-4 w-full rounded-xl lg:mt-10"
|
||||||
draggable={"false"}
|
src={imgTwo}
|
||||||
format={"avif"}
|
alt={imgTwoAlt}
|
||||||
/>
|
draggable={"false"}
|
||||||
|
format={"avif"}
|
||||||
|
/>
|
||||||
|
</LightboxImage>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,11 +48,20 @@ const articles: Article[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
isRightSection: false,
|
isRightSection: false,
|
||||||
|
title: "Cuisine ouverte, toute équipée",
|
||||||
|
subTitle:
|
||||||
|
"Refaite en 2017, la cuisine allie plan de travail en bois et nombreux rangements. Elle est équipée de plaques à induction, d’une hotte et d’un four Bosch.",
|
||||||
|
img: photoSalonCheminee,
|
||||||
|
imgAlt: "Blueprints and digital tablet with construction plans.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
isRightSection: true,
|
||||||
title: "Chambre principale",
|
title: "Chambre principale",
|
||||||
subTitle:
|
subTitle:
|
||||||
"Our skilled craftsmen bring precision and excellence to every construction project. From minor installations to substantial structural work, ScrewFast offers reliable construction services to turn your plans into tangible outcomes. We ensure the highest standards of safety and workmanship, utilizing top-quality tools and materials from our extensive inventory.",
|
"Our skilled craftsmen bring precision and excellence to every construction project. From minor installations to substantial structural work, ScrewFast offers reliable construction services to turn your plans into tangible outcomes. We ensure the highest standards of safety and workmanship, utilizing top-quality tools and materials from our extensive inventory.",
|
||||||
img: photoParentale,
|
imgOne: photoParentale,
|
||||||
imgAlt: "Construction site before and after",
|
imgOneAlt: "Construction site before and after",
|
||||||
|
single: true,
|
||||||
btnExists: false,
|
btnExists: false,
|
||||||
btnTitle: "Learn More",
|
btnTitle: "Learn More",
|
||||||
btnURL: "#",
|
btnURL: "#",
|
||||||
|
|
@ -78,30 +87,7 @@ const articles: Article[] = [
|
||||||
imgOneAlt: "Construction workers orchestrating a project",
|
imgOneAlt: "Construction workers orchestrating a project",
|
||||||
imgTwo: photoChambreEnfantEst,
|
imgTwo: photoChambreEnfantEst,
|
||||||
imgTwoAlt: "Aerial view of managed construction",
|
imgTwoAlt: "Aerial view of managed construction",
|
||||||
},
|
}
|
||||||
{
|
|
||||||
isRightSection: false,
|
|
||||||
title: "Ensuring Long-lasting Performance",
|
|
||||||
subTitle:
|
|
||||||
"Our commitment to your project doesn't end at completion. ScrewFast offers ongoing maintenance and support services to ensure your construction's longevity and performance. From regular check-ups to emergency assistance, our responsive team is there to provide seamless support.",
|
|
||||||
img: usingTools,
|
|
||||||
imgAlt:
|
|
||||||
"Man in orange and black vest wearing white helmet holding yellow and black power tool",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
isRightSection: true,
|
|
||||||
title: "Crafting Bespoke Strategies for Unique Challenges",
|
|
||||||
subTitle:
|
|
||||||
"For our larger enterprise clients, ScrewFast offers custom solutions designed to meet specific industry challenges. By understanding your unique needs, we engineer tailored strategies aimed at optimizing your operations, enhancing efficiency, and driving your business forward.",
|
|
||||||
single: false,
|
|
||||||
imgOne: progressBuilding,
|
|
||||||
imgOneAlt: "In progress building structure",
|
|
||||||
imgTwo: underConstruction,
|
|
||||||
imgTwoAlt: "Brown and gray building under construction",
|
|
||||||
btnExists: true,
|
|
||||||
btnTitle: "Read more",
|
|
||||||
btnURL: "#",
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const pageTitle: string = `Pièces | ${SITE.title}`;
|
const pageTitle: string = `Pièces | ${SITE.title}`;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue