浏览代码

Remove unused navigation header template part. (#3970)

* Remove unused navigation header template part.

This change removes the unused navigation template part and the
reference to it from theme.json.  It also updates the navigation block
in the header template part to include responsive navigation by default
and remove unnecessary block attributes (values were either default or
expressed in theme.json).

* changed header to div to prevent double header elements in rendered page
Jason Crist 4 年之前
父节点
当前提交
580b8f9866
共有 3 个文件被更改,包括 4 次插入13 次删除
  1. 4 4
      blockbase/block-template-parts/header.html
  2. 0 5
      blockbase/block-template-parts/navigation.html
  3. 0 4
      blockbase/theme.json

+ 4 - 4
blockbase/block-template-parts/header.html

@@ -1,6 +1,6 @@
 <!-- wp:group {"align":"full","tagName":"header","style":{"spacing":{"padding":{"right":"35px","left":"35px"}}},"className":"site-header"} -->
-<header class="wp-block-group alignfull site-header" style="padding-right:35px;padding-left:35px">
+<div class="wp-block-group alignfull site-header" style="padding-right:35px;padding-left:35px">
 	<!-- wp:site-title /-->
-	<!-- wp:navigation {"orientation":"horizontal","textColor":"foreground-light","itemsJustification":"right","fontSize":"small"} /-->
-</header>
-<!-- /wp:group -->
+	<!-- wp:navigation {"isResponsive":true} /-->
+</div>
+<!-- /wp:group -->

+ 0 - 5
blockbase/block-template-parts/navigation.html

@@ -1,5 +0,0 @@
-<!-- wp:navigation {"orientation":"horizontal","itemsJustification":"center","isResponsive":true} -->
-<!-- /wp:navigation -->
-<!-- wp:spacer {"height":60} -->
-<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->

+ 0 - 4
blockbase/theme.json

@@ -8,10 +8,6 @@
 		{
 			"name": "footer",
 			"area": "footer"
-		},
-		{
-			"name": "navigation",
-			"area": "navigation"
 		}
 	],
 	"settings": {