From fcc2f4704e39b0e69b377cc138f75027721dac22 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 15:08:37 +0300 Subject: Initial template --- src/components/widgets/Hero.astro | 99 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/components/widgets/Hero.astro (limited to 'src/components/widgets/Hero.astro') diff --git a/src/components/widgets/Hero.astro b/src/components/widgets/Hero.astro new file mode 100644 index 0000000..cbd1154 --- /dev/null +++ b/src/components/widgets/Hero.astro @@ -0,0 +1,99 @@ +--- +import Image from '~/components/common/Image.astro'; +import Button from '~/components/ui/Button.astro'; + +import type { Hero as Props } from '~/types'; + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline, + + content = await Astro.slots.render('content'), + actions = await Astro.slots.render('actions'), + image = await Astro.slots.render('image'), + + id, + bg = await Astro.slots.render('bg'), +} = Astro.props; +--- + +
+ +
+
+
+
+ { + tagline && ( +

+ ) + } + { + title && ( +

+ ) + } +
+ { + subtitle && ( +

+ ) + } + { + actions && ( +

+ {Array.isArray(actions) ? ( + actions.map((action) => ( +
+
+ )) + ) : ( + + )} +
+ ) + } +
+ {content && } +

+
+ { + image && ( +
+ {typeof image === 'string' ? ( + + ) : ( + + )} +
+ ) + } +
+
+
+
-- cgit v1.2.3