Browse Source

Bedrock: Move template parts from patterns and add them to templates (#7680)

Takashi Irie 1 year ago
parent
commit
a919b07a55

+ 0 - 8
bedrock/patterns/404.php

@@ -7,8 +7,6 @@
 declare( strict_types = 1 );
 ?>
 
-<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
-
 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
 	<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
@@ -50,9 +48,3 @@ declare( strict_types = 1 );
 	<!-- /wp:cover -->
 </div>
 <!-- /wp:group -->
-
-<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
-</div>
-<!-- /wp:group -->

+ 0 - 8
bedrock/patterns/index.php

@@ -7,8 +7,6 @@
 declare( strict_types = 1 );
 ?>
 
-<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
-
 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
 	<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
@@ -44,9 +42,3 @@ declare( strict_types = 1 );
 	<!-- /wp:cover -->
 </div>
 <!-- /wp:group -->
-
-<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
-</div>
-<!-- /wp:group -->

+ 0 - 8
bedrock/patterns/page.php

@@ -7,8 +7,6 @@
 declare( strict_types = 1 );
 ?>
 
-<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
-
 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
 	<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
@@ -50,9 +48,3 @@ declare( strict_types = 1 );
 	<!-- /wp:cover -->
 </div>
 <!-- /wp:group -->
-
-<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
-</div>
-<!-- /wp:group -->

+ 1 - 0
bedrock/patterns/post-meta.php

@@ -6,6 +6,7 @@
  */
 declare( strict_types = 1 );
 ?>
+
 <!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40"},"typography":{"lineHeight":"1"}},"textColor":"secondary","layout":{"type":"flex","flexWrap":"wrap"}} -->
 <div class="wp-block-group has-secondary-color has-text-color" style="line-height:1">
 	<!-- wp:image {"width":"20px","height":"20px","scale":"cover","sizeSlug":"full","linkDestination":"none"} -->

+ 0 - 9
bedrock/patterns/search.php

@@ -7,8 +7,6 @@
 declare( strict_types = 1 );
 ?>
 
-<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
-
 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
 	<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
@@ -92,10 +90,3 @@ declare( strict_types = 1 );
 	<!-- /wp:cover -->
 </div>
 <!-- /wp:group -->
-
-<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
-</div>
-<!-- /wp:group -->
-

+ 0 - 9
bedrock/patterns/single.php

@@ -7,8 +7,6 @@
 declare( strict_types = 1 );
 ?>
 
-<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
-
 <!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
 <div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
 	<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
@@ -64,10 +62,3 @@ declare( strict_types = 1 );
 	<!-- /wp:cover -->
 </div>
 <!-- /wp:group -->
-
-<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
-<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
-</div>
-<!-- /wp:group -->
-

+ 9 - 1
bedrock/templates/404.html

@@ -1 +1,9 @@
-<!-- wp:pattern {"slug":"bedrock/404"} /-->
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
+<!-- wp:pattern {"slug":"bedrock/404"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->

+ 8 - 0
bedrock/templates/archive.html

@@ -1 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
 <!-- wp:pattern {"slug":"bedrock/archive"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->

+ 8 - 0
bedrock/templates/index.html

@@ -1 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
 <!-- wp:pattern {"slug":"bedrock/index"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->

+ 8 - 0
bedrock/templates/page.html

@@ -1 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
 <!-- wp:pattern {"slug":"bedrock/page"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->

+ 8 - 0
bedrock/templates/search.html

@@ -1 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
 <!-- wp:pattern {"slug":"bedrock/search"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->

+ 8 - 0
bedrock/templates/single.html

@@ -1 +1,9 @@
+<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->
+
 <!-- wp:pattern {"slug":"bedrock/single"} /-->
+
+<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
+<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
+	<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
+</div>
+<!-- /wp:group -->