diff options
| author | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-21 23:38:11 +0300 |
|---|---|---|
| committer | Dawid Rycerz <dawid@rycerz.xyz> | 2025-07-21 23:38:11 +0300 |
| commit | 4296403026b5918048f932d3e77972518634faf2 (patch) | |
| tree | ba734a6bae54fb48008a70000367fa6f35993058 /src | |
| parent | e949191a1ee5fbeb6d79fbb57d535e02cd329f82 (diff) | |
Add contact
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/widgets/CallToActionImage.astro | 73 | ||||
| -rw-r--r-- | src/pages/index.astro | 20 |
2 files changed, 82 insertions, 11 deletions
diff --git a/src/components/widgets/CallToActionImage.astro b/src/components/widgets/CallToActionImage.astro new file mode 100644 index 0000000..2912d6d --- /dev/null +++ b/src/components/widgets/CallToActionImage.astro @@ -0,0 +1,73 @@ +--- +import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; +import type { Widget } from '~/types'; +import Headline from '~/components/ui/Headline.astro'; +import Image from '~/components/common/Image.astro'; + +interface Props extends Widget { + title?: string; + subtitle?: string; + tagline?: string; + image?: { + src: string; + alt: string; + href?: string; + target?: string; + }; +} + +const { + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline = await Astro.slots.render('tagline'), + image, + + id, + isDark = false, + classes = {}, + bg = await Astro.slots.render('bg'), +} = Astro.props; +--- + +<WidgetWrapper id={id} isDark={isDark} containerClass={`max-w-6xl mx-auto ${classes?.container ?? ''}`} bg={bg}> + <div + class="max-w-3xl mx-auto text-center p-6 rounded-md shadow-xl dark:shadow-none dark:border dark:border-slate-600" + > + <Headline + title={title} + subtitle={subtitle} + tagline={tagline} + classes={{ + container: 'mb-0 md:mb-0', + title: 'text-4xl md:text-4xl font-bold tracking-tighter mb-4 font-heading', + subtitle: 'text-xl text-muted dark:text-slate-400', + }} + /> + { + image && ( + <div class="flex justify-center mt-6"> + {image.href ? ( + <a + href={image.href} + target={image.target || '_self'} + rel={image.target === '_blank' ? 'noopener noreferrer' : ''} + class="inline-block hover:opacity-80 transition-opacity duration-200" + > + <Image + src={image.src} + alt={image.alt} + class="h-16 w-auto" + /> + </a> + ) : ( + <Image + src={image.src} + alt={image.alt} + class="h-16 w-auto" + /> + )} + </div> + ) + } + </div> +</WidgetWrapper>
\ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index e145bcb..bd9b7bb 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -11,6 +11,7 @@ import BlogLatestPosts from '~/components/widgets/BlogLatestPosts.astro'; import FAQs from '~/components/widgets/FAQs.astro'; import Stats from '~/components/widgets/Stats.astro'; import CallToAction from '~/components/widgets/CallToAction.astro'; +import CallToActionImage from '~/components/widgets/CallToActionImage.astro'; const metadata = { title: 'Gres-Tech | Kompleksowe Usługi Glazurnicze', @@ -150,19 +151,16 @@ const metadata = { <!-- Sprawdz certyfikat **************** --> - <CallToAction + <CallToActionImage id="certificate" title="Sprawdź nasz certyfikat Rzetelna Firma" subtitle="Gres-Tech jest partnerem programu 'Rzetelna firma', co potwierdza naszą solidność i zaufanie w branży." - actions={[ - { - variant: 'primary', - text: 'Sprawdź nasz certyfikat Rzetelna Firma', - href: 'https://wizytowka.rzetelnafirma.pl/JGQK9R0D', - target: '_blank', - icon: 'tabler:external-link', - }, - ]} + image={{ + src: '~/assets/images/rzetelna-firma-logo.png', + alt: 'Logo Rzetelna Firma - Sprawdź certyfikat', + href: 'https://wizytowka.rzetelnafirma.pl/JGQK9R0D', + target: '_blank' + }} /> @@ -178,7 +176,7 @@ const metadata = { }, { title: 'Adres', - description: 'Gres-Tech Dawid Kupczyk\nul. Kolejowa 10\n83-112 Rokitki\nNIP: 583-286-34-64', + description: 'Gres-Tech Dawid Kupczyk<br>ul. Kolejowa 10<br>83-112 Rokitki<br>NIP: 583-286-34-64', icon: 'tabler:map-pin', }, ]} |
