Browse Source

Archeo: Move footer part markup into pattern (#5562)

* Move footer part into pattern

* Remove site-footer-container class
Sarah Norris 3 years ago
parent
commit
ed158da125

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

@@ -41,6 +41,7 @@ function archeo_register_block_patterns() {
 	}
 
 	$block_patterns = array(
+		'footer',
 		'headline-over-dark-image',
 		'hidden-404',
 		'image-with-headline-on-dark-background',

+ 22 - 0
archeo/inc/patterns/footer.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * Default footer block pattern
+ */
+return array(
+	'title'      => __( 'Default footer', 'archeo' ),
+	'categories' => array( 'footer' ),
+	'blockTypes' => array( 'core/template-part/footer' ),
+	'content'    => '<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--medium)","top":"var(--wp--custom--spacing--medium)"}}}} -->
+	<div class="wp-block-group" style="padding-top: var(--wp--custom--spacing--medium); padding-bottom: var(--wp--custom--spacing--medium);">
+		<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"center"},"overlayMenu":"never","style":{"typography":{"fontStyle":"normal"},"spacing":{"blockGap":"50px"}},"fontSize":"small"} /-->
+	
+		<!-- wp:paragraph {"align":"center","fontSize":"small","style":{"spacing":{"margin":{"top":0}}}} -->
+		<p class="has-text-align-center has-small-font-size" style="margin-top: 0;">' .
+		sprintf(
+			/* Translators: WordPress link. */
+			esc_html__( 'Proudly powered by %s', 'archeo' ),
+			'<a href="' . esc_url( __( 'https://wordpress.org', 'archeo' ) ) . '" rel="nofollow">WordPress</a>'
+		) . '</p>
+		<!-- /wp:paragraph --></div>
+		<!-- /wp:group -->',
+);

+ 1 - 9
archeo/parts/footer.html

@@ -1,9 +1 @@
-<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"bottom":"var(--wp--custom--spacing--medium)","top":"var(--wp--custom--spacing--medium)"}}}} -->
-<div class="wp-block-group" style="padding-top: 100px; padding-bottom: 100px;">
-	<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"center"},"overlayMenu":"never","style":{"typography":{"fontStyle":"normal"},"spacing":{"blockGap":"50px"}},"fontSize":"small"} /-->
-
-	<!-- wp:paragraph {"align":"center","fontSize":"small","style":{"spacing":{"margin":{"top":0}}}} -->
-	<p class="has-text-align-center has-small-font-size" style="margin-top: 0;">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
-	<!-- /wp:paragraph -->
-</div>
-<!-- /wp:group -->
+<!-- wp:pattern {"slug":"archeo/footer"} /-->

+ 1 - 1
archeo/templates/archive.html

@@ -17,4 +17,4 @@
 </main>
 <!-- /wp:query -->
 
-<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer","className":"site-footer-container"} /-->
+<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer"} /-->

+ 1 - 1
archeo/templates/index.html

@@ -16,4 +16,4 @@
 </main>
 <!-- /wp:query -->
 
-<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer","className":"site-footer-container"} /-->
+<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer"} /-->

+ 1 - 1
archeo/templates/search.html

@@ -21,4 +21,4 @@
 </main>
 <!-- /wp:query -->
 
-<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer","className":"site-footer-container"} /-->
+<!-- wp:template-part {"area":"footer","slug":"footer","tagName":"footer"} /-->