瀏覽代碼

[Stewart] Add block patterns (#5375)

* Add image assets.

* Add about, contact patterns.

* Add credit lines.

* Add patterns.

* Revise image colors.

* Content revision for the About page pattern.

* Fix nav block markup.
Kjell Reigstad 3 年之前
父節點
當前提交
a55c69f6f9

二進制
stewart/assets/images/about.jpg


二進制
stewart/assets/images/contact.jpg


二進制
stewart/assets/images/header.jpg


+ 4 - 0
stewart/functions.php

@@ -69,3 +69,7 @@ function stewart_fonts_url() {
 
 	return esc_url_raw( $fonts_url );
 }
+
+// Add block patterns
+require get_template_directory() . '/inc/block-patterns.php';
+

+ 83 - 0
stewart/inc/block-patterns.php

@@ -0,0 +1,83 @@
+<?php
+/**
+ * Stewart: Block Patterns
+ *
+ * @since Stewart 1.0
+ */
+
+/**
+ * Registers block patterns and categories.
+ *
+ * @since Stewart 1.0
+ *
+ * @return void
+ */
+function stewart_register_block_patterns() {
+	$block_pattern_categories = array(
+		'footer'   => array( 'label' => __( 'Footers', 'stewart' ) ),
+		'header'   => array( 'label' => __( 'Headers', 'stewart' ) ),
+		'pages'    => array( 'label' => __( 'Pages', 'stewart' ) ),
+		'sidebar'   => array( 'label' => __( 'Sidebars', 'stewart' ) ),
+	);
+
+	/**
+	 * Filters the theme block pattern categories.
+	 *
+	 * @since Stewart 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( 'stewart_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-left',
+		'footer-right',
+		'footer-nav-left',
+		'footer-nav-right',
+		'header-image',
+		'header-traditional-background',
+		'header-traditional',
+		'page-about',
+		'page-contact',
+		'sidebar-default',
+		'sidebar-border',
+		'sidebar-background',
+		'sidebar-introduction',
+		'sidebar-blogging',
+		'sidebar-categories-tags',
+	);
+
+	/**
+	 * Filters the theme block patterns.
+	 *
+	 * @since Stewart 1.0
+	 *
+	 * @param array $block_patterns List of block patterns by name.
+	 */
+	$block_patterns = apply_filters( 'stewart_block_patterns', $block_patterns );
+
+	foreach ( $block_patterns as $block_pattern ) {
+		$pattern_file = get_theme_file_path( '/inc/patterns/' . $block_pattern . '.php' );
+
+		register_block_pattern(
+			'stewart/' . $block_pattern,
+			require $pattern_file
+		);
+	}
+}
+add_action( 'init', 'stewart_register_block_patterns', 9 );

+ 29 - 0
stewart/inc/patterns/footer-default.php

@@ -0,0 +1,29 @@
+<?php
+/**
+ * Default footer block pattern
+ */
+return array(
+	'title'      => __( 'Default footer', 'stewart' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:group -->
+					<div class="wp-block-group">
+						<!-- wp:paragraph {"align":"center","fontSize":"tiny"} -->
+						<p class="has-text-align-center has-small-font-size">' .
+						sprintf(
+							/* Translators: WordPress link. */
+							esc_html__( 'Proudly powered by %s', 'stewart' ),
+							'<a href="' . esc_url( __( 'https://wordpress.org', 'stewart' ) ) . '" rel="nofollow">WordPress</a>'
+						) . '</p>
+						<!-- /wp:paragraph -->
+					</div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 30 - 0
stewart/inc/patterns/footer-left.php

@@ -0,0 +1,30 @@
+<?php
+/**
+ * Left-aligned footer block pattern
+ */
+return array(
+	'title'      => __( 'Left-aligned footer', 'stewart' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull">
+					<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignwide"><!-- wp:paragraph {"style":{"fontSize":"small"} -->
+					<p class="has-small-font-size">' .
+					sprintf(
+						/* Translators: WordPress link. */
+						esc_html__( 'Proudly powered by %s', 'stewart' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'stewart' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 35 - 0
stewart/inc/patterns/footer-nav-left.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Footer with left navigation block pattern
+ */
+return array(
+	'title'      => __( 'Footer with left navigation', 'stewart' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull">
+					<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignwide"><!-- 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', 'stewart' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'stewart' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 35 - 0
stewart/inc/patterns/footer-nav-right.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Footer with right navigation block pattern
+ */
+return array(
+	'title'      => __( 'Footer with right navigation', 'stewart' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull">
+					<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignwide"><!-- 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', 'stewart' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'stewart' ) ) . '" 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 --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 30 - 0
stewart/inc/patterns/footer-right.php

@@ -0,0 +1,30 @@
+<?php
+/**
+ * Right-aligned footer block pattern
+ */
+return array(
+	'title'      => __( 'Right-aligned footer', 'stewart' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->
+
+					<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull">
+					<!-- wp:group {"align":"wide"} -->
+					<div class="wp-block-group alignwide"><!-- 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', 'stewart' ),
+						'<a href="' . esc_url( __( 'https://wordpress.org', 'stewart' ) ) . '" rel="nofollow">WordPress</a>'
+					) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":60} -->
+					<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 16 - 0
stewart/inc/patterns/header-image.php

@@ -0,0 +1,16 @@
+<?php
+/**
+ * Header image block pattern
+ */
+return array(
+	'title'      => __( 'Header image', 'stewart' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:image {"align":"full","sizeSlug":"large","linkDestination":"none"} -->
+					<figure class="wp-block-image alignfull size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/header.jpg" alt="' . esc_html__( 'An abstract image featuring a brushstroke.', 'stewart' ) . '"/></figure>
+					<!-- /wp:image -->
+
+					<!-- wp:spacer {"height":70} -->
+					<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 24 - 0
stewart/inc/patterns/header-traditional-background.php

@@ -0,0 +1,24 @@
+<?php
+/**
+ * Traditional header with color background block pattern
+ */
+return array(
+	'title'      => __( 'Traditional header with color background', 'stewart' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull has-background-color has-foreground-background-color has-text-color has-background has-link-color"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var(--wp--custom--margin--horizontal, 30px)","bottom":"40px"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignwide" style="padding-top:var(--wp--custom--margin--horizontal, 30px);padding-bottom:40px"><!-- wp:group {"layout":{"type":"flex"}} -->
+					<div class="wp-block-group"><!-- wp:site-logo {"width":64} /-->
+
+					<!-- wp:site-title /--></div>
+					<!-- /wp:group -->
+
+					<!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","orientation":"horizontal"}} /--></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":100} -->
+						<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
+						<!-- /wp:spacer --></div>
+					<!-- /wp:group -->',
+);

+ 20 - 0
stewart/inc/patterns/header-traditional.php

@@ -0,0 +1,20 @@
+<?php
+/**
+ * Traditional header block pattern
+ */
+return array(
+	'title'      => __( 'Traditional header', 'stewart' ),
+	'categories' => array( 'header' ),
+	'blockTypes' => array( 'core/template-part/header' ),
+	'content'    => '<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+					<div class="wp-block-group alignfull"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var(--wp--custom--margin--horizontal, 30px)","bottom":"40px"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+					<div class="wp-block-group alignwide" style="padding-top:var(--wp--custom--margin--horizontal, 30px);padding-bottom:40px"><!-- wp:group {"layout":{"type":"flex"}} -->
+					<div class="wp-block-group"><!-- wp:site-logo {"width":64} /-->
+
+					<!-- wp:site-title /--></div>
+					<!-- /wp:group -->
+
+					<!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","orientation":"horizontal"}} /--></div>
+					<!-- /wp:group --></div>
+					<!-- /wp:group -->',
+);

+ 49 - 0
stewart/inc/patterns/page-about.php

@@ -0,0 +1,49 @@
+<?php
+/**
+ * About page block pattern
+ */
+return array(
+	'title'      => __( 'About page', 'stewart' ),
+	'categories' => array( 'pages' ),
+	'content'    => '<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1","fontSize":"72px"}}} -->
+					<p style="font-size:72px;line-height:1">' . wp_kses_post( __( 'Jenn<br>Stewart', 'stewart' ) ) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:group {"style":{"spacing":{"padding":{"bottom":"1em"}}}} -->
+					<div class="wp-block-group" style="padding-bottom:1em"><!-- wp:paragraph -->
+					<p>' . esc_html__( 'The artist: handsome, clever, and rich, with a comfortable home and happy disposition, seemed to unite some of the best blessings of existence; and had lived nearly twenty-one years in the world with very little to distress or vex her.', 'stewart' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
+					<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/about.jpg" alt="' . esc_html__( 'A collage featuring the portrait of a woman.', 'stewart' ) . '"/></figure>
+					<!-- /wp:image -->
+
+					<!-- wp:columns -->
+					<div class="wp-block-columns"><!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:heading {"level":2,"fontSize":"extra-large"} -->
+					<h2 class="has-extra-large-font-size">' . esc_html__( 'Experience', 'stewart' ) . '</h3>
+					<!-- /wp:heading --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:list -->
+					<ul><li>' . esc_html__( 'The mildness of her temper had hardly allowed her to impose any restraint.', 'stewart' ) . '</li></ul>
+					<!-- /wp:list --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->
+
+					<!-- wp:columns -->
+					<div class="wp-block-columns"><!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:heading {"level":2,"fontSize":"extra-large"} -->
+					<h2 class="has-extra-large-font-size">' . esc_html__( 'Awards', 'stewart' ) . '</h3>
+					<!-- /wp:heading --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:list -->
+					<ul><li>' . esc_html__( 'Seems to unite some of the best blessings of existence.', 'stewart' ) . '</li><li>' . esc_html__( 'Nearly twenty-one years in the world with very little to distress or vex her.', 'stewart' ) . '</li></ul>
+					<!-- /wp:list --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->',
+);

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

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Contact page block pattern
+ */
+return array(
+	'title'      => __( 'Contact page', 'stewart' ),
+	'categories' => array( 'pages' ),
+	'content'    => '<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
+					<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/contact.jpg" alt="' . esc_html__( 'An abstract image featuring a brushstroke.', 'stewart' ) . '"/></figure>
+					<!-- /wp:image -->
+
+					<!-- wp:columns -->
+					<div class="wp-block-columns"><!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:columns {"isStackedOnMobile":false} -->
+					<div class="wp-block-columns is-not-stacked-on-mobile"><!-- wp:column {"width":"100px"} -->
+					<div class="wp-block-column" style="flex-basis:100px"><!-- wp:paragraph -->
+					<p>' . esc_html__( 'Twitter', 'stewart' ) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p>' . esc_html__( 'Email', 'stewart' ) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p>' . esc_html__( 'Instagram', 'stewart' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:paragraph -->
+					<p><a href="#">' . esc_html__( '@twitter', 'stewart' ) . '</a></p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p><a href="#">' . esc_html__( 'email@example.com', 'stewart' ) . '</a></p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:paragraph -->
+					<p><a href="#">' . esc_html__( '@instagram', 'stewart' ) . '</a></p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns --></div>
+					<!-- /wp:column -->
+
+					<!-- wp:column -->
+					<div class="wp-block-column"><!-- wp:paragraph -->
+					<p>' . esc_html__( 'The artist: handsome, and clever, with a comfortable home and happy disposition, seemed to unite some of the best blessings of existence; and had lived nearly twenty-one years in the world with very little to distress or vex her.', 'stewart' ) . '</p>
+					<!-- /wp:paragraph --></div>
+					<!-- /wp:column --></div>
+					<!-- /wp:columns -->',
+);

+ 43 - 0
stewart/inc/patterns/sidebar-background.php

@@ -0,0 +1,43 @@
+<?php
+/**
+ * Sidebar with background color block pattern
+ */
+return array(
+	'title'      => __( 'Sidebar with background color', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group {"style":{"spacing":{"padding":{"top":"0em","right":"0em","bottom":"0em","left":"0em"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background","layout":{"inherit":true}} -->
+					<div class="wp-block-group has-background-color has-foreground-background-color has-text-color has-background has-link-color" style="padding-top:0em;padding-right:0em;padding-bottom:0em;padding-left:0em"><!-- wp:image {"sizeSlug":"full","linkDestination":"none"} -->
+					<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/contact.jpg" alt="' . esc_html__( 'An abstract image featuring a brushstroke.', 'stewart' ) . '"/></figure>
+					<!-- /wp:image -->
+
+					<!-- wp:group {"style":{"spacing":{"padding":{"top":"0em","right":"2em","bottom":"2em","left":"2em"}}}} -->
+					<div class="wp-block-group" style="padding-top:0em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:site-title {"textAlign":"left","style":{"typography":{"lineHeight":"1.2"}},"fontSize":"gigantic"} /-->
+
+					<!-- wp:site-tagline {"textAlign":"left","fontSize":"small"} /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:navigation {"overlayBackgroundColor":"background","overlayTextColor":"foreground","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"spacing":{"blockGap":"0px"}}} -->
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","className":"is-style-logos-only","layout":{"type":"flex","justifyContent":"center"}} -->
+					<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:group --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":"80px"} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 51 - 0
stewart/inc/patterns/sidebar-blogging.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Blogging sidebar block pattern
+ */
+return array(
+	'title'      => __( 'Blogging sidebar', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group {"fontSize":"small"} -->
+					<div class="wp-block-group has-small-font-size"><!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:heading {"fontSize":"small"} -->
+					<h2 class="has-small-font-size">' . esc_html__( 'Start here', 'stewart' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:query {"query":{"perPage":5,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"only","inherit":false}} -->
+					<div class="wp-block-query"><!-- wp:post-template -->
+					<!-- wp:post-title {"isLink":true,"fontSize":"large"} /-->
+					<!-- /wp:post-template --></div>
+					<!-- /wp:query -->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:heading {"fontSize":"small"} -->
+					<h2 class="has-small-font-size">' . esc_html__( 'Archives', 'stewart' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:archives /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:heading {"fontSize":"small"} -->
+					<h2 class="has-small-font-size">' . esc_html__( 'Latest Comments', 'stewart' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:latest-comments {"displayAvatar":false,"displayDate":false,"displayExcerpt":false} /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":"80px"} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 39 - 0
stewart/inc/patterns/sidebar-border.php

@@ -0,0 +1,39 @@
+<?php
+/**
+ * Sidebar with border block pattern
+ */
+return array(
+	'title'      => __( 'Sidebar with border', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","right":"2em","bottom":"2em","left":"2em"}},"border":{"width":"1px"}}} -->
+					<div class="wp-block-group" style="border-width:1px;padding-top:2em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:site-logo {"width":90,"align":"center","className":"is-style-rounded"} /-->
+
+					<!-- wp:site-title {"textAlign":"center","style":{"typography":{"lineHeight":"1.2"}},"fontSize":"gigantic"} /-->
+
+					<!-- wp:site-tagline {"textAlign":"center","fontSize":"small"} /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:navigation {"overlayBackgroundColor":"background","overlayTextColor":"foreground","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"center","orientation":"vertical"},"style":{"spacing":{"blockGap":"0px"}}} -->
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","className":"is-style-logos-only","layout":{"type":"flex","justifyContent":"center"}} -->
+					<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:group -->
+
+					<!-- wp:spacer {"height":80} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 37 - 0
stewart/inc/patterns/sidebar-categories-tags.php

@@ -0,0 +1,37 @@
+<?php
+/**
+ * Sidebar with categories and tags block pattern
+ */
+return array(
+	'title'      => __( 'Sidebar with categories and tags', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group {"fontSize":"small"} -->
+					<div class="wp-block-group has-small-font-size"><!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:heading {"fontSize":"small"} -->
+					<h2 class="has-small-font-size">' . esc_html__( 'Categories', 'stewart' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:categories /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:heading {"fontSize":"small"} -->
+					<h2 class="has-small-font-size">' . esc_html__( 'Tags', 'stewart' ) . '</h2>
+					<!-- /wp:heading -->
+
+					<!-- wp:tag-cloud /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":"80px"} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 39 - 0
stewart/inc/patterns/sidebar-default.php

@@ -0,0 +1,39 @@
+<?php
+/**
+ * Default sidebar block pattern
+ */
+return array(
+	'title'      => __( 'Default sidebar', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group -->
+					<div class="wp-block-group"><!-- wp:site-logo {"width":90,"className":"is-style-rounded"} /-->
+
+					<!-- wp:site-title {"fontSize":"gigantic","style":{"typography":{"lineHeight":"1.2"}}} /-->
+
+					<!-- wp:site-tagline {"fontSize":"small"} /-->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"left","orientation":"vertical"},"style":{"spacing":{"blockGap":"0px"}},"overlayBackgroundColor":"background","overlayTextColor":"foreground"} -->
+					<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
+					<!-- /wp:navigation -->
+
+					<!-- wp:separator {"className":"is-style-wide"} -->
+					<hr class="wp-block-separator is-style-wide"/>
+					<!-- /wp:separator -->
+
+					<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","className":"items-justified-left is-style-logos-only"} -->
+					<ul class="wp-block-social-links has-icon-color items-justified-left 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:group -->
+
+					<!-- wp:spacer {"height":80} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 33 - 0
stewart/inc/patterns/sidebar-introduction.php

@@ -0,0 +1,33 @@
+<?php
+/**
+ * Sidebar with introduction block pattern
+ */
+return array(
+	'title'      => __( 'Sidebar with introduction', 'stewart' ),
+	'categories' => array( 'sidebar' ),
+	'content'    => '<!-- wp:group {"style":{"spacing":{"padding":{"top":"0em","right":"0em","bottom":"0em","left":"0em"}},"border":{"width":"1px"}},"layout":{"inherit":false}} -->
+					<div class="wp-block-group" style="border-width:1px;padding-top:0em;padding-right:0em;padding-bottom:0em;padding-left:0em"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
+					<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/about.jpg" alt="' . esc_html__( 'A collage featuring the portrait of a woman.', 'stewart' ) . '"/></figure>
+					<!-- /wp:image -->
+
+					<!-- wp:group {"style":{"spacing":{"padding":{"top":"0em","right":"2em","bottom":"2em","left":"2em"}}}} -->
+					<div class="wp-block-group" style="padding-top:0em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:site-title {"textAlign":"left","style":{"typography":{"lineHeight":"1.2"}},"fontSize":"gigantic"} /-->
+
+					<!-- wp:paragraph {"fontSize":"small"} -->
+					<p class="has-small-font-size">' . esc_html__( 'Welcome to the blog! I’m an artist and author who writes about her process and inspiration. Follow along as I explore new mediums, submit my work to galleries, and ultimately pursue a career in art.', 'stewart' ) . '</p>
+					<!-- /wp:paragraph -->
+
+					<!-- wp:social-links {"iconColor":"foreground","iconColorValue":"var(--wp--preset--color--foreground)","className":"is-style-logos-only","layout":{"type":"flex","justifyContent":"center"}} -->
+					<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:group --></div>
+					<!-- /wp:group -->
+
+					<!-- wp:spacer {"height":"80px"} -->
+					<div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer -->',
+);

+ 1 - 15
stewart/parts/footer.html

@@ -1,15 +1 @@
-<!-- wp:spacer {"height":60} -->
-<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
-
-<!-- wp:group -->
-<div class="wp-block-group">
-	<!-- wp:paragraph {"align":"center","fontSize":"tiny"} -->
-	<p class="has-text-align-center has-tiny-font-size">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
-	<!-- /wp:paragraph -->
-</div>
-<!-- /wp:group -->
-
-<!-- wp:spacer {"height":60} -->
-<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
+<!-- wp:pattern {"slug":"stewart/footer-default"} /-->

+ 10 - 5
stewart/parts/header-title-nav.html

@@ -1,6 +1,11 @@
-<!-- wp:group {"align":"full","layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"top":"var(--wp--custom--margin--horizontal, 30px)","bottom":"40px"}}}} -->
-<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--margin--horizontal, 30px);padding-bottom:40px">
-	<!-- wp:site-title /-->
-	<!-- wp:navigation {"isResponsive":true,"__unstableLocation":"primary"} /-->
-</div>
+<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
+<div class="wp-block-group alignfull"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var(-d-dwp-d-dcustom-d-dmargin-d-dhorizontal, 30px)","bottom":"40px"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
+<div class="wp-block-group alignwide" style="padding-top:var(--wp--custom--margin--horizontal, 30px);padding-bottom:40px"><!-- wp:group {"layout":{"type":"flex"}} -->
+<div class="wp-block-group"><!-- wp:site-logo {"width":64} /-->
+
+<!-- wp:site-title /--></div>
+<!-- /wp:group -->
+
+<!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","orientation":"horizontal"}} /--></div>
+<!-- /wp:group --></div>
 <!-- /wp:group -->

+ 17 - 4
stewart/readme.txt

@@ -31,7 +31,20 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
 
-This theme uses the following third-party resource in its theme screenshot:
-
-"Swedish Windows / Fönster no. 1" by Fons Heijnsbroek
-https://www.flickr.com/photos/abstract-art-fons/28822761186/
+This theme bundles the following third-party resources:
+
+Paintings by Fons Heijnsbroek
+License: CC0
+Source: https://www.flickr.com/photos/abstract-art-fons/28822761186/
+		https://www.flickr.com/photos/abstract-art-fons/28822761186/
+Used in the screenshot, and in block patterns. 
+
+"Girl Arranging Her Hair" by Abbott Handerson Thayer
+License: CC0
+Source: https://www.rawpixel.com/image/3235928/free-illustration-image-portrait-vintage-women-painting
+Used in block patterns. 
+
+Excerpts from "Emma" by Jane Austen
+License: Public Domain
+Source: https://www.gutenberg.org/ebooks/158
+Used in the screenshot, and for block pattern placeholder text.