Extends the shared blocks for the shoot types page
FramedImage and MediaText take a colour for the block behind the photo (sand by default) and MediaText can put the photo in the right-hand column from lg, without changing the reading order. RichParagraph moves to the shared components, a new CallToAction closes a page with a heading, lead and action, and the homepage pricing section gets the anchor #prijzen. A test helper reads the generated CSS rules, since jsdom applies neither media queries nor pseudo-elements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Link, Text } from '@chakra-ui/react';
|
||||
import RouterLink from '@/components/RouterLink';
|
||||
import type { RichText } from '@/content/types';
|
||||
|
||||
type RichParagraphProps = {
|
||||
paragraph: RichText;
|
||||
};
|
||||
|
||||
// One paragraph of running text with links in it (BR-OM-03): text pieces as
|
||||
// they are, link pieces as underlined router links.
|
||||
export default function RichParagraph({ paragraph }: RichParagraphProps) {
|
||||
return (
|
||||
<Text>
|
||||
{paragraph.map((piece, index) =>
|
||||
typeof piece === 'string' ? (
|
||||
piece
|
||||
) : (
|
||||
// Static content: the order never changes, so the index
|
||||
// is a stable key
|
||||
<Link key={index} variant="underline" asChild>
|
||||
<RouterLink to={piece.to} hash={piece.hash}>
|
||||
{piece.text}
|
||||
</RouterLink>
|
||||
</Link>
|
||||
),
|
||||
)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user