diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 15:08:37 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-22 15:08:37 +0300 |
| commit | fcc2f4704e39b0e69b377cc138f75027721dac22 (patch) | |
| tree | 732fc94b354a26c08fba9cc9059f9c6c900182be /src/components/widgets/Features3.astro | |
Initial template
Diffstat (limited to 'src/components/widgets/Features3.astro')
| -rw-r--r-- | src/components/widgets/Features3.astro | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/components/widgets/Features3.astro b/src/components/widgets/Features3.astro new file mode 100644 index 0000000..62ab475 --- /dev/null +++ b/src/components/widgets/Features3.astro @@ -0,0 +1,70 @@ +--- +import Headline from '~/components/ui/Headline.astro'; +import ItemGrid from '~/components/ui/ItemGrid.astro'; +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +import Image from '~/components/common/Image.astro'; +import type { Features as Props } from '~/types'; + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline = await Astro.slots.render('tagline'), + image, + items = [], + columns, + defaultIcon, + isBeforeContent, + isAfterContent, + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props; +--- + +<WidgetWrapper + id={id} + isDark={isDark} + containerClass={`${isBeforeContent ? 'md:pb-8 lg:pb-12' : ''} ${isAfterContent ? 'pt-0 md:pt-0 lg:pt-0' : ''} ${ + classes?.container ?? '' + }`} + bg={bg} +> + <Headline title={title} subtitle={subtitle} tagline={tagline} classes={classes?.headline as Record<string, string>} /> + + <div aria-hidden="true" class="aspect-w-16 aspect-h-7"> + { + image && ( + <div class="w-full h-80 object-cover rounded-xl mx-auto bg-gray-500 shadow-lg"> + {typeof image === 'string' ? ( + <Fragment set:html={image} /> + ) : ( + <Image + class="w-full h-80 object-cover rounded-xl mx-auto bg-gray-500 shadow-lg" + width="auto" + height={320} + widths={[400, 768]} + layout="fullWidth" + {...image} + /> + )} + </div> + ) + } + </div> + + <ItemGrid + items={items} + columns={columns} + defaultIcon={defaultIcon} + classes={{ + container: 'mt-12', + panel: 'max-w-full sm:max-w-md', + title: 'text-lg font-semibold', + description: 'mt-0.5', + icon: 'flex-shrink-0 mt-1 text-primary w-6 h-6', + ...((classes?.items as object) ?? {}), + }} + /> +</WidgetWrapper> |
