From ebd1ec70cb9d9d8f081277506850c7c74538f765 Mon Sep 17 00:00:00 2001 From: widgeter Date: Mon, 7 Aug 2023 20:43:46 +0200 Subject: [PATCH] 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 = { + + + +