From c949098e81248cd05da48d6ec6ccc033bd1d0011 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 18:47:32 +0300 Subject: Full size hero --- src/components/widgets/HeroBackground.astro | 128 ++++++++++++++++++++++++++++ src/pages/index.astro | 12 ++- src/types.d.ts | 1 + 3 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 src/components/widgets/HeroBackground.astro (limited to 'src') diff --git a/src/components/widgets/HeroBackground.astro b/src/components/widgets/HeroBackground.astro new file mode 100644 index 0000000..b5ea748 --- /dev/null +++ b/src/components/widgets/HeroBackground.astro @@ -0,0 +1,128 @@ +--- +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'), + logoPath = '~/assets/images/customworks-logo.png', +} = Astro.props; +--- + +
+ + + + +
+
+
+
+ + { + logoPath && ( +
+ CustomWorks Logo +
+ ) + } + + { + tagline && ( +

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

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

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

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

+
+
+
diff --git a/src/pages/index.astro b/src/pages/index.astro index e095fe0..71567a1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,7 @@ --- import Layout from '~/layouts/PageLayout.astro'; -import Hero from '~/components/widgets/Hero2.astro'; +import Hero from '~/components/widgets/HeroBackground.astro'; import Features2Custom from '~/components/widgets/Features2Custom.astro'; import Steps2 from '~/components/widgets/Steps2.astro'; import Content from '~/components/widgets/Content.astro'; @@ -26,15 +26,21 @@ const metadata = { href: '#contact', icon: 'tabler:mail', }, - { text: 'Usługi', href: '#features' }, + { + text: 'Usługi', + href: '#features', + style: 'background-color: white !important; color: #111827 !important; border-color: white !important;', + class: 'hover:bg-gray-100 hover:border-gray-200', + }, ]} image={{ src: '~/assets/images/hero-image.webp', alt: 'CustomWorks - Profesjonalne usługi detailingu samochodowego', }} + logoPath="~/assets/images/customworks-logo.png" > - + CustomWorks diff --git a/src/types.d.ts b/src/types.d.ts index 657b477..3ecf68d 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -218,6 +218,7 @@ export interface Hero extends Omit, Omit, Widget { -- cgit v1.2.3