Skip to content

Commit

Permalink
Update landing text examples
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 7, 2024
1 parent 4e5303b commit 5033096
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions packages/edit-site/src/components/style-book/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function getLandingBlockExamples(
if ( themePalette ) {
const themeColorexample: BlockExample = {
name: 'theme-colors',
title: __( 'Theme Colors' ),
title: __( 'Colors' ),
category: 'landing',
content: (
<ColorExamples colors={ themePalette.colors } type={ colors } />
Expand All @@ -91,32 +91,37 @@ function getLandingBlockExamples(
examples.push( themeColorexample );
}

// Use our own example for the Heading block so that we can show multiple
// heading levels.
// (duplicate for now)
const headingsExample = {
name: 'core/heading',
title: __( 'Headings' ),
category: 'landing',
blocks: createBlock( 'core/heading', {
content: `AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789{(...)},?!*&:;_@#$`,
level: 1,
} ),
};
examples.push( headingsExample );
const headingBlock = createBlock( 'core/heading', {
content: __(
`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`
),
level: 1,
} );
const firstParagraphBlock = createBlock( 'core/paragraph', {
content: `A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically
composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the`,
} );
const secondParagraphBlock = createBlock( 'core/paragraph', {
content: `text into smaller, manageable chunks, allowing readers to scan and comprehend the content more easily. Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or
pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block`,
} );

const paragraphExample = {
name: 'core/paragraph',
title: __( 'Paragraph' ),
const textExample = {
name: 'theme-text',
title: __( 'Text' ),
category: 'landing',
blocks: createBlock( 'core/paragraph', {
content: `There was an Old Man of Vienna,
Who lived upon Tincture of Senna;
When that did not agree, he took Camomile Tea,
That nasty Old Man of Vienna.`,
} ),
blocks: [
headingBlock,
createBlock(
'core/group',
{
layout: { type: 'grid', columnCount: 2 },
},
[ firstParagraphBlock, secondParagraphBlock ]
),
],
};
examples.push( paragraphExample );
examples.push( textExample );

const otherBlockExamples = [
'core/image',
Expand Down

0 comments on commit 5033096

Please sign in to comment.