From 6924fc24c8d7c4d9281492ff12de583ef26f8927 Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 22 Jul 2025 16:33:05 +0300 Subject: Add initial pricing --- src/components/widgets/Pricing.astro | 126 +++++++++++++++++------------------ src/pages/index.astro | 89 ++++++++++++++++++++++++- src/types.d.ts | 11 ++- 3 files changed, 161 insertions(+), 65 deletions(-) (limited to 'src') diff --git a/src/components/widgets/Pricing.astro b/src/components/widgets/Pricing.astro index 3f20b74..4ab5279 100644 --- a/src/components/widgets/Pricing.astro +++ b/src/components/widgets/Pricing.astro @@ -1,15 +1,15 @@ --- -import { Icon } from 'astro-icon/components'; -import Button from '~/components/ui/Button.astro'; +import type { Pricing as Props } from '~/types'; import Headline from '~/components/ui/Headline.astro'; import WidgetWrapper from '~/components/ui/WidgetWrapper.astro'; -import type { Pricing as Props } from '~/types'; +import Button from '~/components/ui/Button.astro'; const { - title = '', - subtitle = '', - tagline = '', - prices = [], + title = await Astro.slots.render('title'), + subtitle = await Astro.slots.render('subtitle'), + tagline, + items = [], + actions = [], id, isDark = false, @@ -18,66 +18,66 @@ const { } = Astro.props; --- - - -
-
+ + +
+
{ - prices && - prices.map(({ title, subtitle, price, period, items, callToAction, hasRibbon = false, ribbonTitle }) => ( -
- {price && period && ( -
- {hasRibbon && ribbonTitle && ( -
- - {ribbonTitle} - -
- )} -
- {title && ( -

{title}

- )} - {subtitle &&

{subtitle}

} -
-
- $ - {price} -
- {period} -
- {items && ( -
    - {items.map( - ({ description, icon }) => - description && ( -
  • -
    - -
    - {description} -
  • - ) - )} -
- )} -
- {callToAction && ( -
- {typeof callToAction === 'string' ? ( - - ) : ( - callToAction && - callToAction.href &&
- )} -
+ items && items.length > 0 && items.map((item, index) => ( +
+
+ {item.title && ( +

{item.title}

+ )} +
+ {item.entries && item.entries.length > 0 && ( + + + {item.entries.map((entry) => ( + + + + + ))} + +
{entry.price}
)}
- )) +
+ )) }
+ +
+ {await Astro.slots.render('disclaimer') && ( +
+ )} + + { + actions && actions.length > 0 && ( +
+ {actions.map((action) => ( +
+
+ ))} +
+ ) + } +
diff --git a/src/pages/index.astro b/src/pages/index.astro index a40b445..cd79040 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,6 +12,7 @@ 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'; +import Pricing from '~/components/widgets/Pricing.astro'; const metadata = { title: 'CustomWorks – Detailing, wrapping, tuning | Profesjonalne usługi pielęgnacji samochodów – Bydgoszcz', @@ -133,7 +134,7 @@ const metadata = { - + + + + Standard', price: 'od 100 zł' }, + { description: 'Mycie Detailingowe
Premium', price: 'od 180 zł' }, + ], + }, + { + title: 'Zabezpieczenie lakieru', + entries: [ + { description: 'Wosk', price: 'od 300 zł' }, + { description: 'Powłoka kwarcowa 12m.', price: 'od 500 zł' }, + { description: 'Powłoka ceramiczna 24m.', price: 'od 900 zł' }, + { description: 'Powłoka ceramiczna 36m.', price: 'od 1200 zł' }, + { description: 'Powłoka ceramiczna 60m.', price: 'od 2000 zł' }, + { description: 'Niewidzialna wycieraczka na przednią szybę', price: 'od 150 zł' }, + { description: 'Niewidzialna wycieraczka na wszystkie szyby', price: 'od 350 zł' }, + { description: 'Zabezpieczenie frontu felg powłoką ceramiczną', price: 'od 400 zł' }, + { description: 'Zabezpieczenie całych felg powłoką ceramiczną', price: 'od 800 zł' }, + ], + }, + { + title: 'Wnętrze', + entries: [ + { description: 'Podstawowe czyszczenie
+ mycie szyb', price: 'od 150 zł' }, + { description: 'Detailingowe czyszczenie wnętrza', price: 'od 300 zł' }, + { description: 'Pranie foteli', price: 'od 300 zł' }, + { description: 'Pranie premium
(wszystkie elementy + demontaż foteli)', price: 'od 700 zł' }, + { description: 'Czyszczenie skór', price: 'od 300 zł' }, + { description: 'Konserwacja skór', price: 'od 200 zł' }, + { description: 'Zabezpieczenie skór', price: 'od 250 zł' }, + ], + }, + { + title: 'Renowacja lakieru', + entries: [ + { description: 'One Step', price: 'od 500 zł' }, + { description: 'Dwuetapowa korekta lakieru (usuwa od 70% do 90% rys)', price: 'od 900 zł' }, + { description: 'Wieloetapowa korekta lakieru (usuwa od 90% do 99% rys)', price: 'od 1300 zł' }, + ], + }, + + { + title: 'Zabezpieczanie lakieru folią PPF', + entries: [ + { description: 'Pakiet „Full Body"', price: 'od 12000 zł' }, + { description: 'Pakiet „Full Front"', price: 'od 5000 zł' }, + { description: 'Pakiet „Mini"', price: 'od 700 zł' }, + { description: 'Reflektory', price: 'od 240 zł' }, + { description: 'Próg bagażnika', price: 'od 250 zł' }, + { description: 'Wnęki klamek', price: 'od 200 zł' }, + { description: 'Przyciemnianie lamp', price: 'od 250 zł' }, + ], + }, + { + title: 'Zmiana koloru folią', + entries: [ + { description: 'Całe auto', price: 'od 7000 zł' }, + { description: 'Dach', price: 'od 700 zł' }, + { description: 'Lusterka', price: 'od 400 zł' }, + { description: 'Dechroming', price: 'od 800 zł' }, + ], + }, + ]} + actions={[ + { + variant: 'primary', + text: 'Pobierz cennik PDF', + href: '/cennik_2023.pdf', + icon: 'tabler:download', + download: true, + }, + ]} + > + + Podane ceny są cenami orientacyjnymi, dokładna wycena podawana jest po oględzinach pojazdu.

+ Lista usług jest orientacyjna i ogólna, jeśli jesteś zainteresowany czymś nietypowym to zapraszam do kontaktu, postaram się pomóc. +
+
+ , Widget { stats?: Array; } +export interface PricingItem { + title?: string; + entries?: Array<{ + description?: string; + price?: string; + }>; +} + export interface Pricing extends Omit, Widget { - prices?: Array; + items?: Array; + actions?: Array; } export interface Testimonials extends Omit, Widget { -- cgit v1.2.3