浏览代码

update header template (#6475)

* update header template

* Remove emptyline.

Co-authored-by: Jeff Ong <jonger4@gmail.com>
Madhu Dollu 2 年之前
父节点
当前提交
fb4d38e85c
共有 2 个文件被更改,包括 18 次插入23 次删除
  1. 11 23
      pixel/parts/header.html
  2. 7 0
      pixel/style.css

+ 11 - 23
pixel/parts/header.html

@@ -1,27 +1,15 @@
-<!-- wp:group {"layout":{"inherit":"true"}} -->
-<div class="wp-block-group">
-	<!-- wp:group {"align":"full","layout":{"type":"flex","justifyContent":"space-between"},"style":{"spacing":{"padding":{"bottom":"var(--wp--custom--gap--vertical)","top":"var(--wp--custom--gap--vertical)"}}}} -->
-	<div class="wp-block-group alignfull" style="padding-bottom:var(--wp--custom--gap--vertical);padding-top:var(--wp--custom--gap--vertical)">
-	
-		<!-- wp:group {"layout":{"type":"flex"}} -->
-		<div class="wp-block-group">
-			<!-- wp:site-logo {"width":64} /-->
-	
-			<!-- wp:group -->
-			<div class="wp-block-group">
-				<!-- wp:site-title /-->
-				<!-- wp:site-tagline /-->
-			</div>
-			<!-- /wp:group -->
-		</div>
-		<!-- /wp:group -->
-	
-		<!-- wp:navigation {"__unstableLocation":"primary","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /-->
-	
-	</div>
-	<!-- /wp:group -->
+<!-- wp:group {"layout":{"inherit":"true","type":"constrained"},"style":{"spacing":{"blockGap":"0","padding":{"top":"1.25rem","right":"1.25rem","bottom":"1.25rem","left":"1.25rem"}}}} -->
+<div class="wp-block-group" style="padding-top:1.25rem;padding-right:1.25rem;padding-bottom:1.25rem;padding-left:1.25rem"><!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"},"align":"full","style":{"spacing":{"padding":{"bottom":"0.5rem","top":"0.5rem","right":"1rem","left":"1rem"},"blockGap":"0"},"border":{"width":"2px"}},"className":"pixel-shadow"} -->
+<div class="wp-block-group alignfull pixel-shadow" style="border-width:2px;padding-top:0.5rem;padding-right:1rem;padding-bottom:0.5rem;padding-left:1rem"><!-- wp:group {"layout":{"type":"flex"}} -->
+<div class="wp-block-group"><!-- wp:site-logo {"width":64} /-->
 
-</div>
+<!-- wp:group -->
+<div class="wp-block-group"><!-- wp:site-title /--></div>
+<!-- /wp:group --></div>
+<!-- /wp:group -->
+
+<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"}}}} /--></div>
+<!-- /wp:group --></div>
 <!-- /wp:group -->
 
 <!-- wp:spacer {"height":50} -->

+ 7 - 0
pixel/style.css

@@ -15,3 +15,10 @@ Text Domain: pixel
 Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks
 */
 
+/* 
+ * Custom class to add shadow to blocks
+ * Need this until box shadow support added to Gutenberg here: https://github.com/WordPress/gutenberg/pull/43184 
+ */
+.pixel-shadow {
+    box-shadow: 5px 5px 0px -2px var(--wp--preset--color--background), 5px 5px var(--wp--preset--color--foreground);
+}