From fc13e8328a0cd5e81f8ec792c3273cf730375440 Mon Sep 17 00:00:00 2001 From: widgeter Date: Mon, 7 Aug 2023 18:56:09 +0200 Subject: [PATCH 1/3] Change images in the Features3 and Testimonials --- src/components/widgets/Content.astro | 22 +++------------------- src/components/widgets/Features3.astro | 22 ++++++++++++++++++++-- src/components/widgets/Testimonials.astro | 22 ++++++++++++++++------ src/pages/landing/mobile-app.astro | 18 +++++++++--------- src/types.d.ts | 8 +++++--- 5 files changed, 53 insertions(+), 39 deletions(-) diff --git a/src/components/widgets/Content.astro b/src/components/widgets/Content.astro index 8c3f678..7417285 100644 --- a/src/components/widgets/Content.astro +++ b/src/components/widgets/Content.astro @@ -1,23 +1,7 @@ --- import { Icon } from 'astro-icon/components'; import { Picture } from '@astrojs/image/components'; - -interface Item { - title: string; - description?: string; - icon?: string; -} - -export interface Props { - title?: string; - subtitle?: string; - tagline?: string; - content?: string; - items?: Array; - image?: string | any; // TODO: find HTMLElementProps - isReversed?: boolean; - isAfterContent?: boolean; -} +import type { Content } from '~/types'; const { title = await Astro.slots.render('title'), @@ -28,7 +12,7 @@ const { image = await Astro.slots.render('image'), isReversed = false, isAfterContent = false, -} = Astro.props; +} = Astro.props as Content; ---
@@ -95,7 +79,7 @@ const { widths={[400, 768]} sizes="(max-width: 768px) 100vw, 432px" aspectRatio="500:500" - {...image} + {...(image as any)} /> )} diff --git a/src/components/widgets/Features3.astro b/src/components/widgets/Features3.astro index 843652f..ea2575e 100644 --- a/src/components/widgets/Features3.astro +++ b/src/components/widgets/Features3.astro @@ -1,4 +1,5 @@ --- +import { Picture } from '@astrojs/image/components'; import Headline from '~/components/ui/Headline.astro'; import ItemGrid from '~/components/ui/ItemGrid.astro'; import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; @@ -22,8 +23,25 @@ const { -
- {image && image.src && {image.alt} +
- {image && image.src && ( - {image.alt} + {image && ( +
+ {typeof image === 'string' ? ( + + ) : ( + + )} +
)}
diff --git a/src/pages/landing/mobile-app.astro b/src/pages/landing/mobile-app.astro index 76348dc..1331c76 100644 --- a/src/pages/landing/mobile-app.astro +++ b/src/pages/landing/mobile-app.astro @@ -88,8 +88,8 @@ const metadata = { }, ]} image={{ - src: 'https://cdn.pixabay.com/photo/2023/07/18/21/40/astronaut-8135685_1280.jpg', - alt: 'Astronaut Image', + src: import('~/assets/images/colors.jpg'), + alt: 'Colorful Image', }} /> @@ -125,8 +125,8 @@ const metadata = { }, ]} image={{ - src: 'https://cdn.pixabay.com/photo/2023/07/22/19/25/ai-generated-8144026_1280.jpg', - alt: 'Features Image', + src: import('~/assets/images/caos.jpg'), + alt: 'Colorful Image', }} > @@ -168,8 +168,8 @@ const metadata = { }, ]} image={{ - src: 'https://cdn.pixabay.com/photo/2020/07/25/22/26/rocket-5438053_1280.jpg', - alt: 'Benefits Image', + src: import('~/assets/images/vintage.jpg'), + alt: 'Vintage Image', }} > @@ -188,7 +188,7 @@ const metadata = { name: 'Cary Kennedy', job: 'Film director', image: { - src: 'https://cdn.pixabay.com/photo/2023/07/22/19/25/ai-generated-8144026_1280.jpg', + src: import('~/assets/images/colors.jpg'), alt: 'Cary Kennedy Image', }, }, @@ -198,7 +198,7 @@ const metadata = { name: 'Josh Wilkinson', job: 'Product Manager', image: { - src: 'https://cdn.pixabay.com/photo/2023/07/18/21/40/astronaut-8135685_1280.jpg', + src: import('~/assets/images/vintage.jpg'), alt: 'Josh Wilkinson Image', }, }, @@ -208,7 +208,7 @@ const metadata = { name: 'Sidney Hansen', job: 'Decorator', image: { - src: 'https://cdn.pixabay.com/photo/2020/07/25/22/26/rocket-5438053_1280.jpg', + src: import('~/assets/images/caos.jpg'), alt: 'Sidney Hansen Image', }, }, diff --git a/src/types.d.ts b/src/types.d.ts index 963d00b..6361d53 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -149,7 +149,7 @@ export interface Testimonial { testimonial?: string; name?: string; job?: string; - image?: Image; + image?: string | unknown; } // COMPONENTS @@ -207,7 +207,7 @@ export interface Clients extends Headline, Widget { } export interface Features extends Headline, Widget { - image?: Image; + image?: string | unknown; video?: Video; items: Array; columns: number; @@ -235,8 +235,10 @@ export interface Steps extends Headline, Widget { } export interface Content extends Headline, Widget { - image?: string; + content?: string; + image?: string | unknown; items?: Array; columns?: number; isReversed?: boolean; + isAfterContent?: boolean; } From 9c18e021c2b2be8a8c6a670df5ddfe8df21ca54f Mon Sep 17 00:00:00 2001 From: widgeter Date: Mon, 7 Aug 2023 19:37:02 +0200 Subject: [PATCH 2/3] Include FAQ widget on mobile app page --- src/pages/landing/mobile-app.astro | 41 +++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/pages/landing/mobile-app.astro b/src/pages/landing/mobile-app.astro index 1331c76..9f0d04c 100644 --- a/src/pages/landing/mobile-app.astro +++ b/src/pages/landing/mobile-app.astro @@ -7,6 +7,7 @@ import CallToAction from '~/components/widgets/CallToAction.astro'; import Features3 from '~/components/widgets/Features3.astro'; import Content from '~/components/widgets/Content.astro'; import Testimonials from '~/components/widgets/Testimonials.astro'; +import FAQs from '~/components/widgets/FAQs.astro'; const metadata = { title: 'Mobile App Landing Page', @@ -221,6 +222,42 @@ const metadata = { }} /> + + + + +
+
+
+ - - Astro +
Tailwind CSS -
+ Get Started Now Be very surprised by these huge fake numbers you are seeing on this page. Don't From ebd1ec70cb9d9d8f081277506850c7c74538f765 Mon Sep 17 00:00:00 2001 From: widgeter Date: Mon, 7 Aug 2023 20:43:46 +0200 Subject: [PATCH 3/3] Modify stats widget and include on mobile-app page --- src/components/widgets/Stats.astro | 79 +++++++++++++----------------- src/pages/index.astro | 27 +++++----- src/pages/landing/mobile-app.astro | 11 +++++ src/pages/landing/startup.astro | 10 ++-- 4 files changed, 64 insertions(+), 63 deletions(-) diff --git a/src/components/widgets/Stats.astro b/src/components/widgets/Stats.astro index 9c1ae16..db52bef 100644 --- a/src/components/widgets/Stats.astro +++ b/src/components/widgets/Stats.astro @@ -1,57 +1,46 @@ --- -interface Item { - name: string; - value: string; -} - -export interface Props { - title?: string; - subtitle?: string; - tagline?: string; - items?: Array; -} +import { Stats } from '~/types'; +import WidgetWrapper from '../ui/WidgetWrapper.astro'; +import Headline from '../ui/Headline.astro'; +import { Icon } from 'astro-icon/components'; const { title = await Astro.slots.render('title'), subtitle = await Astro.slots.render('subtitle'), tagline, - items = [], -} = Astro.props; + stats = [], + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props as Stats; --- -
- { - (title || subtitle || tagline) && ( -
- {tagline && ( -

- {tagline} -

- )} - {title && ( -

- )} - {subtitle && ( -

- )} -

- ) - } -
+ + +
{ - items.map(({ name, value }) => ( -
-
- {value} + stats && + stats.map(({ amount, title, icon }) => ( +
+ {icon && ( +
+ +
+ )} + {amount && ( +
+ {amount} +
+ )} + {title && ( +
+ {title} +
+ )}
-

- {name} -

-
- )) + )) }
-
+
diff --git a/src/pages/index.astro b/src/pages/index.astro index 46a53b5..efd03f0 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -13,7 +13,7 @@ import Stats from '~/components/widgets/Stats.astro'; import CallToAction from '~/components/widgets/CallToAction.astro'; const metadata = { - title: "AstroWind — Free template for create a website with Astro + Tailwind CSS", + title: 'AstroWind — Free template for create a website with Astro + Tailwind CSS', dontUseTitleTemplate: true, }; --- @@ -28,15 +28,16 @@ const metadata = { > Free template for - Astro 2.0 + Tailwind CSS + Astro 2.0 + Tailwind CSS + AstroWind is a free, customizable and production-ready template for Astro 2.0 + + Tailwind CSS. - AstroWind: Production-ready. Suitable for Startups, - Small Business, Sass Websites, Professional Portfolios, Marketing Websites, Landing Pages & Blogs. + AstroWind: Production-ready. Suitable for + Startups, Small Business, Sass Websites, Professional Portfolios, Marketing Websites, Landing Pages & Blogs. @@ -120,8 +121,8 @@ const metadata = { >

Ad vix debet docendi

- Ne dicta praesent ocurreret has, diam theophrastus at pro. Eos etiam regione ut, persius eripuit quo id. Sit te euismod - tacimates. + Ne dicta praesent ocurreret has, diam theophrastus at pro. Eos etiam regione ut, persius eripuit quo id. Sit te + euismod tacimates.
@@ -311,11 +312,11 @@ const metadata = { diff --git a/src/pages/landing/mobile-app.astro b/src/pages/landing/mobile-app.astro index 9f0d04c..d919239 100644 --- a/src/pages/landing/mobile-app.astro +++ b/src/pages/landing/mobile-app.astro @@ -8,6 +8,7 @@ import Features3 from '~/components/widgets/Features3.astro'; import Content from '~/components/widgets/Content.astro'; import Testimonials from '~/components/widgets/Testimonials.astro'; import FAQs from '~/components/widgets/FAQs.astro'; +import Stats from '~/components/widgets/Stats.astro'; const metadata = { title: 'Mobile App Landing Page', @@ -178,6 +179,16 @@ const metadata = { + + + +