-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JinJang: add theme for review (#7105)
Co-authored-by: Jason Crist <[email protected]>
- Loading branch information
1 parent
97089b8
commit 8ca9e8d
Showing
19 changed files
with
1,530 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
/** | ||
* jinjang functions and definitions | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | ||
* | ||
* @package jinjang | ||
* @since jinjang 1.0 | ||
*/ | ||
|
||
|
||
if ( ! function_exists( 'jinjang_support' ) ) : | ||
|
||
/** | ||
* Sets up theme defaults and registers support for various WordPress features. | ||
* | ||
* @since jinjang 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function jinjang_support() { | ||
|
||
// Enqueue editor styles. | ||
add_editor_style( 'style.css' ); | ||
|
||
// Make theme available for translation. | ||
load_theme_textdomain( 'jinjang' ); | ||
} | ||
|
||
endif; | ||
|
||
add_action( 'after_setup_theme', 'jinjang_support' ); | ||
|
||
if ( ! function_exists( 'jinjang_styles' ) ) : | ||
|
||
/** | ||
* Enqueue styles. | ||
* | ||
* @since jinjang 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function jinjang_styles() { | ||
|
||
// Register theme stylesheet. | ||
wp_register_style( | ||
'jinjang-style', | ||
get_stylesheet_directory_uri() . '/style.css', | ||
array(), | ||
wp_get_theme()->get( 'Version' ) | ||
); | ||
|
||
// Enqueue theme stylesheet. | ||
wp_enqueue_style( 'jinjang-style' ); | ||
|
||
} | ||
|
||
endif; | ||
|
||
add_action( 'wp_enqueue_scripts', 'jinjang_styles' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- wp:pattern {"slug":"jinjang/footer"} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!-- wp:pattern {"slug":"jinjang/header"} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Title: A 404 page | ||
* Slug: jinjang/404 | ||
* Inserter: no | ||
*/ | ||
?> | ||
|
||
<!-- wp:heading {"level":1,"anchor":"nothing-found"} --> | ||
<h1 class="wp-block-heading" id="nothing-found"><?php echo esc_html_x( 'Oops! That page can’t be found.', 'jinjang' ); ?></h1> | ||
<!-- /wp:heading --> | ||
|
||
<!-- wp:paragraph --> | ||
<p><?php echo esc_html_x( 'It looks like nothing was found at this location. Maybe try a search?', 'jinjang' ); ?></p> | ||
<!-- /wp:paragraph --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* Title: Comments | ||
* Slug: jinjang/comments | ||
* inserter: no | ||
*/ | ||
?> | ||
<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"layout":{"type":"constrained","justifyContent":"center"}} --> | ||
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:comments {"className":"wp-block-comments-query-loop"} --> | ||
<div class="wp-block-comments wp-block-comments-query-loop"> | ||
<!-- wp:comments-title {"level":3} /--> | ||
|
||
<!-- wp:comment-template {"style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}}}} --> | ||
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|50"}}}} --> | ||
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--50)"> | ||
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","flexWrap":"nowrap"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:avatar {"size":48,"style":{"border":{"radius":"50%"}}} /--> | ||
|
||
<!-- wp:group --> | ||
<div class="wp-block-group"> | ||
<!-- wp:comment-author-name /--> | ||
|
||
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"0.5em"}},"layout":{"type":"flex"}} --> | ||
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px"> | ||
<!-- wp:comment-date {"format":"F j, Y \\a\\t g:i a"} /--> | ||
|
||
<!-- wp:comment-edit-link /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:comment-content {"style":{"typography":[]},"fontSize":"small"} /--> | ||
|
||
<!-- wp:comment-reply-link /--> | ||
</div> | ||
<!-- /wp:group --> | ||
<!-- /wp:comment-template --> | ||
|
||
<!-- wp:comments-pagination {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"space-between"}} --> | ||
<!-- wp:comments-pagination-previous /--> | ||
|
||
<!-- wp:comments-pagination-next /--> | ||
<!-- /wp:comments-pagination --> | ||
|
||
<!-- wp:post-comments-form {"style":{"spacing":{"margin":{"top":"var:preset|spacing|50"}}}} /--> | ||
</div> | ||
<!-- /wp:comments --> | ||
</div> | ||
<!-- /wp:group --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Title: Default footer | ||
* Slug: jinjang/footer | ||
* Categories: footer | ||
* Block Types: core/template-part/footer | ||
*/ | ||
?> | ||
|
||
<!-- wp:group {"style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"contrast","layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group has-contrast-color has-text-color has-link-color"> | ||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph {"fontSize":"x-small"} --> | ||
<p class="has-x-small-font-size"><a href="#"><?php echo esc_html__( 'Instagram', 'jinjang' ); ?></a>/<a href="#"><?php echo esc_html__( 'Twitter', 'jinjang' ); ?></a>/<a href="#"><?php echo esc_html__( 'LinkedIn', 'jinjang' ); ?></a></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:paragraph {"fontSize":"x-small"} --> | ||
<p class="has-x-small-font-size"><?php | ||
/* Translators: WordPress link. */ | ||
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'jinjang' ) ) . '" rel="nofollow">WordPress</a>'; | ||
echo sprintf( | ||
esc_html__( 'Designed with %1$s', 'jinjang' ), | ||
$wordpress_link | ||
);?></p> | ||
<!-- /wp:paragraph --> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:group --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Title: Default header | ||
* Slug: jinjang/header | ||
* Categories: header | ||
* Block Types: core/template-part/header | ||
*/ | ||
?> | ||
|
||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}},"dimensions":{"minHeight":"100vh"},"elements":{"link":{"color":{"text":"var:preset|color|base"},":hover":{"color":{"text":"var:preset|color|primary"}}}}},"backgroundColor":"contrast","textColor":"base","layout":{"type":"flex","orientation":"vertical","verticalAlignment":"space-between","justifyContent":"stretch"}} --> | ||
<div class="wp-block-group has-base-color has-contrast-background-color has-text-color has-background has-link-color" style="min-height:100vh;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:site-title /--> | ||
|
||
<!-- wp:navigation {"overlayMenu":"never","overlayBackgroundColor":"contrast","overlayTextColor":"base","layout":{"type":"flex","orientation":"vertical"}} /--> | ||
</div> | ||
<!-- /wp:group --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
/** | ||
* Title: No Results Content | ||
* Slug: jinjang/no-results-content | ||
* Inserter: no | ||
*/ | ||
?> | ||
<!-- wp:paragraph --> | ||
<p><?php echo esc_html_x( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'Message explaining that there are no results returned from a search', 'jinjang' ); ?></p> | ||
<!-- /wp:paragraph --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
/** | ||
* Title: Search | ||
* Slug: jinjang/search | ||
* Inserter: no | ||
*/ | ||
?> | ||
|
||
<!-- wp:search {"label":"","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Search...', 'This is a placeholder text in a search field', 'jinjang' ); ?>","buttonText":"Search","buttonUseIcon":true} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
=== jinjang === | ||
Contributors: Automattic | ||
Requires at least: 5.8 | ||
Tested up to: 6.1.1 | ||
Requires PHP: 5.7 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
== Description == | ||
|
||
JinJang is a blog theme with a split, 50:50 layout like Yan Yang. | ||
|
||
== Changelog == | ||
|
||
= 1.0.0 = | ||
* Initial release | ||
|
||
== Copyright == | ||
|
||
jinjang WordPress Theme, (C) 2023 Automattic | ||
jinjang is distributed under the terms of the GNU GPL. | ||
jinjang is based on Lineup (https://wordpress.com/theme/lineup/), (C) Automattic, [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html) | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
Theme Name: jinjang | ||
Theme URI: https://wordpress.com/theme/jinjang/ | ||
Author: Automattic | ||
Author URI: https://automattic.com/ | ||
Description: JinJang is a blog theme with a split, 50:50 layout like Yan Yang. | ||
Requires at least: 5.8 | ||
Tested up to: 5.9 | ||
Requires PHP: 5.7 | ||
Version: 0.0.1 | ||
License: GNU General Public License v2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
Template: | ||
Text Domain: jinjang | ||
Tags: blog, one-column, two-columns, wide-blocks, block-patterns, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, sticky-post, template-editing, threaded-comments, translation-ready | ||
*//* | ||
* Link styles | ||
* https://github.com/WordPress/gutenberg/issues/42319 | ||
*/ | ||
a { | ||
text-decoration-thickness: 1.0px !important; | ||
text-underline-offset: 1.5px; | ||
} | ||
|
||
/* | ||
* Form field styles | ||
* https://github.com/WordPress/gutenberg/issues/42319 | ||
*/ | ||
::placeholder { | ||
color: var(--wp--preset--color--contrast); | ||
opacity: 1; /* Firefox */ | ||
} | ||
|
||
/* | ||
* Avatar Block | ||
* Fix border radius setting for the avatar block | ||
* https://github.com/WordPress/gutenberg/issues/48253 | ||
*/ | ||
.wp-block-avatar a, | ||
.wp-block-avatar img { | ||
border-radius: inherit; | ||
} | ||
|
||
/* | ||
* Button Block | ||
* Control the hover stylings of outline block style. | ||
* Unnecessary once block styles are configurable via theme.json | ||
* https://github.com/WordPress/gutenberg/issues/42794 | ||
*/ | ||
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover { | ||
background-color: var(--wp--preset--color--contrast); | ||
color: var(--wp--preset--color--base); | ||
border-color: var(--wp--preset--color--contrast); | ||
} | ||
|
||
/* | ||
* Pull quote Block | ||
* Reset the browser default margins for blockquote element | ||
* https://github.com/WordPress/gutenberg/issues/44129 | ||
*/ | ||
.wp-block-pullquote blockquote { | ||
margin: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"}}}} --> | ||
<div class="wp-block-columns"> | ||
<!-- wp:column {"backgroundColor":"contrast","textColor":"base"} --> | ||
<div class="wp-block-column has-base-color has-contrast-background-color has-text-color has-background"> | ||
<!-- wp:group {"style":{"position":{"type":"sticky","top":"0px"}},"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:template-part {"slug":"header","tagName":"header"} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column --> | ||
<div class="wp-block-column"> | ||
<!-- wp:group {"tagName":"main","style":{"dimensions":{"minHeight":"100vh"},"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} --> | ||
<main class="wp-block-group" style="min-height:100vh;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:spacer {"height":"0px"} --> | ||
<div style="height:0px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:group {"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:pattern {"slug":"jinjang/404"} /--> | ||
|
||
<!-- wp:pattern {"slug":"jinjang/search"} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /--> | ||
</main> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:column --> | ||
</div> | ||
<!-- /wp:columns --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- wp:columns {"style":{"spacing":{"blockGap":{"top":"0px","left":"0px"}}}} --> | ||
<div class="wp-block-columns"> | ||
<!-- wp:column {"backgroundColor":"contrast","textColor":"base"} --> | ||
<div class="wp-block-column has-base-color has-contrast-background-color has-text-color has-background"> | ||
<!-- wp:group {"style":{"position":{"type":"sticky","top":"0px"}},"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:template-part {"slug":"header","tagName":"header"} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column --> | ||
<div class="wp-block-column"> | ||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}},"dimensions":{"minHeight":"100vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} --> | ||
<div class="wp-block-group" style="min-height:100vh;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:group {"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[]},"tagName":"main","layout":{"type":"default"}} --> | ||
<main class="wp-block-query"> | ||
<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|70"}}},"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:query-title {"type":"archive","showPrefix":false} /--> | ||
|
||
<!-- wp:term-description {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30"}}}} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:post-template --> | ||
<!-- wp:group {"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:post-featured-image {"isLink":true} /--> | ||
|
||
<!-- wp:post-date {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|30"}}}} /--> | ||
|
||
<!-- wp:post-title {"isLink":true,"style":{"spacing":{"margin":{"top":"0px"}}}} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"layout":{"type":"default"}} --> | ||
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70)"> | ||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"left","orientation":"vertical"}} --> | ||
<!-- wp:query-pagination-previous {"label":"Previous"} /--> | ||
|
||
<!-- wp:query-pagination-next {"label":"Next"} /--> | ||
<!-- /wp:query-pagination --> | ||
</div> | ||
<!-- /wp:group --> | ||
</main> | ||
<!-- /wp:query --> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer","tagName":"footer"} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:column --> | ||
</div> | ||
<!-- /wp:columns --> |
Oops, something went wrong.