Archeo: Pattern cleanup (#5630)

* Fix typos.

* Fix line breaks and text.

* Tidy up pattern categories.
This commit is contained in:
Kjell Reigstad 2022-03-08 05:43:43 -05:00 committed by GitHub
parent 92b74ccc82
commit f2e6569990
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 29 additions and 18 deletions

View file

@ -14,7 +14,10 @@
*/
function archeo_register_block_patterns() {
$block_pattern_categories = array(
'pages' => array( 'label' => __( 'Pages', 'archeo' ) ),
'images' => array( 'label' => __( 'Images', 'archeo' ) ),
'featured' => array( 'label' => __( 'Featured', 'archeo' ) ),
'footer' => array( 'label' => __( 'Footers', 'archeo' ) ),
'query' => array( 'label' => __( 'Query', 'archeo' ) ),
);
/**

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Headline over dark image', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/assets/images/palais-du-gouverneur.jpg","dimRatio":80,"overlayColor":"foreground","minHeight":100,"minHeightUnit":"vh","contentPosition":"bottom left","align":"full"} -->
<div class="wp-block-cover alignfull has-custom-content-position is-position-bottom-left" style="min-height:100vh"><span aria-hidden="true" class="has-foreground-background-color has-background-dim-80 wp-block-cover__gradient-background has-background-dim"></span><img class="wp-block-cover__image-background" alt="' . esc_attr__( 'Photo of the Governor\'s Palace at Uxmal', 'archeo' ) . '" src="' . esc_url( get_template_directory_uri() ) . '/assets/images/palais-du-gouverneur.jpg" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"left","placeholder":"Write title…","style":{"typography":{"textTransform":"uppercase","fontStyle":"normal","fontWeight":"100","lineHeight":"1"}},"textColor":"white","fontSize":"huge"} -->
<p class="has-text-align-left has-white-color has-text-color has-huge-font-size" style="font-style:normal;font-weight:100;line-height:1;text-transform:uppercase">' . wp_kses_post( __( 'Governor\'s <br>palace at Uxmal, <br>detail of the <br>main gate', 'archeo' ) ) . '</p>

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Image with description and right-aligned headline', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:columns {"align":"full","backgroundColor":"background"} -->
<div class="wp-block-columns alignfull has-background-background-color has-background"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:cover {"overlayColor":"background","minHeight":670,"contentPosition":"bottom center","isDark":false} -->
@ -26,7 +26,7 @@ return array(
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>' . esc_html__( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important sites of Maya culture.', 'archeo' ) . '</p>
<p>' . esc_html__( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important sites of Mayan culture.', 'archeo' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->',

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Image with description', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"></div>

View file

@ -4,16 +4,24 @@
*/
return array(
'title' => __( 'Image with headline and description', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'featured', 'images' ),
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"0","right":"5vw","bottom":"0","left":"5vw"}}}} -->
<div class="wp-block-group alignfull" style="padding-top:0;padding-right:5vw;padding-bottom:0;padding-left:5vw"><!-- wp:media-text {"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/chahk.png","mediaType":"image","mediaWidth":64,"verticalAlignment":"top"} -->
<div class="wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-top" style="grid-template-columns:64% auto"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/chahk.png" alt="' . esc_attr__( 'Chahk: rain deity', 'archeo' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"textAlign":"right","style":{"typography":{"fontSize":"clamp(64px, 6vw, 100px)","lineHeight":"1","textTransform":"uppercase"},"spacing":{"margin":{"bottom":"48px"}}}} -->
<h2 class="has-text-align-right" id="chahk-raindeity" style="font-size:clamp(64px, 6vw, 100px);line-height:1;margin-bottom:48px;text-transform:uppercase">' . wp_kses_post( __( 'Chahk:<br>Rain<br>deity', 'archeo' ) ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph {"align":"right","fontSize":"small"} -->
<p class="has-text-align-right has-small-font-size">' . wp_kses_post( __( 'Chaahk is shown here clutching <br>his axe, ready to strike rain <br>thunder and rain from the <br>clouds. This sculpture was <br>likely created in the Puuc hills<br>of Yucatan and Campeche.', 'archeo' ) ) . '</p>
<!-- /wp:paragraph --></div></div>
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"15%"} -->
<div class="wp-block-column" style="flex-basis:15%"></div>
<!-- /wp:column -->
<!-- wp:column {"width":""} -->
<div class="wp-block-column"><!-- wp:paragraph {"align":"right","fontSize":"small"} -->
<p class="has-text-align-right has-small-font-size">' . esc_html__( 'Chaahk is shown here clutching his axe, ready to strike rain and thunder from the clouds. This sculpture was likely created in the Puuc hills of Yucatan and Campeche.', 'archeo' ) . '</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div></div>
<!-- /wp:media-text --></div>
<!-- /wp:group -->',
);

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Image with headline on dark background', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:media-text {"mediaPosition":"right","mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/figure-gigantesque.jpg","mediaType":"image","imageFill":false,"backgroundColor":"foreground","textColor":"background"} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile has-background-color has-foreground-background-color has-text-color has-background"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/figure-gigantesque.jpg" alt="' . esc_attr__( 'Photo of gigantic figure at Izamal', 'archeo' ) . '" /></figure><div class="wp-block-media-text__content">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"clamp(30px, 4vw, 80px)","right":"clamp(30px, 4vw, 80px)","bottom":"clamp(30px, 4vw, 80px)","left":"clamp(30px, 4vw, 80px)"}}}} -->

View file

@ -4,10 +4,10 @@
*/
return array(
'title' => __( 'Image with headline and separate description', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:media-text {"align":"full","mediaPosition":"right","mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/pyramid.jpg","mediaType":"image","mediaWidth":56,"imageFill":true,"focalPoint":{"x":"0.50","y":"0.28"}} -->
<div class="wp-block-media-text alignfull has-media-on-the-right is-stacked-on-mobile is-image-fill" style="grid-template-columns:auto 56%"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/assets/images/pyramid.jpg);background-position:50% 28.000000000000004%"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/pyramid.jpg" alt="' . esc_attr__( 'Photo of House of the dwarf, in Uxmal', 'archeo' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"style":{"typography":{"letterSpacing":"-0.02em","lineHeight":"1","textTransform":"uppercase","fontStyle":"normal","fontWeight":"100"}},"fontSize":"huge"} -->
<p class="has-huge-font-size" style="font-style:normal;font-weight:100;line-height:1;text-transform:uppercase;letter-spacing:-0.02em">' . wp_kses_post( __( 'House of <br>the dwarf, <br>in Uxmal', 'archeo' ) ) . '</p>
<p class="has-huge-font-size" style="font-style:normal;font-weight:100;line-height:1;text-transform:uppercase;letter-spacing:-0.02em">' . wp_kses_post( __( 'House of <br>the dwarf <br>in Uxmal', 'archeo' ) ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"min(26rem, 26vw)","bottom":"min(6rem, 6vw)"}}}} -->

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Layered images with headline', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'featured', 'images' ),
'content' => '<!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/assets/images/palais-du-cirque.jpg","dimRatio":80,"overlayColor":"background","minHeight":100,"minHeightUnit":"vh","contentPosition":"center center","isDark":false,"align":"full","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0vw","left":"7vw"},"margin":{"top":"0px"}}}} -->
<div class="wp-block-cover alignfull is-light" style="padding-top:0px;padding-right:0px;padding-bottom:0vw;padding-left:7vw;margin-top:0px;min-height:100vh"><span aria-hidden="true" class="has-background-background-color has-background-dim-80 wp-block-cover__gradient-background has-background-dim"></span><img class="wp-block-cover__image-background" alt="' . esc_attr__( 'Photo of Palace of the Circus', 'archeo' ) . '" src="' . esc_url( get_template_directory_uri() ) . '/assets/images/palais-du-cirque.jpg" data-object-fit="cover"/><div class="wp-block-cover__inner-container"><!-- wp:columns {"verticalAlignment":"top","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} -->
<div class="wp-block-columns are-vertically-aligned-top" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:column {"verticalAlignment":"top"} -->

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Layout with two images and text', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'featured', 'images' ),
'content' => '<!-- wp:media-text {"align":"full","mediaPosition":"right","mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/uxmal.jpg","mediaType":"image","imageFill":true,"focalPoint":{"x":"0.50","y":"0.90"},"backgroundColor":"foreground","textColor":"background"} -->
<div class="wp-block-media-text alignfull has-media-on-the-right is-stacked-on-mobile is-image-fill has-background-color has-foreground-background-color has-text-color has-background"><figure class="wp-block-media-text__media" style="background-image:url(' . esc_url( get_template_directory_uri() ) . '/assets/images/uxmal.jpg);background-position:50% 90%"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/uxmal.jpg" alt="' . __( 'Photo of the Pyramid of the Magician, at Uxmal', 'archeo' ) . '"/></figure><div class="wp-block-media-text__content"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
@ -13,7 +13,7 @@ return array(
<!-- /wp:spacer --><
<!-- wp:paragraph {"style":{"typography":{"fontStyle":"normal","fontWeight":"100","lineHeight":"1.2"}},"fontSize":"medium"} -->
<p class="has-medium-font-size" style="font-style:normal;font-weight:100;line-height:1.2">' . wp_kses_post( __( 'The Pyramid of the <br>Magician, at Uxmal', 'archeo' ) ) . '</p>
<p class="has-medium-font-size" style="font-style:normal;font-weight:100;line-height:1.2">' . wp_kses_post( __( 'The Pyramid of the <br>Magician at Uxmal', 'archeo' ) ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:image {"align":"left","sizeSlug":"full","linkDestination":"none"} -->
@ -27,7 +27,7 @@ return array(
<!-- /wp:spacer -->
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.5"}},"fontSize":"small"} -->
<p class="has-small-font-size" style="line-height:1.5">' . __( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important archaeological sites of Maya culture.', 'archeo' ) . '</p>
<p class="has-small-font-size" style="line-height:1.5">' . __( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important archaeological sites of Mayan culture.', 'archeo' ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.5"}},"fontSize":"small"} -->

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Simple list of posts with title and background', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'featured', 'query' ),
'content' => '<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--medium)","bottom":"var(--wp--custom--spacing--medium)"},"margin":{"top":"0px"}},"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background"} -->
<div class="wp-block-group alignwide has-background-color has-foreground-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--custom--spacing--medium);padding-bottom:var(--wp--custom--spacing--medium);margin-top:0px">
<!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"bottom":"60px"}}},"fontSize":"medium"} -->

View file

@ -4,7 +4,7 @@
*/
return array(
'title' => __( 'Simple list of posts', 'archeo' ),
'categories' => array( 'pages' ),
'categories' => array( 'images' ),
'content' => '<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--medium)","bottom":"var(--wp--custom--spacing--medium)"},"margin":{"top":"0px"}}}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--custom--spacing--medium);padding-bottom:var(--wp--custom--spacing--medium);margin-top:0px"><!-- wp:query {"queryId":3,"query":{"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"perPage":3}} -->
<div class="wp-block-query"><!-- wp:post-template -->