From 34707c15ef7d9755c2dfa1644337c305bd815cb2 Mon Sep 17 00:00:00 2001 From: widgeter Date: Mon, 28 Aug 2023 23:13:35 +0200 Subject: [PATCH] Include CTA component in Hero widgets --- src/components/widgets/Hero.astro | 39 ++++++++++++------------------ src/components/widgets/Hero2.astro | 38 ++++++++++++----------------- src/pages/homes/mobile-app.astro | 8 +++++- src/pages/homes/personal.astro | 7 +++++- src/pages/homes/saas.astro | 2 +- src/pages/homes/startup.astro | 7 +++++- src/pages/index.astro | 9 +++++-- src/pages/services.astro | 2 +- 8 files changed, 58 insertions(+), 54 deletions(-) diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro index 05e72cc..616adcb 100644 --- a/src/components/widgets/Hero.astro +++ b/src/components/widgets/Hero.astro @@ -1,6 +1,6 @@ --- -import { Icon } from 'astro-icon/components'; import Image from '~/components/common/Image.astro'; +import CTA from '../ui/CTA.astro'; const { title = await Astro.slots.render('title'), @@ -19,12 +19,14 @@ const {
- {tagline && ( -

- )} + { + tagline && ( +

+ ) + } { title && (

) : ( - - {callToAction?.icon && ( - <> - - - )} - {callToAction?.text} - +
+ +
)}

) @@ -60,15 +57,9 @@ const { {typeof callToAction2 === 'string' ? ( ) : ( - - {callToAction2?.icon && ( - <> - -   - - )} - {callToAction2.text} - +
+ +
)}
) diff --git a/src/components/widgets/Hero2.astro b/src/components/widgets/Hero2.astro index 2fbc87f..dcafae2 100644 --- a/src/components/widgets/Hero2.astro +++ b/src/components/widgets/Hero2.astro @@ -1,7 +1,7 @@ --- -import { Icon } from 'astro-icon/components'; import Image from '~/components/common/Image.astro'; import type { CallToAction } from '~/types'; +import CTA from '../ui/CTA.astro'; export interface Props { title?: string; @@ -30,12 +30,14 @@ const {
- {tagline && ( -

- )} + { + tagline && ( +

+ ) + } { title && (

) : ( - - {callToAction?.icon && ( - <> - {' '} - - )} - {callToAction?.text} - +
+ +
)}

) @@ -73,14 +70,9 @@ const { {typeof callToAction2 === 'string' ? ( ) : ( - - {callToAction2?.icon && ( - <> - {' '} - - )} - {callToAction2.text} - +
+ +
)}
) diff --git a/src/pages/homes/mobile-app.astro b/src/pages/homes/mobile-app.astro index aee5179..28a2c2b 100644 --- a/src/pages/homes/mobile-app.astro +++ b/src/pages/homes/mobile-app.astro @@ -19,7 +19,12 @@ const metadata = { - + I'm a Graphic Designer passionate about crafting visual stories.
With 5 years of experience and a degree from New York University's School of Design. I infuse vitality into brands and designs, transforming concepts into diff --git a/src/pages/homes/saas.astro b/src/pages/homes/saas.astro index 9d3315c..5c8dfcc 100644 --- a/src/pages/homes/saas.astro +++ b/src/pages/homes/saas.astro @@ -41,7 +41,7 @@ const metadata = { diff --git a/src/pages/index.astro b/src/pages/index.astro index d1e32d7..0486f52 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -22,7 +22,12 @@ const metadata = { @@ -320,7 +325,7 @@ const metadata = { title="Frequently Asked Questions" subtitle="Dive into the following questions to gain insights into the powerful features that AstroWind offers and how it can elevate your web development journey." tagline="FAQs" - classes={{ container: 'max-w-6xl'}} + classes={{ container: 'max-w-6xl' }} items={[ { title: 'Why AstroWind?', diff --git a/src/pages/services.astro b/src/pages/services.astro index d0b81ac..c7cb42a 100644 --- a/src/pages/services.astro +++ b/src/pages/services.astro @@ -18,7 +18,7 @@ const metadata = { tagline="Services" title="Elevate your projects with our stunning templates" subtitle="Explore our meticulously crafted templates tailored to various industries and purposes. From captivating presentations to functional website designs, we offer the tools you need to succeed." - callToAction={{ text: 'Start exploring', href: '/' }} + callToAction={{ targetBlank: true, text: 'Start exploring', href: '/' }} image={{ src: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80', alt: 'AstroWind Hero Image',