Skip to content

Commit

Permalink
JinJang: add theme for review (#7105)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Crist <[email protected]>
  • Loading branch information
iamtakashi and pbking authored Jun 27, 2023
1 parent 97089b8 commit 8ca9e8d
Show file tree
Hide file tree
Showing 19 changed files with 1,530 additions and 0 deletions.
60 changes: 60 additions & 0 deletions jinjang/functions.php
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' );
1 change: 1 addition & 0 deletions jinjang/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"jinjang/footer"} /-->
1 change: 1 addition & 0 deletions jinjang/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"jinjang/header"} /-->
15 changes: 15 additions & 0 deletions jinjang/patterns/404.php
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&rsquo;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 -->
54 changes: 54 additions & 0 deletions jinjang/patterns/comments.php
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 -->
30 changes: 30 additions & 0 deletions jinjang/patterns/footer.php
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 -->
16 changes: 16 additions & 0 deletions jinjang/patterns/header.php
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 -->
10 changes: 10 additions & 0 deletions jinjang/patterns/no-results-content.php
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 -->
9 changes: 9 additions & 0 deletions jinjang/patterns/search.php
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} /-->
32 changes: 32 additions & 0 deletions jinjang/readme.txt
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.
Binary file added jinjang/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions jinjang/style.css
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;
}
35 changes: 35 additions & 0 deletions jinjang/templates/404.html
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 -->
61 changes: 61 additions & 0 deletions jinjang/templates/archive.html
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 -->
Loading

0 comments on commit 8ca9e8d

Please sign in to comment.