Remove WidgetWrapper from Hero widget

This commit is contained in:
widgeter
2023-08-14 14:29:09 +02:00
parent f6cc610259
commit 2fe939d25e
2 changed files with 11 additions and 31 deletions

View File

@ -1,7 +1,6 @@
--- ---
import { Icon } from 'astro-icon/components'; import { Icon } from 'astro-icon/components';
import Image from '~/components/common/Image.astro'; import Image from '~/components/common/Image.astro';
import WidgetWrapper from '../ui/WidgetWrapper.astro';
const { const {
title = await Astro.slots.render('title'), title = await Astro.slots.render('title'),
@ -10,20 +9,10 @@ const {
callToAction = await Astro.slots.render('callToAction'), callToAction = await Astro.slots.render('callToAction'),
callToAction2 = await Astro.slots.render('callToAction2'), callToAction2 = await Astro.slots.render('callToAction2'),
image = await Astro.slots.render('image'), image = await Astro.slots.render('image'),
id,
isDark = false,
classes = {},
bg = await Astro.slots.render('bg'),
} = Astro.props; } = Astro.props;
--- ---
<WidgetWrapper <section class="relative md:-mt-[76px] not-prose">
id={id}
isDark={isDark}
containerClass={`relative md:-mt-[76px] not-prose py-0 md:py-0 lg:py-0 ${classes?.container ?? ''}`}
bg={bg}
>
<div class="absolute inset-0 pointer-events-none" aria-hidden="true"></div> <div class="absolute inset-0 pointer-events-none" aria-hidden="true"></div>
<div class="relative max-w-7xl mx-auto px-4 sm:px-6"> <div class="relative max-w-7xl mx-auto px-4 sm:px-6">
<div class="pt-0 md:pt-[76px] pointer-events-none"></div> <div class="pt-0 md:pt-[76px] pointer-events-none"></div>
@ -104,4 +93,4 @@ const {
</div> </div>
</div> </div>
</div> </div>
</WidgetWrapper> </section>

View File

@ -14,24 +14,15 @@ const metadata = {
<Layout metadata={metadata}> <Layout metadata={metadata}>
<!-- Hero Widget ******************* --> <!-- Hero Widget ******************* -->
<Hero callToAction={{ text: 'Start exploring', href: '/' }}> <Hero
<Fragment slot="title"> title="Elevate your projects with our stunning templates"
<span class="text-gray-200">Elevate your projects with our stunning templates</span> subtitle="Explore our meticulously crafted templates tailored to various industries and purposes. From captivating presentations to functional website designs, we offer the tools you need to succeed."
</Fragment> callToAction={{ text: 'Start exploring', href: '/' }}
image={{
<Fragment slot="subtitle"> src: 'https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80',
<span class="text-gray-300" alt: 'AstroWind Hero Image',
>Explore our meticulously crafted templates tailored to various industries and purposes. From captivating }}
presentations to functional website designs, we offer the tools you need to succeed.</span />
>
</Fragment>
<div
slot="bg"
class="absolute inset-0 bg-dark overflow-hidden brightness-[0.25] bg-cover bg-[url('https://images.unsplash.com/photo-1611462985358-60d3498e0364?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80')]"
>
</div>
</Hero>
<!-- Features2 Widget ************** --> <!-- Features2 Widget ************** -->