Skip to content

Commit

Permalink
Kansei: Add theme (#7638)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakashi authored Feb 20, 2024
1 parent c66a7c1 commit 674c7f1
Show file tree
Hide file tree
Showing 37 changed files with 1,382 additions and 0 deletions.
Binary file added kansei/assets/fonts/cormorant_italic_300.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_italic_400.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_italic_500.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_italic_600.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_italic_700.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_normal_300.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_normal_400.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_normal_500.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_normal_600.ttf
Binary file not shown.
Binary file added kansei/assets/fonts/cormorant_normal_700.ttf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions kansei/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Kansei functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Kansei
* @since Kansei 1.0
*/

declare( strict_types = 1 );

if ( ! function_exists( 'kansei_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since Kansei 1.0
*
* @return void
*/
function kansei_support() {

// Enqueue editor styles.
add_editor_style( 'style.css' );

// Make theme available for translation.
load_theme_textdomain( 'kansei' );
}

endif;

add_action( 'after_setup_theme', 'kansei_support' );

if ( ! function_exists( 'kansei_styles' ) ) :

/**
* Enqueue styles.
*
* @since Kansei 1.0
*
* @return void
*/
function kansei_styles() {

// Register theme stylesheet.
wp_register_style(
'kansei-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);

// Enqueue theme stylesheet.
wp_enqueue_style( 'kansei-style' );

}

endif;

add_action( 'wp_enqueue_scripts', 'kansei_styles' );
1 change: 1 addition & 0 deletions kansei/parts/footer-front-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"kansei/footer-front-page"} /-->
1 change: 1 addition & 0 deletions kansei/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"kansei/footer"} /-->
1 change: 1 addition & 0 deletions kansei/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"kansei/header"} /-->
13 changes: 13 additions & 0 deletions kansei/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: A 404 page
* Slug: kansei/404
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:heading {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small"} -->
<h2 class="wp-block-heading has-small-font-size" style="margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;font-style:normal;font-weight:700"><?php echo esc_html__( 'Oops, we lost you...', 'kansei' ); ?></h2>
<!-- /wp:heading -->
52 changes: 52 additions & 0 deletions kansei/patterns/footer-front-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
/**
* Title: Footer Front Page
* Slug: kansei/footer-front-page
* Categories: footer
* Block Types: core/template-part/footer
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"spacing":{"margin":{"top":"3rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:3rem">
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%">
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"16.7%"} -->
<div class="wp-block-column" style="flex-basis:16.7%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.3%"} -->
<div class="wp-block-column" style="flex-basis:33.3%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%">
<!-- wp:paragraph -->
<p><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'kansei' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'kansei' ),
$wordpress_link
);?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
36 changes: 36 additions & 0 deletions kansei/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* Title: Default footer
* Slug: kansei/footer
* Categories: footer
* Block Types: core/template-part/footer
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"spacing":{"margin":{"top":"3rem"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:3rem">
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%">
<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'kansei' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'kansei' ),
$wordpress_link
);?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
66 changes: 66 additions & 0 deletions kansei/patterns/front-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php
/**
* Title: front-page
* Slug: kansei/front-page
* Categories: hidden
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"},"spacing":{"padding":{"top":"var:preset|spacing|60","right":"var:preset|spacing|80","bottom":"var:preset|spacing|80","left":"var:preset|spacing|80"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="min-height:100vh;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--80);padding-bottom:var(--wp--preset--spacing--80);padding-left:var(--wp--preset--spacing--80)">
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/milad-fakurian-Tc_4PdN-Fq0-unsplash-edited-scaled-1.jpg","dimRatio":0,"focalPoint":{"x":0.5,"y":0.5},"minHeight":65,"minHeightUnit":"vh","isDark":false,"style":{"color":[]}} -->
<div class="wp-block-cover is-light" style="min-height:65vh"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<img class="wp-block-cover__image-background" alt="" src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/milad-fakurian-Tc_4PdN-Fq0-unsplash-edited-scaled-1.jpg" style="object-position:50% 50%" data-object-fit="cover" data-object-position="50% 50%"/>
<div class="wp-block-cover__inner-container"></div>
</div>
<!-- /wp:cover -->

<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%">
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"16.7%"} -->
<div class="wp-block-column" style="flex-basis:16.7%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.3%"} -->
<div class="wp-block-column" style="flex-basis:33.3%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%">
<!-- wp:paragraph -->
<p><?php
$link = '<a href="' . esc_url( __( 'https://en.wikipedia.org/wiki/Musashino_Art_University', 'kansei' ) ) . '" rel="nofollow">Musashino Art University</a>';
echo sprintf(
esc_html__( 'Designer, curator, and writer. I am a graduate of %1$s where I also work as a professor since April 2003 aside of the consultant practice.', 'kansei' ),
$link
);?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->

<!-- wp:template-part {"slug":"footer-front-page"} /-->
</div>
<!-- /wp:group -->
44 changes: 44 additions & 0 deletions kansei/patterns/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Title: Default header
* Slug: kansei/header
* Categories: featured, header
* Block Types: core/template-part/header
*/

declare( strict_types = 1 );
?>

<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%"></div>
<!-- /wp:column -->

<!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%">
<!-- wp:columns -->
<div class="wp-block-columns">
<!-- wp:column {"width":"16.7%"} -->
<div class="wp-block-column" style="flex-basis:16.7%">
<!-- wp:site-title /-->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.3%"} -->
<div class="wp-block-column" style="flex-basis:33.3%">
<!-- wp:site-tagline /-->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%">
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal","flexWrap":"wrap"}} /-->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
13 changes: 13 additions & 0 deletions kansei/patterns/no-results-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: No Results Content
* Slug: kansei/no-results-content
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} -->
<p style="margin-top:0;margin-bottom:0"><?php echo esc_html__( 'Sorry, but nothing matched your search terms. Please try again with some different keywords..', 'kansei' ); ?></p>
<!-- /wp:paragraph -->
13 changes: 13 additions & 0 deletions kansei/patterns/no-results.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: No Results Content
* Slug: kansei/no-results
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:paragraph {"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} -->
<p style="margin-top:0;margin-bottom:0"><?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', 'kansei' ); ?></p>
<!-- /wp:paragraph -->
13 changes: 13 additions & 0 deletions kansei/patterns/post-navigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
/**
* Title: Post Navigation
* Slug: kansei/post-navigation
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:post-navigation-link {"type":"previous","label":"<?php echo esc_html__( 'Prev', 'kansei' ); ?>","arrow":"arrow"} /-->

<!-- wp:post-navigation-link {"label":"<?php echo esc_html__( 'Next', 'kansei' ); ?>","arrow":"arrow"} /-->
15 changes: 15 additions & 0 deletions kansei/patterns/query-pagination.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Title: A query pagination
* Slug: kansei/query-pagination
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:query-pagination {"paginationArrow":"arrow"} -->
<!-- wp:query-pagination-previous {"label":"<?php echo esc_html__( 'Prev', 'kansei' ); ?>"} /-->

<!-- wp:query-pagination-next {"label":"<?php echo esc_html__( 'Next', 'kansei' ); ?>"} /-->
<!-- /wp:query-pagination -->
11 changes: 11 additions & 0 deletions kansei/patterns/search-field.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: Search field
* Slug: kansei/search-field
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Type to search', 'This is a placeholder text in a search field', 'kansei' ); ?>","width":100,"widthUnit":"%","buttonText":"Search","buttonPosition":"button-inside"} /-->
11 changes: 11 additions & 0 deletions kansei/patterns/search.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: Search
* Slug: kansei/search
* Inserter: no
*/

declare( strict_types = 1 );
?>

<!-- wp:search {"label":"<?php echo esc_html_x( 'Search', 'This is a search label', 'kansei' ); ?>","showLabel":false,"placeholder":"<?php echo esc_html_x( 'Type to search', 'This is a placeholder text in a search field', 'kansei' ); ?>","width":100,"widthUnit":"%","buttonText":"<?php echo esc_html_x( 'Search', 'This is a search button', 'kansei' ); ?>","buttonPosition":"button-inside"} /-->
Loading

0 comments on commit 674c7f1

Please sign in to comment.