diff --git a/src/components/sections/features/FeaturesStatsAlt.astro b/src/components/sections/features/FeaturesStatsAlt.astro index 562dd8e..350e122 100644 --- a/src/components/sections/features/FeaturesStatsAlt.astro +++ b/src/components/sections/features/FeaturesStatsAlt.astro @@ -1,19 +1,17 @@ --- import { Image } from "astro:assets"; - import product5 from "../../../images/features-image.avif"; -// Define the variables to be used in the component -const title: string = "Why Choose ScrewFast?"; +// Define props from Astro +const { title, subTitle, benefits } = Astro.props; -const subTitle: string = - "Transform your ideas into tangible results with ScrewFast tools. Whether you're starting with a sketch on a napkin or diving into a comprehensive construction project, our tools are engineered to help you build with confidence."; +// Define TypeScript interface for props +interface Props { + title: string; + subTitle?: string; + benefits?: Array; +} -const benefits: string[] = [ - "Robust and reliable tools for long-lasting performance.", - "Innovative solutions tailored to modern construction needs.", - "Customer support dedicated to your project's success.", -]; // Define SVG marker to be used in the component const ListItemMarker: string = ``; --- @@ -34,23 +32,28 @@ const ListItemMarker: string = ` {title} -

- {subTitle} -

- - + + { + benefits && ( + + ) + } diff --git a/src/components/sections/landing/ClientsSection.astro b/src/components/sections/landing/ClientsSection.astro index 6a360f8..c8db347 100644 --- a/src/components/sections/landing/ClientsSection.astro +++ b/src/components/sections/landing/ClientsSection.astro @@ -5,7 +5,7 @@ const { title, subTitle } = Astro.props; // Define TypeScript interface for props interface Props { title: string; - subTitle: string; + subTitle?: string; } --- @@ -19,9 +19,13 @@ interface Props { > {title} -

- {subTitle} -

+ { + subTitle && ( +

+ {subTitle} +

+ ) + }
; starCount?: number; rating?: string; reviews?: string; @@ -50,16 +52,21 @@ interface Props { + {subTitle &&

{subTitle}

- + }
+ {primaryBtn && + } + {secondaryBtn && + }
@@ -70,22 +77,7 @@ interface Props {
- - - - + { avatars?.map(src => ) } @@ -103,11 +95,9 @@ interface Props {
- + { - Array(starCount) - .fill(0) - .map((_, i) => ) + Array(starCount).fill(0).map((_, i) => ) } diff --git a/src/components/sections/landing/HeroSectionAlt.astro b/src/components/sections/landing/HeroSectionAlt.astro index 09f44d8..b8877c8 100644 --- a/src/components/sections/landing/HeroSectionAlt.astro +++ b/src/components/sections/landing/HeroSectionAlt.astro @@ -8,12 +8,14 @@ const { title, subTitle, url } = Astro.props; // Define TypeScript interface for props interface Props { title: string; - subTitle: string; + subTitle?: string; url?: string; } --- -
+
-

- {subTitle} -

+ { + subTitle && ( +

+ {subTitle} +

+ ) + }
-
- -
+ { + url && ( +
+ +
+ ) + }
diff --git a/src/components/sections/testimonials/TestimonialsSectionAlt.astro b/src/components/sections/testimonials/TestimonialsSectionAlt.astro index 15f638b..90f9a0c 100644 --- a/src/components/sections/testimonials/TestimonialsSectionAlt.astro +++ b/src/components/sections/testimonials/TestimonialsSectionAlt.astro @@ -2,51 +2,23 @@ // Import AvatarTestimonialSection component for use in this module import AvatarTestimonialSection from "../../ui/avatars/AvatarTestimonialSection.astro"; -// Set title for the testimonial section -const title: string = "What Our Customers Say"; +// Define props from Astro +const { title, testimonials } = Astro.props; -// Type definition for each testimonial -type Testimonial = { +// Define TypeScript interface for Testimonial +interface Testimonial { content: string; author: string; role: string; avatarSrc: string; avatarAlt: string; -}; +} -// Testimonial data that will be rendered in the component -const testimonials: Testimonial[] = [ - // First testimonial data - { - content: - " \"Since switching to ScrewFast's hardware tools, the efficiency on our construction sites has skyrocketed. The durability of the hex bolts and precision of the machine screws are simply unmatched. It's refreshing to work with a company that truly understands the daily demands of the industry.\" ", - author: "Jason Clark", - role: "Site Foreman | TopBuild", - avatarSrc: - "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=1374&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", - avatarAlt: "Image Description", - }, - // Second testimonial data - { - content: - " \"As an interior designer, I'm always looking for high-quality materials and tools that help bring my visions to life. ScrewFast's mixed screws assortment has been a game-changer for my projects, providing the perfect blend of quality and variety. The outstanding customer support was just the cherry on top!\" ", - author: "Maria Gonzalez", - role: "Interior Designer | Creative Spaces", - avatarSrc: - "https://images.unsplash.com/photo-1544005313-94ddf0286df2?q=80&w=1376&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D8&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", - avatarAlt: "Image Description", - }, - // Third testimonial data - { - content: - " \"I’ve been a professional carpenter for over 15 years, and I can sincerely say that ScrewFast’s tap bolts and nuts are some of the best I've used. They grip like no other, and I have full confidence in every joint and fixture. Plus, the service is impeccable – they truly care about my project's success.\" ", - author: "Richard Kim", - role: "Master Carpenter | WoodWright", - avatarSrc: - "https://images.unsplash.com/photo-1474176857210-7287d38d27c6?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D8&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", - avatarAlt: "Image Description", - }, -]; +// Define TypeScript interface for props +interface Props { + title: string; + testimonials: Testimonial[]; +} ---
= [ + "https://images.unsplash.com/photo-1568602471122-7832951cc4c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2&w=300&h=300&q=80", + "https://images.unsplash.com/photo-1531927557220-a9e23c1e4794?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2&w=300&h=300&q=80", + "https://images.unsplash.com/photo-1541101767792-f9b2b1c4f127?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&&auto=format&fit=facearea&facepad=3&w=300&h=300&q=80", + "https://images.unsplash.com/photo-1492562080023-ab3db95bfbce?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2&w=300&h=300&q=80" +]; --- @@ -21,6 +28,7 @@ import FAQ from "../components/sections/FAQ.astro"; secondaryBtn="Contact Sales Team" secondaryBtnURL="/contact" withReview={true} + avatars={avatarSrcs} rating=`4.8 / 5` starCount={4} reviews=`From Over 12.8k Reviews` diff --git a/src/pages/products/index.astro b/src/pages/products/index.astro index fe90da8..2ce725c 100644 --- a/src/pages/products/index.astro +++ b/src/pages/products/index.astro @@ -23,8 +23,41 @@ const product: CollectionEntry<"products">[] = ( const title: string = "Products"; const subTitle: string = "Explore the durability and precision of ScrewFast tools, designed for both professionals and enthusiasts. Each of our products is crafted with precision and built to last, ensuring you have the right tool for every job."; ---- +// Testimonial data that will be rendered in the component +const testimonials = [ + // First testimonial data + { + content: + " \"Since switching to ScrewFast's hardware tools, the efficiency on our construction sites has skyrocketed. The durability of the hex bolts and precision of the machine screws are simply unmatched. It's refreshing to work with a company that truly understands the daily demands of the industry.\" ", + author: "Jason Clark", + role: "Site Foreman | TopBuild", + avatarSrc: + "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=1374&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", + avatarAlt: "Image Description", + }, + // Second testimonial data + { + content: + " \"As an interior designer, I'm always looking for high-quality materials and tools that help bring my visions to life. ScrewFast's mixed screws assortment has been a game-changer for my projects, providing the perfect blend of quality and variety. The outstanding customer support was just the cherry on top!\" ", + author: "Maria Gonzalez", + role: "Interior Designer | Creative Spaces", + avatarSrc: + "https://images.unsplash.com/photo-1544005313-94ddf0286df2?q=80&w=1376&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D8&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", + avatarAlt: "Image Description", + }, + // Third testimonial data + { + content: + " \"I’ve been a professional carpenter for over 15 years, and I can sincerely say that ScrewFast’s tap bolts and nuts are some of the best I've used. They grip like no other, and I have full confidence in every joint and fixture. Plus, the service is impeccable – they truly care about my project's success.\" ", + author: "Richard Kim", + role: "Master Carpenter | WoodWright", + avatarSrc: + "https://images.unsplash.com/photo-1474176857210-7287d38d27c6?q=80&w=1470&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D8&auto=format&fit=facearea&facepad=2&w=320&h=320&q=80", + avatarAlt: "Image Description", + }, +]; +---
{title} - - + { + subTitle && ( + + ) + }
@@ -62,7 +96,18 @@ const subTitle: string =
- + - +