Sfoglia il codice sorgente

Merge pull request #4410 from Automattic/add/skatepark-search-template

Skatepark: Add search template
Sarah Norris 3 anni fa
parent
commit
8a4f923aa5

+ 1 - 1
skatepark/404.php

@@ -8,7 +8,7 @@
 get_header();
 ?>
 	<main class="container-404">
-		<h2 class="wp-block-post-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'skatepark' ); ?></h1>
+		<h2 class="wp-block-post-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'skatepark' ); ?></h2>
 
 		<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'skatepark' ); ?></p>
 

+ 27 - 0
skatepark/block-templates/search.html

@@ -0,0 +1,27 @@
+<!-- wp:template-part {"slug":"header","tagName":"header"} /-->
+
+<!-- wp:group {"layout":{"inherit":true}, "tagName":"main"} -->
+<main class="wp-block-group">
+
+	<!-- wp:search {"label":""} /-->
+
+	<!-- wp:spacer {"height":45} -->
+		<div style="height:45px" aria-hidden="true" class="wp-block-spacer"></div>
+	<!-- /wp:spacer -->
+
+	<!-- wp:query {"queryId":1,"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
+	<!-- wp:post-template -->
+
+		<!-- wp:post-title {"level":3,"isLink":true} /-->
+		<!-- wp:post-excerpt /-->
+		<!-- wp:separator {"className":"is-style-wide"} -->
+			<hr class="wp-block-separator is-style-wide"/>
+		<!-- /wp:separator -->
+
+	<!-- /wp:post-template -->
+	<!-- /wp:query -->
+
+</main>
+<!-- /wp:group -->
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","layout":{"inherit":true},"className":"site-footer-container"} /-->

+ 1 - 1
skatepark/sass/blocks/_query.scss

@@ -7,4 +7,4 @@
 			padding: 10px;
 		}
 	}
-}
+}