瀏覽代碼

[Livre] Add block patterns (#5282)

Kjell Reigstad 3 年之前
父節點
當前提交
0b2173c3aa

二進制
livre/assets/images/chair.jpg


二進制
livre/assets/images/writing.jpg


+ 4 - 0
livre/functions.php

@@ -145,3 +145,7 @@ if ( ! function_exists( 'livre_preload_webfonts' ) ) :
 endif;
 
 add_action( 'wp_head', 'livre_preload_webfonts' );
+
+// Add block patterns
+require get_template_directory() . '/inc/block-patterns.php';
+

+ 81 - 0
livre/inc/block-patterns.php

@@ -0,0 +1,81 @@
+<?php
+/**
+ * Livre: Block Patterns
+ *
+ * @since Livre 1.0
+ */
+
+/**
+ * Registers block patterns and categories.
+ *
+ * @since Livre 1.0
+ *
+ * @return void
+ */
+function livre_register_block_patterns() {
+	$block_pattern_categories = array(
+		'footer'   => array( 'label' => __( 'Footers', 'livre' ) ),
+		'header'   => array( 'label' => __( 'Headers', 'livre' ) ),
+		'pages'    => array( 'label' => __( 'Pages', 'livre' ) ),
+	);
+
+	/**
+	 * Filters the theme block pattern categories.
+	 *
+	 * @since Livre 1.0
+	 *
+	 * @param array[] $block_pattern_categories {
+	 *     An associative array of block pattern categories, keyed by category name.
+	 *
+	 *     @type array[] $properties {
+	 *         An array of block category properties.
+	 *
+	 *         @type string $label A human-readable label for the pattern category.
+	 *     }
+	 * }
+	 */
+	$block_pattern_categories = apply_filters( 'livre_block_pattern_categories', $block_pattern_categories );
+
+	foreach ( $block_pattern_categories as $name => $properties ) {
+		if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( $name ) ) {
+			register_block_pattern_category( $name, $properties );
+		}
+	}
+
+	$block_patterns = array(
+		'footer-default',
+		'footer-right',
+		'footer-centered',
+		'footer-nav-left',
+		'footer-nav-right',
+		'header-default',
+		'header-right',
+		'header-centered',
+		'header-left-right',
+		'header-left-right-text',
+		'header-left-right-logo',
+		'header-left-right-logo-title',
+		'header-title-tagline-social',
+		'page-about',
+		'page-contact',
+	);
+
+	/**
+	 * Filters the theme block patterns.
+	 *
+	 * @since Livre 1.0
+	 *
+	 * @param array $block_patterns List of block patterns by name.
+	 */
+	$block_patterns = apply_filters( 'livre_block_patterns', $block_patterns );
+
+	foreach ( $block_patterns as $block_pattern ) {
+		$pattern_file = get_theme_file_path( '/inc/patterns/' . $block_pattern . '.php' );
+
+		register_block_pattern(
+			'livre/' . $block_pattern,
+			require $pattern_file
+		);
+	}
+}
+add_action( 'init', 'livre_register_block_patterns', 9 );

+ 20 - 0
livre/inc/patterns/footer-centered.php

@@ -0,0 +1,20 @@
+<?php
+/**
+ * Centered footer block pattern
+ */
+return array(
+	'title'      => __( 'Centered footer', 'livre' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--large, 8rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--large, 8rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)">
+					<!-- wp:paragraph {"align":"center","fontSize":"small"} -->
+					<p class="has-text-align-center has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'livre' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'livre' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group -->',
+);

+ 20 - 0
livre/inc/patterns/footer-default.php

@@ -0,0 +1,20 @@
+<?php
+/**
+ * Default footer block pattern
+ */
+return array(
+	'title'      => __( 'Default footer', 'livre' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--large, 8rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--large, 8rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)">
+					<!-- wp:paragraph {"style":{"fontSize":"small"} -->
+					<p class="has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'livre' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'livre' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group -->',
+);

+ 24 - 0
livre/inc/patterns/footer-nav-left.php

@@ -0,0 +1,24 @@
+<?php
+/**
+ * Footer with left navigation block pattern
+ */
+return array(
+	'title'      => __( 'Footer with left navigation', 'livre' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal"}},"fontSize":"small"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:paragraph {"align":"right","fontSize":"small"} -->
+					<p class="has-text-align-right has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'livre' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'livre' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group -->',
+);

+ 24 - 0
livre/inc/patterns/footer-nav-right.php

@@ -0,0 +1,24 @@
+<?php
+/**
+ * Footer with right navigation block pattern
+ */
+return array(
+	'title'      => __( 'Footer with right navigation', 'livre' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:paragraph {"align":"left","fontSize":"small"} -->
+					<p class="has-text-align-left has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'livre' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'livre' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal"}},"fontSize":"small"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 20 - 0
livre/inc/patterns/footer-right.php

@@ -0,0 +1,20 @@
+<?php
+/**
+ * Right-aligned footer block pattern
+ */
+return array(
+	'title'      => __( 'Right-aligned footer', 'livre' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--large, 8rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--large, 8rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)">
+					<!-- wp:paragraph {"align":"right","fontSize":"small"} -->
+					<p class="has-text-align-right has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'livre' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'livre' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-centered.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Centered header block pattern
+ */
+return array(
+	'title'      => __( 'Centered header', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--medium, clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap))))"}}}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--medium, clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap))));padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:site-title {"textAlign":"center","style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /-->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"center"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-default.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Default header block pattern
+ */
+return array(
+	'title'      => __( 'Default header', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"left"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /--></div>
+					<!-- /wp:group -->',
+);

+ 21 - 0
livre/inc/patterns/header-left-right-logo-title.php

@@ -0,0 +1,21 @@
+<?php
+/**
+ * Header with site logo and title on left and button on right block pattern
+ */
+return array(
+	'title'      => __( 'Header with site logo and title on left and button on right', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group"><!-- wp:site-logo {"width":48,"shouldSyncIcon":true} /-->
+
+					<!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /--></div>
+					<!-- /wp:group -->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-left-right-logo.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Header with site logo on left and button on right block pattern
+ */
+return array(
+	'title'      => __( 'Header with site logo on left and button on right', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:site-logo {"width":48,"shouldSyncIcon":true} /-->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-left-right-text.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Header with site title on left and navigation on right block pattern
+ */
+return array(
+	'title'      => __( 'Header with site title on left and navigation on right', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /-->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal"}},"fontSize":"small"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-left-right.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Header with site title on left and button on right block pattern
+ */
+return array(
+	'title'      => __( 'Header with site title on left and button on right', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /-->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 17 - 0
livre/inc/patterns/header-right.php

@@ -0,0 +1,17 @@
+<?php
+/**
+ * Right-aligned header block pattern
+ */
+return array(
+	'title'      => __( 'Right-aligned header', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"right"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:site-title {"style":{"spacing":{"padding":{"top":"0.35ch"}},"typography":{"textTransform":"uppercase"}}} /-->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation --></div>
+					<!-- /wp:group -->',
+);

+ 25 - 0
livre/inc/patterns/header-title-tagline-social.php

@@ -0,0 +1,25 @@
+<?php
+/**
+ * Header with site title, tagline, and social link block pattern
+ */
+return array(
+	'title'      => __( 'Header with site title, tagline, and social link', 'livre' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:group -->
+					<div class="wp-block-group"><!-- wp:site-title {"textAlign":"center","style":{"typography":{"textTransform":"uppercase"}}} /-->
+
+					<!-- wp:site-tagline {"textAlign":"center","fontSize":"x-small"} /--></div>
+					<!-- /wp:group -->
+
+					<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","iconBackgroundColor":"background","iconBackgroundColorValue":"var(--wp--preset--color--background)","layout":{"type":"flex","justifyContent":"right"}} -->
+					<ul class="wp-block-social-links has-icon-color has-icon-background-color"><!-- wp:social-link {"url":"#","service":"twitter"} /--></ul>
+					<!-- /wp:social-links --></div>
+					<!-- /wp:group -->',
+);

+ 99 - 0
livre/inc/patterns/page-about.php

@@ -0,0 +1,99 @@
+<?php
+/**
+ * About page block pattern
+ */
+return array(
+	'title'      => __( 'About page', 'livre' ),
+	'categories' => array( 'pages' ),
+	'content'    => '<!-- wp:group {"align":"wide"} -->
+					<div class="wp-block-group alignwide"><!-- wp:heading {"level":1} -->
+					<h1>' . esc_html__( 'About', 'livre' ) . '</h1>
+					<!-- /wp:heading -->
+
+					<!-- wp:columns {"verticalAlignment":null} -->
+					<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:heading -->
+					<h2>' . esc_html__( 'Felicia Gonalez', 'livre' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'The studio was filled with the rich odour of roses, and when the light summer wind stirred amidst the trees of the garden, there came through the open door the heavy scent of the lilac, or the more delicate perfume of the pink-flowering thorn.', 'livre' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:heading -->
+					<h2>' . esc_html__( 'Ebony James', 'livre' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'In the centre of the room, clamped to an upright easel, stood the full-length portrait of a young man of extraordinary personal beauty, and in front of it, some little distance away, was sitting the artist himself, Basil Hallward.', 'livre' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->
+
+					<!-- wp:spacer {"height":"16px"} -->
+					<div style="height:16px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:columns {"verticalAlignment":null} -->
+					<div class="wp-block-columns"><!-- wp:column {"width":""} -->
+					<div class="wp-block-column"></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"66.66%"} -->
+					<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:image {"id":59,"sizeSlug":"full","linkDestination":"none"} -->
+					<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/writing.jpg" alt="' . esc_attr__( 'Vintage photograph of a woman writing a letter.', 'livre' ) . '"/></figure>
+					<!-- /wp:image --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->
+
+					<!-- wp:spacer {"height":"16px"} -->
+					<div style="height:16px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:columns {"verticalAlignment":null} -->
+					<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:heading -->
+					<h2>' . esc_html__( 'Matthew Porter', 'livre' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'In the centre of the room, clamped to an upright easel, stood the full-length portrait of a young man of extraordinary personal beauty, and in front of it, some little distance away, was sitting the artist himself, Basil Hallward.', 'livre' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->
+
+					<!-- wp:columns {"verticalAlignment":null} -->
+					<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"width":"33.33%"} -->
+					<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:heading -->
+					<h2>' . esc_html__( 'Vic Desmond', 'livre' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'The studio was filled with the rich odour of roses, and when the light summer wind stirred amidst the trees of the garden, there came through the open door the heavy scent of the lilac, or the more delicate perfume of the pink-flowering thorn.', 'livre' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns --></div>
+					<!-- /wp:group -->',
+);

+ 51 - 0
livre/inc/patterns/page-contact.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Contact page block pattern
+ */
+return array(
+	'title'      => __( 'Contact page', 'livre' ),
+	'categories' => array( 'pages' ),
+	'content'    => '<!-- wp:group {"align":"wide"} -->
+					<div class="wp-block-group alignwide"><!-- wp:heading {"level":1} -->
+					<h1>' . esc_html__( 'Contact', 'livre' ) . '</h1>
+					<!-- /wp:heading -->
+
+					<!-- wp:columns {"verticalAlignment":null} -->
+					<div class="wp-block-columns"><!-- wp:column {"width":""} -->
+					<div class="wp-block-column"><!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'The studio was filled with the rich odour of roses, and when the light summer wind stirred amidst the trees of the garden.', 'livre' ) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:buttons -->
+					<div class="wp-block-buttons"><!-- wp:button {"style":{"spacing":{"padding":{"top":"1em","right":"1em","bottom":"1em","left":"1em"}}},"fontSize":"x-small"} -->
+					<div class="wp-block-button has-custom-font-size has-x-small-font-size"><a class="wp-block-button__link" style="padding-top:1em;padding-right:1em;padding-bottom:1em;padding-left:1em">' . esc_html__( 'Get in Touch', 'livre' ) . '</a></div>
+					<!-- /wp:button --></div>
+					<!-- /wp:buttons -->
+
+					<!-- wp:spacer {"height":"16px"} -->
+					<div style="height:16px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:image {"id":56,"sizeSlug":"large","linkDestination":"none"} -->
+					<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/chair.jpg" alt="' . esc_attr__( 'A vintage photograph of an elegant living room.', 'livre' ) . '"/></figure>
+					<!-- /wp:image --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column {"verticalAlignment":"bottom","width":""} -->
+					<div class="wp-block-column is-vertically-aligned-bottom"><!-- wp:paragraph {"align":"right","fontSize":"small"} -->
+					<p class="has-text-align-right has-small-font-size"><em>' . esc_html__( 'Follow us:', 'livre' ) . '</em></p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:social-links {"iconColor":"secondary","iconColorValue":"var(--wp--preset--color--secondary)","className":"is-style-logos-only","layout":{"type":"flex","justifyContent":"right"}} -->
+					<ul class="wp-block-social-links has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"#","service":"twitter"} /-->
+
+					<!-- wp:social-link {"url":"#","service":"facebook"} /-->
+
+					<!-- wp:social-link {"url":"#","service":"instagram"} /--></ul>
+					<!-- /wp:social-links --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns --></div>
+					<!-- /wp:group -->',
+);

+ 1 - 5
livre/parts/footer.html

@@ -1,5 +1 @@
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--large, 8rem)"}}},"layout":{"inherit":true}} -->
-<div class="wp-block-group" style="padding-top:var(--wp--custom--spacing--large, 8rem)">
-<!-- wp:pattern {"slug":"livre/footer-default"} /-->
-</div>
-<!-- /wp:group -->
+<!-- wp:pattern {"slug":"livre/footer-default"} /-->

+ 2 - 2
livre/parts/header.html

@@ -1,5 +1,5 @@
-<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"left"}} -->
-<div class="wp-block-group alignwide" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
+<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--large, 10rem)","top":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"type":"flex","justifyContent":"left"}} -->
+<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--large, 10rem)"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left"},"overlayMenu":"always","overlayBackgroundColor":"background","overlayTextColor":"foreground","style":{"typography":{"fontStyle":"normal","fontWeight":"300"}},"fontSize":"x-large"} -->
 
 <!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
 <!-- /wp:navigation -->

+ 11 - 0
livre/readme.txt

@@ -39,3 +39,14 @@ Newsreader Font
 Copyright 2020 The Newsreader Project Authors
 License: SIL Open Font License, 1.1, https://opensource.org/licenses/OFL-1.1
 Source: https://github.com/productiontype/Newsreader
+
+Excerpts from "The Picture of Dorian Gray" by Oscar Wilde
+License: Public Domain
+Source: https://www.gutenberg.org/ebooks/174
+Used in the screenshot, and for block pattern placeholder text. 
+
+Photographs by Alfred Stieglitz. 
+License: CC0
+Source: https://www.rawpixel.com/image/3809197/photo-image-frame-art-house
+        https://www.rawpixel.com/image/3809180/photo-image-art-people-vintage
+Used in block patterns.