Add a Features3 widget

This commit is contained in:
widgeter
2023-08-04 19:54:29 +02:00
parent 88e90fccbd
commit 4b34c346a7
2 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,40 @@
---
import Headline from '~/components/ui/Headline.astro';
import ItemGrid from '~/components/ui/ItemGrid.astro';
import WidgetWrapper from '~/components/ui/WidgetWrapper.astro';
import type { Features } from '~/types';
const {
title = await Astro.slots.render('title'),
subtitle = await Astro.slots.render('subtitle'),
tagline = await Astro.slots.render('tagline'),
image,
items = [],
columns,
id,
isDark = false,
classes = {},
bg = await Astro.slots.render('bg'),
} = Astro.props as Features;
---
<WidgetWrapper id={id} isDark={isDark} containerClass={classes?.container} bg={bg}>
<Headline title={title} subtitle={subtitle} tagline={tagline} classes={classes?.headline} />
<div class="aspect-w-16 aspect-h-7">
{image && image.src && <img src={image.src} alt={image.alt || ''} class="w-full h-80 object-cover rounded-xl" />}
</div>
<ItemGrid
items={items}
columns={columns}
classes={{
container: 'mt-5 lg:mt-16',
panel: 'max-w-full sm:max-w-md',
title: 'text-lg font-semibold',
icon: 'flex-shrink-0 mt-1 text-primary w-6 h-6',
...((classes?.items as {}) ?? {}),
}}
/>
</WidgetWrapper>

View File

@ -9,6 +9,7 @@ import { headerData } from '~/navigation';
import Features2 from '~/components/widgets/Features2.astro';
import Features from '~/components/widgets/Features.astro';
import Stats from '~/components/widgets/Stats.astro';
import Features3 from '~/components/widgets/Features3.astro';
const metadata = {
title: 'Startup Landing Page',
@ -157,4 +158,54 @@ const metadata = {
waste more time! :P
</Fragment>
</CallToAction>
<!-- Features3 Widget ************** -->
<Features3
title="Let us know how we can help"
subtitle="Were here to help and answer any question you might have."
columns={4}
items={[
{
title: 'Phone',
icon: 'tabler:phone',
callToAction: {
targetBlank: true,
text: 'Call us',
href: '/',
},
},
{
title: 'Email',
icon: 'tabler:mail',
callToAction: {
targetBlank: true,
text: 'Write to us',
href: '/',
},
},
{
title: 'Chat with sales',
icon: 'tabler:message-circle',
callToAction: {
targetBlank: true,
text: 'Start chatting',
href: '/',
},
},
{
title: 'Chat with support',
icon: 'tabler:message-circle',
callToAction: {
targetBlank: true,
text: 'Start chatting',
href: '/',
},
},
]}
>
<Fragment slot="bg">
<div class="absolute inset-0 bg-blue-50 dark:bg-transparent"></div>
</Fragment>
</Features3>
</Layout>