Explorar el Código

Remote: Image with text pattern (#5665)

* added pattern

* license for image

* removed columns
Maggie hace 3 años
padre
commit
8f80663cd5

BIN
remote/assets/images/Home-office.jpg


BIN
remote/assets/images/Laptop.jpg


+ 1 - 0
remote/inc/block-patterns.php

@@ -44,6 +44,7 @@ function remote_register_block_patterns() {
 		'hero-text',
 		'hidden-404-content',
 		'hidden-search-form',
+		'image-with-text',
 		'posts-grid',
 		'posts-list',
 		'tags',

+ 25 - 0
remote/inc/patterns/image-with-text.php

@@ -0,0 +1,25 @@
+<?php
+/**
+ * Image with text
+ */
+return array(
+	'title'      => __( 'Image with text', 'remote' ),
+	'categories' => array( 'text', 'columns' ),
+	'content'    => '<!-- wp:image {"align":"wide","sizeSlug":"large","linkDestination":"none","className":"is-style-skatepark-aside-caption"} -->
+	<figure class="wp-block-image alignwide size-large is-style-skatepark-aside-caption"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/laptop.jpg" alt="' . esc_attr__( 'Picture of a laptop', 'remote' ) . '"/></figure>
+	<!-- /wp:image -->
+	
+	<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":"50px","padding":{"top":"20px"}}}} -->
+	<div class="wp-block-columns alignwide" style="padding-top:20px"><!-- wp:column -->
+	<div class="wp-block-column"><!-- wp:paragraph -->
+	<p>' . esc_html__( 'Now that I’m working from home, I find that I am spending more time with my family, exercising more, and getting more sleep. This has not been at the expense of my productivity at work — if anything, my productivity has improved as well. I’ve become a pro at collaborating effectively across time zones. Most of my colleagues are in Europe or Asia, but I’m in way over California. I’d been worried that the distance would become a problem for us, but we’ve embraced asynchronous communication styles.', 'remote' ) . '</p>
+	<!-- /wp:paragraph --></div>
+	<!-- /wp:column -->
+	
+	<!-- wp:column {"width":"27%"} -->
+	<div class="wp-block-column" style="flex-basis:27%"><!-- wp:paragraph {"fontSize":"small"} -->
+	<p class="has-small-font-size">' . esc_html__( 'I setup my home office on day one, but it wasn’t ergonomically correct for me. So I’ve been revising it throughout the past few months.', 'remote' ) . '</p>
+	<!-- /wp:paragraph --></div>
+	<!-- /wp:column --></div>
+	<!-- /wp:columns -->',
+);

+ 8 - 1
remote/readme.txt

@@ -28,4 +28,11 @@ the Free Software Foundation, either version 2 of the License, or
 This program is distributed in the hope that it will be useful,
 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.
+GNU General Public License for more details.
+
+Remote is derived from Twenty Twenty-Two, (C) 2021-2022 WordPress.org.
+
+This theme bundles the following third-party resources:
+
+Laptop Photo from Piqsels, CC0
+https://www.piqsels.com/en/public-domain-photo-svvhe