Forráskód Böngészése

Adventurer: design fixes (#6917)

* Fix font weights for headings.

* Add appearanceTools support.

* Add search to bottom of home template.

* Add spacer to query loop post templates.

* Fix no results template.
Jeff Ong 2 éve
szülő
commit
631cca5a85

+ 10 - 0
adventurer/patterns/hidden-no-results-content.php

@@ -0,0 +1,10 @@
+<?php
+/**
+ * Title: Hidden No Results Content
+ * Slug: adventurer/hidden-no-results-content
+ * Inserter: no
+ */
+?>
+<!-- wp:paragraph -->
+<p><?php echo esc_html_x( 'Sorry, but nothing matched your search. Perhaps try again with some different terms?', 'Message explaining that there are no results returned from a search', 'adventurer' ); ?></p>
+<!-- /wp:paragraph -->

+ 21 - 0
adventurer/patterns/search.php

@@ -0,0 +1,21 @@
+<?php
+/**
+ * Title: Search
+ * Slug: adventurer/search
+ * Inserter: no
+ */
+?>
+
+<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"8rem","bottom":"8rem","left":"var:preset|spacing|50","right":"var:preset|spacing|50"}}},"backgroundColor":"primary","layout":{"type":"constrained","contentSize":"1100px"}} -->
+<div class="wp-block-group alignfull has-primary-background-color has-background" style="padding-top:8rem;padding-right:var(--wp--preset--spacing--50);padding-bottom:8rem;padding-left:var(--wp--preset--spacing--50)"><!-- wp:columns -->
+<div class="wp-block-columns"><!-- wp:column -->
+<div class="wp-block-column"><!-- wp:heading {"textAlign":"left","level":3,"style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"textColor":"background","fontSize":"large"} -->
+<h3 class="wp-block-heading has-text-align-left has-background-color has-text-color has-link-color has-large-font-size"><?php echo esc_html__( 'Don\'t find what you\'re looking for? Search posts here.', 'adventurer' ); ?></h3>
+<!-- /wp:heading --></div>
+<!-- /wp:column -->
+
+<!-- wp:column -->
+<div class="wp-block-column"><!-- wp:search {"label":"<?php echo esc_html__( 'Search', 'adventurer' ); ?>","showLabel":false,"placeholder":"<?php echo esc_attr__( 'E.g. "Botswana"', 'adventurer' ); ?>","width":538,"widthUnit":"px","buttonText":"<?php echo esc_html__( 'Search', 'adventurer' ); ?>","style":{"border":{"width":"0px","style":"none","radius":"2px"},"typography":{"letterSpacing":"1px","fontStyle":"normal","fontWeight":"400","fontSize":"0.8rem"}},"backgroundColor":"background","textColor":"primary"} /--></div>
+<!-- /wp:column --></div>
+<!-- /wp:columns --></div>
+<!-- /wp:group -->

+ 3 - 0
adventurer/templates/archive.html

@@ -11,6 +11,9 @@
             <!-- wp:post-date {"style":{"typography":{"fontStyle":"normal","fontWeight":"500","textTransform":"uppercase","letterSpacing":"1px","fontSize":"0.8rem"}}} /-->
             <!-- wp:post-title {"isLink":true,"style":{"typography":{"fontSize":"48px"}}} /-->
             <!-- wp:post-excerpt /-->
+            <!-- wp:spacer {"height":"80px"} -->
+            <div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+            <!-- /wp:spacer -->
         </div>
         <!-- /wp:group -->
         <!-- /wp:post-template -->

+ 2 - 0
adventurer/templates/home.html

@@ -4,6 +4,8 @@
 
     <!-- wp:pattern {"slug":"adventurer/list"} /-->
 
+    <!-- wp:pattern {"slug":"adventurer/search"} /-->
+
     <!-- wp:template-part {"slug":"footer","tagName":"footer"} /-->
 </div>
 <!-- /wp:group -->

+ 3 - 0
adventurer/templates/index.html

@@ -13,6 +13,9 @@
         <!-- wp:post-date {"style":{"typography":{"fontStyle":"normal","fontWeight":"500","textTransform":"uppercase","letterSpacing":"1px","fontSize":"0.8rem"}}} /-->
         <!-- wp:post-title {"isLink":true,"style":{"typography":{"fontSize":"48px"}}} /-->
         <!-- wp:post-excerpt /-->
+        <!-- wp:spacer {"height":"80px"} -->
+        <div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+        <!-- /wp:spacer -->
     </div>
     <!-- /wp:group -->
     <!-- /wp:post-template -->

+ 9 - 0
adventurer/templates/search.html

@@ -26,10 +26,18 @@
             <!-- wp:post-title {"isLink":true,"style":{"typography":{"fontSize":"48px"}}} /-->
 
             <!-- wp:post-excerpt /-->
+
+            <!-- wp:spacer {"height":"80px"} -->
+            <div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
+            <!-- /wp:spacer -->
         </div>
         <!-- /wp:group -->
         <!-- /wp:post-template -->
 
+        <!-- wp:query-no-results -->
+        <!-- wp:pattern {"slug":"adventurer/hidden-no-results-content"} /-->
+        <!-- /wp:query-no-results -->
+
         <!-- wp:spacer {"height":"8vh"} -->
         <div style="height:8vh" aria-hidden="true" class="wp-block-spacer"></div>
         <!-- /wp:spacer -->
@@ -43,6 +51,7 @@
             <!-- /wp:query-pagination -->
             </div>
             <!-- /wp:group -->
+            
 
         <!-- wp:spacer {"height":"14vh"} -->
         <div style="height:14vh" aria-hidden="true" class="wp-block-spacer"></div>

+ 11 - 35
adventurer/theme.json

@@ -1,5 +1,6 @@
 {
 	"settings": {
+		"appearanceTools": true,
 		"border": {
 			"color": true,
 			"radius": true,
@@ -46,14 +47,7 @@
 			"blockGap": true,
 			"margin": true,
 			"padding": true,
-			"units": [
-				"%",
-				"px",
-				"em",
-				"rem",
-				"vh",
-				"vw"
-			]
+			"units": ["%", "px", "em", "rem", "vh", "vw"]
 		},
 		"typography": {
 			"customFontSize": true,
@@ -65,17 +59,13 @@
 							"fontFamily": "Rubik",
 							"fontStyle": "normal",
 							"fontWeight": "900",
-							"src": [
-								"file:./assets/fonts/rubik_900.ttf"
-							]
+							"src": ["file:./assets/fonts/rubik_900.ttf"]
 						},
 						{
 							"fontFamily": "Rubik",
 							"fontStyle": "italic",
 							"fontWeight": "900",
-							"src": [
-								"file:./assets/fonts/rubik_900italic.ttf"
-							]
+							"src": ["file:./assets/fonts/rubik_900italic.ttf"]
 						}
 					],
 					"fontFamily": "Rubik",
@@ -87,49 +77,37 @@
 							"fontFamily": "Roboto",
 							"fontStyle": "normal",
 							"fontWeight": "300",
-							"src": [
-								"file:./assets/fonts/roboto_300.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_300.ttf"]
 						},
 						{
 							"fontFamily": "Roboto",
 							"fontStyle": "normal",
 							"fontWeight": "500",
-							"src": [
-								"file:./assets/fonts/roboto_500.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_500.ttf"]
 						},
 						{
 							"fontFamily": "Roboto",
 							"fontStyle": "italic",
 							"fontWeight": "300",
-							"src": [
-								"file:./assets/fonts/roboto_300italic.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_300italic.ttf"]
 						},
 						{
 							"fontFamily": "Roboto",
 							"fontStyle": "italic",
 							"fontWeight": "500",
-							"src": [
-								"file:./assets/fonts/roboto_500italic.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_500italic.ttf"]
 						},
 						{
 							"fontFamily": "Roboto",
 							"fontStyle": "normal",
 							"fontWeight": "700",
-							"src": [
-								"file:./assets/fonts/roboto_700.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_700.ttf"]
 						},
 						{
 							"fontFamily": "Roboto",
 							"fontStyle": "italic",
 							"fontWeight": "700",
-							"src": [
-								"file:./assets/fonts/roboto_700italic.ttf"
-							]
+							"src": ["file:./assets/fonts/roboto_700italic.ttf"]
 						}
 					],
 					"fontFamily": "Roboto",
@@ -518,7 +496,6 @@
 					"fontFamily": "Rubik",
 					"fontSize": "var:preset|font-size|medium",
 					"fontStyle": "normal",
-					"fontWeight": "600",
 					"textTransform": "uppercase"
 				}
 			},
@@ -545,7 +522,6 @@
 			"heading": {
 				"typography": {
 					"fontFamily": "var(--wp--preset--font-family--rubik)",
-					"fontWeight": "400",
 					"lineHeight": "1.125"
 				}
 			},
@@ -592,4 +568,4 @@
 	],
 	"version": 2,
 	"$schema": "https://schemas.wp.org/trunk/theme.json"
-}
+}