فهرست منبع

Pendant: layout for index template (#5751)

Co-authored-by: Jason Crist <jcrist@pbking.com>
Maggie 3 سال پیش
والد
کامیت
48c5436d11
2فایلهای تغییر یافته به همراه68 افزوده شده و 25 حذف شده
  1. 34 25
      pendant/templates/index.html
  2. 34 0
      pendant/theme.json

+ 34 - 25
pendant/templates/index.html

@@ -1,33 +1,42 @@
 <!-- wp:template-part {"slug":"header","tagName":"header"} /-->
 
-<!-- wp:query {"tagName":"main","layout":{"inherit":true}} -->
-<main class="wp-block-query">
-	<!-- wp:post-template -->
-	<!-- wp:group -->
-	<div class="wp-block-group">
-		<!-- wp:post-title {"isLink":true} /-->
-		<!-- wp:post-featured-image {"isLink":true} /-->
-		<!-- wp:post-excerpt /-->
-		<!-- wp:template-part {"slug":"post-meta"} /-->
-		<!-- wp:spacer {"height":40} -->
-		<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
-		<!-- /wp:spacer -->
-	</div>
+<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px"},"padding":{"top":"5em","bottom":"5em"}}},"backgroundColor":"foreground","textColor":"background","layout":{"inherit":true}} -->
+<div class="wp-block-group has-background-color has-foreground-background-color has-text-color has-background" style="margin-top:0px;padding-top:5em;padding-bottom:5em"><!-- wp:heading {"level":1,"align":"wide"} -->
+	<h1 class="alignwide">Articles</h1>
+	<!-- /wp:heading --></div>
+<!-- /wp:group -->
+
+<!-- wp:query {"queryId":1,"query":{"perPage":4,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":true},"tagName":"main","displayLayout":{"type":"flex","columns":2},"layout":{"inherit":true}} -->
+<main class="wp-block-query"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"1em","bottom":"1.5em"}}}} -->
+	<div class="wp-block-group alignwide" style="padding-top:1em;padding-bottom: 1.5em"><!-- wp:post-template -->
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","bottom":"2em"}}}} -->
+	<div class="wp-block-group" style="padding-top:2em;padding-bottom:2em"><!-- wp:post-featured-image {"isLink":true,"width":"100%","height":"16em"} /-->
+	
+	<!-- wp:post-title {"level":3,"isLink":true} /-->
+	<!-- wp:post-excerpt /-->
+
+	<!-- wp:read-more {"style":{"typography":{"fontStyle":"normal","fontWeight":"500"}},"fontSize":"medium"} /--></div>
 	<!-- /wp:group -->
 	<!-- /wp:post-template -->
-	<!-- wp:group {"layout":{"inherit":true}} -->
-		<div class="wp-block-group">
-		<!-- wp:query-pagination -->
-			<!-- wp:query-pagination-previous /-->
+
+	</div>
+	<!-- /wp:group -->
 	
-			<!-- wp:query-pagination-numbers /-->
+	<!-- wp:separator {"align":"wide","backgroundColor":"foreground","className":"is-style-wide"} -->
+	<hr class="wp-block-separator alignwide has-text-color has-foreground-color has-alpha-channel-opacity has-foreground-background-color has-background is-style-wide"/>
+	<!-- /wp:separator -->
+
+	<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"0"},"padding":{"top":"2.5em","bottom":"2.5em"}}}} -->
+	<div class="wp-block-group alignwide" style="margin-top:0;padding-top:2.5em;padding-bottom:2.5em"><!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"space-between"}} -->
+	<!-- wp:query-pagination-previous /-->
+	
+	<!-- wp:query-pagination-numbers /-->
 	
-			<!-- wp:query-pagination-next /-->
-		<!-- /wp:query-pagination -->
-		</div>
-		<!-- /wp:group -->
+	<!-- wp:query-pagination-next /-->
+	<!-- /wp:query-pagination --></div>
+	<!-- /wp:group -->
+
 	</main>
 	<!-- /wp:query -->
-	
-	<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer-container"} /-->
-	
+
+<!-- wp:template-part {"slug":"footer","tagName":"footer","className":"site-footer-container"} /-->

+ 34 - 0
pendant/theme.json

@@ -157,6 +157,11 @@
 				}
 			],
 			"fontSizes": [
+				{
+					"name": "Extra Small",
+					"size": "0.9rem",
+					"slug": "x-small"
+				},
 				{
 					"name": "Small",
 					"size": "1rem",
@@ -220,6 +225,35 @@
 					"fontSize": "var(--wp--preset--font-size--medium)"
 				}
 			},
+			"core/query-pagination": {
+				"elements": {
+					"link": {
+						"color": {
+							"text": "var(--wp--preset--color--foreground)"
+						}
+					}
+				}
+			},
+			"core/query-pagination-next": {
+				"typography": {
+					"fontWeight": "500",
+					"textTransform": "uppercase",
+					"fontSize": "var(--wp--preset--font-size--x-small)"
+				}
+			},
+			"core/query-pagination-numbers": {
+				"typography": {
+					"fontWeight": "500",
+					"fontSize": "var(--wp--preset--font-size--x-small)"
+				}
+			},
+			"core/query-pagination-previous": {
+				"typography": {
+					"fontWeight": "500",
+					"textTransform": "uppercase",
+					"fontSize": "var(--wp--preset--font-size--x-small)"
+				}
+			},
 			"core/site-title": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--medium)",