Packages and banners from the CMS, host injection, translation files and the contact form #19
@@ -5,11 +5,14 @@ type PriceBannerProps = {
|
||||
banner: PricingBanner;
|
||||
};
|
||||
|
||||
// The optional dark band under the price cards: an announcement from the CMS
|
||||
// (an offer, a notice). It is not a bookable package and cannot be dismissed.
|
||||
// Only the title is required; the text and the button are left out when empty.
|
||||
// The link is a https address or a path on this site (the CMS guarantees
|
||||
// that, mapBanner checks it again), so a plain anchor is enough.
|
||||
// The optional band under the price cards: an announcement from the CMS (an
|
||||
// offer, a notice). Soft and warm like the rest of the homepage: the
|
||||
// alternate paper tone with a hairline, a thin heidegroen rule on top, the
|
||||
// heading font and, when there is a link, the deep-green button of the cards'
|
||||
// family. It is not a bookable package and cannot be dismissed. Only the
|
||||
// title is required; the text and the button are left out when empty. The
|
||||
// link is a https address or a path on this site (the CMS guarantees that,
|
||||
// mapBanner checks it again), so a plain anchor is enough.
|
||||
export default function PriceBanner({ banner }: PriceBannerProps) {
|
||||
const linkButton = useRecipe({ key: 'linkButton' });
|
||||
|
||||
@@ -21,37 +24,32 @@ export default function PriceBanner({ banner }: PriceBannerProps) {
|
||||
mt="gridGap"
|
||||
px="clamp(1.5rem, 4vw, 3.5rem)"
|
||||
py="clamp(2rem, 4vw, 3rem)"
|
||||
bg="ink"
|
||||
color="white"
|
||||
display="grid"
|
||||
gap={{ base: 6, md: 10 }}
|
||||
gridTemplateColumns={{
|
||||
base: '1fr',
|
||||
md: banner.link ? '1fr auto' : '1fr',
|
||||
}}
|
||||
alignItems="center"
|
||||
bg="paper.alt"
|
||||
borderWidth="1px"
|
||||
borderColor="line"
|
||||
borderTopWidth="3px"
|
||||
borderTopColor="accent"
|
||||
textAlign="center"
|
||||
>
|
||||
<Box>
|
||||
<Heading
|
||||
as="h3"
|
||||
id="price-banner-title"
|
||||
fontSize="1.5rem"
|
||||
color="white"
|
||||
mb={banner.text ? 2 : 0}
|
||||
>
|
||||
{banner.title}
|
||||
</Heading>
|
||||
{banner.text && (
|
||||
<Text color="white" opacity={0.85}>
|
||||
{banner.text}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
<Heading
|
||||
as="h3"
|
||||
id="price-banner-title"
|
||||
fontSize="1.5rem"
|
||||
mb={banner.text ? 3 : 0}
|
||||
>
|
||||
{banner.title}
|
||||
</Heading>
|
||||
{banner.text && (
|
||||
<Text color="ink.soft" maxW="560px" mx="auto">
|
||||
{banner.text}
|
||||
</Text>
|
||||
)}
|
||||
{banner.link && (
|
||||
<Box
|
||||
asChild
|
||||
css={linkButton({ variant: 'light', size: 'fit' })}
|
||||
justifySelf={{ base: 'start', md: 'center' }}
|
||||
css={linkButton({ variant: 'accent', size: 'fit' })}
|
||||
display="inline-flex"
|
||||
mt={6}
|
||||
>
|
||||
<a
|
||||
href={banner.link.url}
|
||||
|
||||
Reference in New Issue
Block a user