Skip to content

Commit

Permalink
Negai: Prepare the theme for the submission (#7611)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakashi authored Jan 18, 2024
1 parent 6c3aa4e commit b95a31f
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 44 deletions.
2 changes: 1 addition & 1 deletion negai/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @package negai
* @since negai 1.0
*/

declare( strict_types = 1 );

if ( ! function_exists( 'negai_support' ) ) :

Expand Down
2 changes: 2 additions & 0 deletions negai/patterns/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* Slug: negai/404
* Inserter: no
*/
declare( strict_types = 1 );
?>

<!-- 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>
<!-- /wp:heading -->
2 changes: 2 additions & 0 deletions negai/patterns/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
* Categories: featured, 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"}} -->
<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"} -->
Expand Down
2 changes: 2 additions & 0 deletions negai/patterns/no-results-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* Slug: negai/no-results-content
* Inserter: no
*/
declare( strict_types = 1 );
?>

<!-- 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>
<!-- /wp:paragraph -->
Expand Down
1 change: 1 addition & 0 deletions negai/patterns/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Slug: negai/search
* 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} /-->
2 changes: 1 addition & 1 deletion negai/readme.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
=== Negai ===
Contributors: Automattic
Requires at least: 6.0
Tested up to: 6.2.2
Tested up to: 6.4
Requires PHP: 5.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
20 changes: 10 additions & 10 deletions negai/style.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
Theme Name: Negai
Theme URI: https://wordpress.com/theme/negai
Theme URI: https://wordpress.com/theme/negai/
Author: Automattic
Author URI: https://automattic.com/
Description: Negai is a bold blogging theme with large post titles and interesting colour schemes
Requires at least: 6.0
Tested up to: 6.2.2
Tested up to: 6.4
Requires PHP: 5.7
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
*/

/*
Expand Down Expand Up @@ -59,20 +59,20 @@ 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;
}

/*
* Pull quote Block
* Reset the browser default margins for blockquote element
* https://github.com/WordPress/gutenberg/issues/44129
*/
.wp-block-pullquote blockquote {
.wp-block-pullquote blockquote,
.wp-block-pullquote p {
margin: 0;
}
91 changes: 59 additions & 32 deletions negai/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"custom": true,
"customDuotone": true,
"customGradient": true,
"defaultDuotone": true,
"defaultGradients": true,
"defaultPalette": true,
"defaultDuotone": false,
"defaultGradients": false,
"defaultPalette": false,
"duotone": [
{
"colors": [
Expand Down Expand Up @@ -49,11 +49,7 @@
"spacing": {
"customSpacingSize": true,
"spacingScale": {
"increment": 1.5,
"mediumStep": 1.5,
"operator": "*",
"steps": 0,
"unit": "rem"
"steps": 0
},
"spacingSizes": [
{
Expand Down Expand Up @@ -408,9 +404,6 @@
"core/avatar": {
"border": {
"radius": "999px"
},
"typography": {
"lineHeight": "0"
}
},
"core/button": {
Expand All @@ -421,10 +414,10 @@
},
"spacing": {
"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)"
}
}
}
Expand Down Expand Up @@ -464,6 +457,9 @@
"fontFamily": "monospace"
}
},
"core/comment-content": {
"css": "& p{margin-bottom:0;} & p+p{margin-top:var(--wp--preset--spacing--50)}"
},
"core/columns": {
"spacing": {
"margin": {
Expand Down Expand Up @@ -491,7 +487,12 @@
"text": "var(--wp--preset--color--base)"
},
"spacing": {
"padding": "6px 14px"
"padding": {
"bottom": "0.375rem",
"left": "0.875rem",
"right": "0.875rem",
"top": "0.375rem"
}
},
"typography": {
"textDecoration": "none"
Expand Down Expand Up @@ -530,15 +531,15 @@
}
},
"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": {
"padding": {
"left": "0px"
}
}
},
"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": {
"spacing": {
Expand All @@ -548,9 +549,9 @@
}
},
"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": {
"blockGap": "0"
"blockGap": "var(--wp--preset--spacing--40)"
}
},
"core/paragraph": {
Expand All @@ -559,10 +560,22 @@
}
},
"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": {
"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": {
"css": ".wp-block-post-excerpt .wp-block-post-excerpt__excerpt{line-height: inherit;}"
Expand Down Expand Up @@ -602,19 +615,32 @@
},
"css": ".wp-block-pullquote cite {display:block;margin-top: var(--wp--preset--spacing--50)}",
"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": {
"fontSize": "var(--wp--preset--font-size--medium)",
"fontStyle": "italic"
}
},
"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": {
"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": {
"typography": {
"fontSize": "var(--wp--preset--font-size--medium)",
Expand Down Expand Up @@ -657,6 +683,7 @@
}
},
"core/search": {
"css": "& :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border-color:var(--wp--preset--color--contrast);} ",
"color": {
"text": "var(--wp--preset--color--contrast)"
},
Expand Down Expand Up @@ -703,13 +730,13 @@
}
},
"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": {
"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": {
"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": {
Expand Down Expand Up @@ -745,10 +772,10 @@
},
"spacing": {
"padding": {
"bottom": "16px",
"left": "28px",
"right": "28px",
"top": "16px"
"bottom": "1rem",
"left": "1.75rem",
"right": "1.75rem",
"top": "1rem"
}
},
"typography": {
Expand Down Expand Up @@ -839,7 +866,7 @@
},
"templateParts": [
{
"area": "comments",
"area": "uncategorized",
"name": "comments"
},
{
Expand Down

0 comments on commit b95a31f

Please sign in to comment.