Skip to content

Commit

Permalink
Infield: Add theme. (#7556)
Browse files Browse the repository at this point in the history
* Add Infield theme.

Initial commit.

* Removed unused font asset

---------

Co-authored-by: Jason Crist <[email protected]>
  • Loading branch information
alaczek and pbking authored Mar 5, 2024
1 parent c2c3ebc commit 051f727
Show file tree
Hide file tree
Showing 49 changed files with 1,670 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added infield/assets/images/stripes-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions infield/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Infield functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Infield
* @since Infield 1.0
*/
declare( strict_types = 1 );

if ( ! function_exists( 'creatio2_support' ) ) :

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

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

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

endif;

add_action( 'after_setup_theme', 'creatio2_support' );

if ( ! function_exists( 'creatio2_styles' ) ) :

/**
* Enqueue styles.
*
* @since Infield 1.0
*
* @return void
*/
function creatio2_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'creatio2_styles' );
13 changes: 13 additions & 0 deletions infield/parts/byline-date.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- wp:group {"style":{"spacing":{"blockGap":"0.26rem","padding":{"bottom":"20px"}},"typography":{"fontSize":"x-small"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center","justifyContent":"left"}} -->
<div class="wp-block-group" style="padding-bottom:20px;font-size:x-small"><!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size">Published by</p>
<!-- /wp:paragraph -->

<!-- wp:post-author {"showAvatar":false,"showBio":false,"byline":"","fontSize":"x-small"} /-->

<!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size">on</p>
<!-- /wp:paragraph -->

<!-- wp:post-date {"isLink":true} /--></div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions infield/parts/footer-alternative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"infield/footer-alt"} /-->
1 change: 1 addition & 0 deletions infield/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"infield/footer"} /-->
25 changes: 25 additions & 0 deletions infield/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}},"elements":{"link":{"color":{"text":"var:preset|color|base"}}}},"backgroundColor":"accent-1","textColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-base-color has-accent-1-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:columns {"verticalAlignment":"center","isStackedOnMobile":false,"align":"wide"} -->
<div class="wp-block-columns alignwide are-vertically-aligned-center is-not-stacked-on-mobile"><!-- wp:column {"verticalAlignment":"center","width":"50.01%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:50.01%"><!-- wp:site-title {"textAlign":"left","style":{"typography":{"fontSize":"48px"}}} /--></div>
<!-- /wp:column -->

<!-- wp:column {"verticalAlignment":"center","width":"49.99%","style":{"spacing":{"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:49.99%"><!-- wp:social-links {"iconColor":"background","iconColorValue":"#ffffff","size":"has-small-icon-size","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|30","left":"var:preset|spacing|40"}}},"className":"is-style-logos-only","layout":{"type":"flex","justifyContent":"right"}} -->
<ul class="wp-block-social-links has-small-icon-size has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"#","service":"youtube"} /-->

<!-- wp:social-link {"url":"#","service":"facebook"} /-->

<!-- wp:social-link {"url":"#","service":"x"} /-->

<!-- wp:social-link {"url":"#","service":"instagram"} /--></ul>
<!-- /wp:social-links -->

<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|50"},"typography":{"textTransform":"uppercase","fontStyle":"normal","fontWeight":"500"}}} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->

<!-- wp:separator {"className":"is-style-wide double-hr"} -->
<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide double-hr"/>
<!-- /wp:separator -->
1 change: 1 addition & 0 deletions infield/parts/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"infield/sidebar"} /-->
23 changes: 23 additions & 0 deletions infield/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* Title: A 404 page
* Slug: infield/404
* Inserter: no
*/
declare( strict_types = 1 );
?>

<!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"var:preset|spacing|50","margin":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|60"},"padding":{"bottom":"180px"}}},"layout":{"type":"constrained"}} -->
<main class="wp-block-group" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--60);padding-bottom:180px"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide"><!-- wp:heading {"textAlign":"left","level":1,"align":"wide"} -->
<h1 class="wp-block-heading alignwide has-text-align-left" id="oops-that-page-can-t-be-found">
<?php echo esc_html_x( 'Oops! That page can’t be found.', 'infield' ); ?></h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><?php echo esc_html_x( 'It looks like nothing was found at this location. Maybe try a search?', 'infield' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:search {"showLabel":false,"buttonPosition":"button-inside","buttonUseIcon":true,"style":{"border":{"radius":"2px","top":{"color":"#dfdfdf","style":"solid","width":"1px"},"right":{"color":"#dfdfdf","style":"solid","width":"1px"},"bottom":{"color":"#dfdfdf","style":"solid","width":"1px"},"left":{"color":"#dfdfdf","style":"solid","width":"1px"}}},"backgroundColor":"accent-2","textColor":"background"} /--></div>
<!-- /wp:group --></main>
<!-- /wp:group -->
21 changes: 21 additions & 0 deletions infield/patterns/byline-date.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Title: Byline and Date Post Meta
* Slug: infield/byline-date
* Inserter: no
*/
declare( strict_types = 1 );
?>
<!-- wp:group {"style":{"spacing":{"blockGap":"0.26rem","padding":{"bottom":"20px"}},"typography":{"fontSize":"x-small"}},"layout":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center","justifyContent":"center"}} -->
<div class="wp-block-group" style="padding-bottom:20px;font-size:x-small"><!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php echo esc_html_x( 'Published by', 'infield' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:post-author {"showAvatar":false,"showBio":false,"byline":"","fontSize":"x-small"} /-->

<!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php echo esc_html_x( 'on', 'Preposition: Refers to the post publish date', 'infield' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:post-date {"isLink":true} /--></div>
<!-- /wp:group -->
64 changes: 64 additions & 0 deletions infield/patterns/footer-alt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* Title: Footer Alternative
* Slug: infield/footer-alt
* Categories: footer
* Block Types: core/template-part/footer
*/
declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}},"heading":{"color":{"text":"var:preset|color|base"}}},"spacing":{"padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"backgroundColor":"accent-1","textColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-base-color has-accent-1-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:site-title {"align":"wide","style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}}},"spacing":{"margin":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"textColor":"base"} /-->

<!-- wp:separator {"align":"wide","className":" double-hr"} -->
<hr class="wp-block-separator alignwide has-alpha-channel-opacity double-hr"/>
<!-- /wp:separator -->

<!-- wp:columns {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}}} -->
<div class="wp-block-columns alignwide" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40)"><!-- wp:column {"style":{"border":{"right":{"color":"#ffffff33","width":"1px"}},"spacing":{"padding":{"right":"var:preset|spacing|50"},"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-column" style="border-right-color:#ffffff33;border-right-width:1px;padding-right:var(--wp--preset--spacing--50)"><!-- wp:heading {"level":3,"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"medium"} -->
<h3 class="wp-block-heading has-medium-font-size" style="text-transform:uppercase"><?php echo esc_html__( 'About', 'infield' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php echo esc_html__( 'A passionate baseball fan blog celebrating America\'s favorite pastime.', 'infield' ); ?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"style":{"border":{"right":{"color":"#ffffff33","width":"1px"}},"spacing":{"padding":{"right":"var:preset|spacing|50"},"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-column" style="border-right-color:#ffffff33;border-right-width:1px;padding-right:var(--wp--preset--spacing--50)"><!-- wp:heading {"level":3,"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"medium"} -->
<h3 class="wp-block-heading has-medium-font-size" style="text-transform:uppercase"><?php echo esc_html__( 'Topics', 'infield' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:categories {"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40"}}},"fontSize":"x-small"} /--></div>
<!-- /wp:column -->

<!-- wp:column {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}}} -->
<div class="wp-block-column"><!-- wp:heading {"level":3,"style":{"typography":{"textTransform":"uppercase"}},"fontSize":"medium"} -->
<h3 class="wp-block-heading has-medium-font-size" style="text-transform:uppercase"><?php echo esc_html__( 'Follow Us', 'infield' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:social-links {"iconColor":"base","iconColorValue":"#ffffff","showLabels":true,"size":"has-normal-icon-size","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|20"}}},"className":"is-style-logos-only","layout":{"type":"flex","orientation":"vertical"}} -->
<ul class="wp-block-social-links has-normal-icon-size has-visible-labels has-icon-color is-style-logos-only"><!-- wp:social-link {"url":"#","service":"facebook","label":"Facebook"} /-->

<!-- wp:social-link {"url":"#","service":"instagram","label":"Instagram"} /-->

<!-- wp:social-link {"url":"#","service":"youtube"} /--></ul>
<!-- /wp:social-links --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->

<!-- wp:group {"style":{"background":{"backgroundImage":{"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/stripes-bg.png","source":"file","title":"Vertical Stripes Background"}},"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20)"><!-- wp:paragraph {"align":"center","fontSize":"x-small"} -->
<p class="has-text-align-center has-x-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'infield' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'infield' ),
$wordpress_link
);
?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
30 changes: 30 additions & 0 deletions infield/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* Title: Default footer
* Slug: infield/footer
* Categories: footer
* Block Types: core/template-part/footer
*/
declare( strict_types = 1 );
?>

<!-- wp:group {"align":"full","style":{"elements":{"link":{"color":{"text":"var:preset|color|base"}}},"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"backgroundColor":"accent-1","textColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-base-color has-accent-1-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60)"><!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
<div class="wp-block-group alignwide"><!-- wp:group {"layout":{"type":"flex"}} -->
<div class="wp-block-group"><!-- wp:navigation {"overlayMenu":"never","style":{"typography":{"textTransform":"uppercase"}}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:group {"style":{"background":{"backgroundImage":{"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/stripes-bg.png","source":"file","title":"Vertical Stripes Background"}},"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20)"><!-- wp:paragraph {"align":"center","fontSize":"x-small"} -->
<p class="has-text-align-center has-x-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'infield' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'infield' ),
$wordpress_link
);
?></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->
11 changes: 11 additions & 0 deletions infield/patterns/hidden-no-results-content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Title: Hidden No Results Content
* Slug: infield/hidden-no-results-content
* Inserter: no
*/
declare( strict_types = 1 );
?>
<!-- wp:paragraph {"style":{"spacing":{"padding":{"bottom":"80px","top":"20px"}}}} -->
<p style="padding-top:20px;padding-bottom:80px"><?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', 'infield' ); ?></p>
<!-- /wp:paragraph -->
Loading

0 comments on commit 051f727

Please sign in to comment.