瀏覽代碼

Negai: Prepare the theme for the submission (#7611)

Takashi Irie 1 年之前
父節點
當前提交
b95a31f825
共有 8 個文件被更改,包括 78 次插入44 次删除
  1. 1 1
      negai/functions.php
  2. 2 0
      negai/patterns/404.php
  3. 2 0
      negai/patterns/footer.php
  4. 2 0
      negai/patterns/no-results-content.php
  5. 1 0
      negai/patterns/search.php
  6. 1 1
      negai/readme.txt
  7. 10 10
      negai/style.css
  8. 59 32
      negai/theme.json

+ 1 - 1
negai/functions.php

@@ -7,7 +7,7 @@
  * @package negai
  * @package negai
  * @since negai 1.0
  * @since negai 1.0
  */
  */
-
+declare( strict_types = 1 );
 
 
 if ( ! function_exists( 'negai_support' ) ) :
 if ( ! function_exists( 'negai_support' ) ) :
 
 

+ 2 - 0
negai/patterns/404.php

@@ -4,7 +4,9 @@
  * Slug: negai/404
  * Slug: negai/404
  * Inserter: no
  * Inserter: no
  */
  */
+declare( strict_types = 1 );
 ?>
 ?>
+
 <!-- wp:heading {"level":1,"fontSize":"huge","anchor":"oops-that-page-can-t-be-found"} -->
 <!-- wp:heading {"level":1,"fontSize":"huge","anchor":"oops-that-page-can-t-be-found"} -->
 <h1 class="wp-block-heading has-huge-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Nothing found. Maybe try a search?', 'negai' ); ?></h1>
 <h1 class="wp-block-heading has-huge-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Nothing found. Maybe try a search?', 'negai' ); ?></h1>
 <!-- /wp:heading -->
 <!-- /wp:heading -->

+ 2 - 0
negai/patterns/footer.php

@@ -5,7 +5,9 @@
  * Categories: featured, footer
  * Categories: featured, footer
  * Block Types: core/template-part/footer
  * Block Types: core/template-part/footer
  */
  */
+declare( strict_types = 1 );
 ?>
 ?>
+
 <!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
 <!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50"}}},"layout":{"type":"default"}} -->
 <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
 <div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
 	<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"fontSize":"medium"} -->
 	<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}},"fontSize":"medium"} -->

+ 2 - 0
negai/patterns/no-results-content.php

@@ -4,7 +4,9 @@
  * Slug: negai/no-results-content
  * Slug: negai/no-results-content
  * Inserter: no
  * Inserter: no
  */
  */
+declare( strict_types = 1 );
 ?>
 ?>
+
 <!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"var:preset|spacing|50","bottom":"0"}}},"fontSize":"huge"} -->
 <!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"var:preset|spacing|50","bottom":"0"}}},"fontSize":"huge"} -->
 <p class="has-huge-font-size" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:0"><?php echo esc_html_x( 'Nothing found. Try again with some different keywords.', 'Message explaining that there are no results returned from a search', 'negai' ); ?></p>
 <p class="has-huge-font-size" style="margin-top:var(--wp--preset--spacing--50);margin-bottom:0"><?php echo esc_html_x( 'Nothing found. Try again with some different keywords.', 'Message explaining that there are no results returned from a search', 'negai' ); ?></p>
 <!-- /wp:paragraph -->
 <!-- /wp:paragraph -->

+ 1 - 0
negai/patterns/search.php

@@ -4,6 +4,7 @@
  * Slug: negai/search
  * Slug: negai/search
  * Inserter: no
  * Inserter: no
  */
  */
+declare( strict_types = 1 );
 ?>
 ?>
 
 
 <!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Search...', 'This is a placeholder text in a search field', 'negai' ); ?>","buttonText":"Search","buttonUseIcon":true} /-->
 <!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Search...', 'This is a placeholder text in a search field', 'negai' ); ?>","buttonText":"Search","buttonUseIcon":true} /-->

+ 1 - 1
negai/readme.txt

@@ -1,7 +1,7 @@
 === Negai ===
 === Negai ===
 Contributors: Automattic
 Contributors: Automattic
 Requires at least: 6.0
 Requires at least: 6.0
-Tested up to: 6.2.2
+Tested up to: 6.4
 Requires PHP: 5.7
 Requires PHP: 5.7
 License: GPLv2 or later
 License: GPLv2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 License URI: http://www.gnu.org/licenses/gpl-2.0.html

+ 10 - 10
negai/style.css

@@ -1,17 +1,17 @@
 /*
 /*
 Theme Name: Negai
 Theme Name: Negai
-Theme URI: https://wordpress.com/theme/negai
+Theme URI: https://wordpress.com/theme/negai/
 Author: Automattic
 Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: Negai is a bold blogging theme with large post titles and interesting colour schemes
 Description: Negai is a bold blogging theme with large post titles and interesting colour schemes
 Requires at least: 6.0
 Requires at least: 6.0
-Tested up to: 6.2.2
+Tested up to: 6.4
 Requires PHP: 5.7
 Requires PHP: 5.7
 Version: 1.0.1
 Version: 1.0.1
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: negai
 Text Domain: negai
-Tags: blog, one-column, two-columns, block-patterns, block-styles, editor-style, featured-images, full-site-editing, rtl-language-support, style-variations, template-editing, threaded-comments, translation-ready, three-columns, wide-blocks, custom-background, custom-colors, custom-logo, custom-menu, theme-options, news
+Tags: blog, one-column, block-patterns, block-styles, featured-images, full-site-editing, rtl-language-support, style-variations, threaded-comments, translation-ready, wide-blocks
 */
 */
 
 
 /*
 /*
@@ -59,13 +59,12 @@ textarea:focus {
 }
 }
 
 
 /*
 /*
- * Avatar Block
- * Fix border radius setting for the avatar block
- * https://github.com/WordPress/gutenberg/issues/48253
+ * Navigation Block
+ * Reset the padding from List block
+ * https://github.com/WordPress/gutenberg/issues/50486
  */
  */
-.wp-block-avatar a,
-.wp-block-avatar img {
-	border-radius: inherit;
+.wp-block-navigation ul {
+	padding: unset;
 }
 }
 
 
 /*
 /*
@@ -73,6 +72,7 @@ textarea:focus {
  * Reset the browser default margins for blockquote element
  * Reset the browser default margins for blockquote element
  * https://github.com/WordPress/gutenberg/issues/44129
  * https://github.com/WordPress/gutenberg/issues/44129
  */
  */
-.wp-block-pullquote blockquote {
+.wp-block-pullquote blockquote,
+.wp-block-pullquote p {
 	margin: 0;
 	margin: 0;
 }
 }

+ 59 - 32
negai/theme.json

@@ -6,9 +6,9 @@
 			"custom": true,
 			"custom": true,
 			"customDuotone": true,
 			"customDuotone": true,
 			"customGradient": true,
 			"customGradient": true,
-			"defaultDuotone": true,
-			"defaultGradients": true,
-			"defaultPalette": true,
+			"defaultDuotone": false,
+			"defaultGradients": false,
+			"defaultPalette": false,
 			"duotone": [
 			"duotone": [
 				{
 				{
 					"colors": [
 					"colors": [
@@ -49,11 +49,7 @@
 		"spacing": {
 		"spacing": {
 			"customSpacingSize": true,
 			"customSpacingSize": true,
 			"spacingScale": {
 			"spacingScale": {
-				"increment": 1.5,
-				"mediumStep": 1.5,
-				"operator": "*",
-				"steps": 0,
-				"unit": "rem"
+				"steps": 0
 			},
 			},
 			"spacingSizes": [
 			"spacingSizes": [
 				{
 				{
@@ -408,9 +404,6 @@
 			"core/avatar": {
 			"core/avatar": {
 				"border": {
 				"border": {
 					"radius": "999px"
 					"radius": "999px"
-				},
-				"typography": {
-					"lineHeight": "0"
 				}
 				}
 			},
 			},
 			"core/button": {
 			"core/button": {
@@ -421,10 +414,10 @@
 						},
 						},
 						"spacing": {
 						"spacing": {
 							"padding": {
 							"padding": {
-								"bottom": "14px",
-								"left": "26px",
-								"right": "26px",
-								"top": "14px"
+								"bottom": "calc(1rem - 2px)",
+								"left": "calc(1.75rem - 2px)",
+								"right": "calc(1.75rem - 2px)",
+								"top": "calc(1rem - 2px)"
 							}
 							}
 						}
 						}
 					}
 					}
@@ -464,6 +457,9 @@
 					"fontFamily": "monospace"
 					"fontFamily": "monospace"
 				}
 				}
 			},
 			},
+			"core/comment-content": {
+				"css": "& p{margin-bottom:0;} & p+p{margin-top:var(--wp--preset--spacing--50)}"
+			},
 			"core/columns": {
 			"core/columns": {
 				"spacing": {
 				"spacing": {
 					"margin": {
 					"margin": {
@@ -491,7 +487,12 @@
 							"text": "var(--wp--preset--color--base)"
 							"text": "var(--wp--preset--color--base)"
 						},
 						},
 						"spacing": {
 						"spacing": {
-							"padding": "6px 14px"
+							"padding": {
+								"bottom": "0.375rem",
+								"left": "0.875rem",
+								"right": "0.875rem",
+								"top": "0.375rem"
+							}
 						},
 						},
 						"typography": {
 						"typography": {
 							"textDecoration": "none"
 							"textDecoration": "none"
@@ -530,7 +531,7 @@
 				}
 				}
 			},
 			},
 			"core/latest-comments": {
 			"core/latest-comments": {
-				"css": " .wp-block-latest-comments__comment-date {font-size: var(--wp--preset--font-size--medium);}.wp-block-latest-comments__comment-excerpt p{font-size: var(--wp--preset--font-size--medium);} :where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:inherit;} .wp-block-latest-comments__comment-excerpt p{margin:var(--wp--preset--spacing--50) 0;}",
+				"css": "& .wp-block-latest-comments__comment-meta{font-size: inherit;} & .wp-block-latest-comments__comment-date{font-size: inherit;} & .wp-block-latest-comments__comment-excerpt p{font-size: inherit;} & .wp-block-latest-comments__comment-excerpt p{margin:0 0 var(--wp--style--block-gap)} &:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:inherit;} & .avatar, .wp-block-latest-comments__comment-avatar{border-radius:0;}",
 				"spacing": {
 				"spacing": {
 					"padding": {
 					"padding": {
 						"left": "0px"
 						"left": "0px"
@@ -538,7 +539,7 @@
 				}
 				}
 			},
 			},
 			"core/latest-posts": {
 			"core/latest-posts": {
-				"css": " .wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date {font-size: var(--wp--preset--font-size--medium);}.wp-block-latest-posts__post-excerpt{margin:var(--wp--preset--spacing--50) 0;)}"
+				"css": " .wp-block-latest-posts__post-author{font-size: inherit;} & .wp-block-latest-posts__post-date{font-size: inherit;} & .wp-block-latest-posts__post-excerpt{margin:0 0 var(--wp--style--block-gap)}"
 			},
 			},
 			"core/list": {
 			"core/list": {
 				"spacing": {
 				"spacing": {
@@ -548,9 +549,9 @@
 				}
 				}
 			},
 			},
 			"core/navigation": {
 			"core/navigation": {
-				"css": ".wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {border-color:var(--wp--preset--color--contrast);} .wp-block-navigation__submenu-container.has-background {padding:0;} .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{padding-top:0;} .has-modal-open .wp-block-navigation__responsive-close {max-width: 100%;}",
+				"css": ".wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {border-color:var(--wp--preset--color--contrast);} & .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{padding-top:0;} & .has-modal-open .wp-block-navigation__responsive-close {max-width: 100%;}",
 				"spacing": {
 				"spacing": {
-					"blockGap": "0"
+					"blockGap": "var(--wp--preset--spacing--40)"
 				}
 				}
 			},
 			},
 			"core/paragraph": {
 			"core/paragraph": {
@@ -559,10 +560,22 @@
 				}
 				}
 			},
 			},
 			"core/post-author": {
 			"core/post-author": {
-				"css": ".wp-block-post-author .wp-block-post-author__byline{font-size:0.7em;} .wp-block-post-author .wp-block-post-author__bio {font-size:inherit;} .wp-block-post-author__avatar img {vertical-align:middle;} .wp-block-post-author__bio {margin:0;} .wp-block-post-author__avatar img {border-radius: 999px;}"
+				"css": ".wp-block-post-author .wp-block-post-author__byline{font-size: inherit;} &.wp-block-post-author .wp-block-post-author__bio{font-size:inherit;margin:0;} & .wp-block-post-author__avatar img{border-radius: 999px;vertical-align:middle;}"
 			},
 			},
 			"core/post-comments-form": {
 			"core/post-comments-form": {
-				"css": ".wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]), .wp-block-post-comments-form .comment-form textarea {line-height: inherit;} .wp-block-post-comments-form .form-submit {margin-bottom: 0;}"
+				"css": ".wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]){line-height: inherit;} & .comment-form textarea{line-height: inherit;} & .comment-form > *{margin-top:var(--wp--style--block-gap);margin-bottom:0} & .form-submit {margin-bottom: 0;}"
+			},
+			"core/post-content": {
+				"elements": {
+					"heading": {
+						"spacing": {
+							"margin": {
+								"bottom": "var(--wp--preset--spacing--50)",
+								"top": "var(--wp--preset--spacing--60)"
+							}
+						}
+					}
+				}
 			},
 			},
 			"core/post-excerpt": {
 			"core/post-excerpt": {
 				"css": ".wp-block-post-excerpt .wp-block-post-excerpt__excerpt{line-height: inherit;}"
 				"css": ".wp-block-post-excerpt .wp-block-post-excerpt__excerpt{line-height: inherit;}"
@@ -602,7 +615,12 @@
 				},
 				},
 				"css": ".wp-block-pullquote cite {display:block;margin-top: var(--wp--preset--spacing--50)}",
 				"css": ".wp-block-pullquote cite {display:block;margin-top: var(--wp--preset--spacing--50)}",
 				"spacing": {
 				"spacing": {
-					"padding": "var(--wp--preset--spacing--50)"
+					"padding": {
+						"bottom": "var(--wp--preset--spacing--50)",
+						"left": "var(--wp--preset--spacing--50)",
+						"right": "var(--wp--preset--spacing--50)",
+						"top": "var(--wp--preset--spacing--50)"
+					}
 				},
 				},
 				"typography": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--medium)",
 					"fontSize": "var(--wp--preset--font-size--medium)",
@@ -610,11 +628,19 @@
 				}
 				}
 			},
 			},
 			"core/query-pagination": {
 			"core/query-pagination": {
-				"css": ".wp-block-query-pagination .wp-block-query-pagination-next, .wp-block-query-pagination .wp-block-query-pagination-previous, .wp-block-query-pagination .wp-block-query-pagination-numbers {margin-bottom:0;}",
 				"typography": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--xx-large)"
 					"fontSize": "var(--wp--preset--font-size--xx-large)"
 				}
 				}
 			},
 			},
+			"core/query-pagination-next": {
+				"css": ".wp-block-query-pagination-next{margin:0;}"
+			},
+			"core/query-pagination-numbers": {
+				"css": ".wp-block-query-pagination-numbers{margin:0;}"
+			},
+			"core/query-pagination-previous": {
+				"css": ".wp-block-query-pagination-previous{margin:0;}"
+			},
 			"core/query-title": {
 			"core/query-title": {
 				"typography": {
 				"typography": {
 					"fontSize": "var(--wp--preset--font-size--medium)",
 					"fontSize": "var(--wp--preset--font-size--medium)",
@@ -657,6 +683,7 @@
 				}
 				}
 			},
 			},
 			"core/search": {
 			"core/search": {
+				"css": "& :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border-color:var(--wp--preset--color--contrast);} ",
 				"color": {
 				"color": {
 					"text": "var(--wp--preset--color--contrast)"
 					"text": "var(--wp--preset--color--contrast)"
 				},
 				},
@@ -703,13 +730,13 @@
 				}
 				}
 			},
 			},
 			"core/table": {
 			"core/table": {
-				"css": " + .wp-element-caption {text-align:center;}"
+				"css": "& thead{border-bottom-width: 1px;} & tfoot{border-top-width: 1px;} & + .wp-element-caption{text-align:center;}"
 			},
 			},
 			"core/tag-cloud": {
 			"core/tag-cloud": {
-				"css": ".wp-block-tag-cloud.is-style-outline a {border-radius: 999px; padding: 0 1rem;} .wp-block-tag-cloud.is-style-outline a:hover {color: var(--wp--preset--color--base); background-color: var(--wp--preset--color--contrast);}"
+				"css": ".wp-block-tag-cloud.is-style-outline{font-size:var(--wp--preset--font-size--small);} &.wp-block-tag-cloud.is-style-outline a {border-radius:999px;padding: 1px 16px 1px;} &.wp-block-tag-cloud.is-style-outline a:hover {color: var(--wp--preset--color--base);background-color: var(--wp--preset--color--primary);}"
 			},
 			},
 			"core/term-description": {
 			"core/term-description": {
-				"css": ".wp-block-term-description p:first-child {margin-top: 0;} .wp-block-term-description p:last-child {margin-bottom: 0;}"
+				"css": "& p+p {margin-top:calc(1em + 0.375rem);}"
 			}
 			}
 		},
 		},
 		"color": {
 		"color": {
@@ -745,10 +772,10 @@
 				},
 				},
 				"spacing": {
 				"spacing": {
 					"padding": {
 					"padding": {
-						"bottom": "16px",
-						"left": "28px",
-						"right": "28px",
-						"top": "16px"
+						"bottom": "1rem",
+						"left": "1.75rem",
+						"right": "1.75rem",
+						"top": "1rem"
 					}
 					}
 				},
 				},
 				"typography": {
 				"typography": {
@@ -839,7 +866,7 @@
 	},
 	},
 	"templateParts": [
 	"templateParts": [
 		{
 		{
-			"area": "comments",
+			"area": "uncategorized",
 			"name": "comments"
 			"name": "comments"
 		},
 		},
 		{
 		{