From 2840bfffb37fb7ef5723a17b873072883e77c2bf Mon Sep 17 00:00:00 2001 From: widgeter Date: Thu, 24 Aug 2023 21:49:27 +0200 Subject: [PATCH] Include a Brands widget --- src/components/widgets/Brands.astro | 36 ++++++++++++++++++++ src/pages/homes/startup.astro | 51 ++++++++++++++++++++++++++++- src/types.d.ts | 2 +- 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 src/components/widgets/Brands.astro diff --git a/src/components/widgets/Brands.astro b/src/components/widgets/Brands.astro new file mode 100644 index 0000000..6f576b4 --- /dev/null +++ b/src/components/widgets/Brands.astro @@ -0,0 +1,36 @@ +--- +import { Icon } from 'astro-icon/components'; +import type { Brands } from '~/types'; +import Headline from '~/components/ui/Headline.astro'; +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +const { + title = '', + subtitle = '', + tagline = '', + icons = [], + images = [], + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props as Brands; +--- + + + + +
+ {icons && icons.map((icon) => )} + { + images && + images.map( + (image) => + image.src && ( +
+ {image.alt +
+ ) + ) + } +
+
diff --git a/src/pages/homes/startup.astro b/src/pages/homes/startup.astro index 3162b0a..9dd26ad 100644 --- a/src/pages/homes/startup.astro +++ b/src/pages/homes/startup.astro @@ -9,6 +9,7 @@ import Features from '~/components/widgets/Features.astro'; import Stats from '~/components/widgets/Stats.astro'; import Features3 from '~/components/widgets/Features3.astro'; import FAQs from '~/components/widgets/FAQs.astro'; +import Brands from '~/components/widgets/Brands.astro'; const metadata = { title: 'Startup Landing Page', @@ -64,7 +65,8 @@ const metadata = { + + + + ; images?: Array; }