Skip to content

Commit

Permalink
Re-add bedrock. (#7606)
Browse files Browse the repository at this point in the history
* Bedrock: Initial commit

* Bedrock: Add role atribute for sites without Gutenberg plugin

* Bedrock: add missing strict types declaration

---------

Co-authored-by: Takashi Irie <[email protected]>
  • Loading branch information
vcanales and iamtakashi authored Jan 11, 2024
1 parent df17505 commit e03f5ca
Show file tree
Hide file tree
Showing 43 changed files with 2,135 additions and 0 deletions.
Binary file added bedrock/assets/fonts/cousine_italic_400.ttf
Binary file not shown.
Binary file added bedrock/assets/fonts/cousine_italic_700.ttf
Binary file not shown.
Binary file added bedrock/assets/fonts/cousine_normal_400.ttf
Binary file not shown.
Binary file added bedrock/assets/fonts/cousine_normal_700.ttf
Binary file not shown.
Binary file added bedrock/assets/fonts/pixeloid-mono_normal_400.otf
Binary file not shown.
Binary file added bedrock/assets/fonts/pixeloid-sans_normal_400.otf
Binary file not shown.
Binary file added bedrock/assets/fonts/pixeloid-sans_normal_700.otf
Binary file not shown.
Binary file added bedrock/assets/images/Book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bedrock/assets/images/Diamond_Pickaxe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bedrock/assets/images/Gold_Ingot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bedrock/assets/images/Unknown_Object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bedrock/assets/images/background.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 bedrock/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Bedrock functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Bedrock
* @since Bedrock 1.0
*/
declare( strict_types = 1 );

if ( ! function_exists( 'bedrock_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress functionalities.
*
* @since Bedrock 1.0
*
* @return void
*/
function bedrock_support() {

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

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

endif;

add_action( 'after_setup_theme', 'bedrock_support' );

if ( ! function_exists( 'bedrock_styles' ) ) :

/**
* Enqueue styles.
*
* @since Bedrock 1.0
*
* @return void
*/
function bedrock_styles() {

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

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

}

endif;

add_action( 'wp_enqueue_scripts', 'bedrock_styles' );
63 changes: 63 additions & 0 deletions bedrock/parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group">
<!-- wp:comments {"className":"wp-block-comments-query-loop"} -->
<div class="wp-block-comments wp-block-comments-query-loop">
<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60","bottom":"0"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60);margin-bottom:0">
<!-- wp:comments-title {"level":3,"fontSize":"large"} /-->

<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group">
<!-- wp:comment-template {"style":{"spacing":{"padding":{"left":"0px"}}}} -->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|60"}}}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":48} /-->

<!-- 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 /-->

<!-- wp:comment-reply-link /-->
</div>
<!-- /wp:group -->
<!-- /wp:comment-template -->
</div>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--60);margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:comments-pagination {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:comments-pagination-previous /-->

<!-- wp:comments-pagination-next /-->
<!-- /wp:comments-pagination -->
</div>
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
<!-- wp:post-comments-form {"style":{"spacing":{"margin":{"top":"var:preset|spacing|60"}}}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:comments -->
</div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions bedrock/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"bedrock/footer"} /-->
1 change: 1 addition & 0 deletions bedrock/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"bedrock/header"} /-->
1 change: 1 addition & 0 deletions bedrock/parts/post-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"bedrock/post-meta"} /-->
1 change: 1 addition & 0 deletions bedrock/parts/sidebar-with-recent-posts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"bedrock/sidebar-with-recent-posts"} /-->
1 change: 1 addition & 0 deletions bedrock/parts/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"bedrock/sidebar"} /-->
58 changes: 58 additions & 0 deletions bedrock/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php
/**
* Title: 404
* Slug: bedrock/404
* Inserter: no
*/
declare( strict_types = 1 );
?>

<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
<div class="wp-block-cover alignfull is-repeated">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<div role="img" class="wp-block-cover__image-background is-repeated" style="background-position:50% 50%;background-image:url(<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png)"></div>
<div class="wp-block-cover__inner-container">
<!-- wp:group {"align":"wide","style":{"border":{"width":"1px"},"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60","left":"var:preset|spacing|60","right":"var:preset|spacing|60"},"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"borderColor":"contrast","backgroundColor":"base","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide has-border-color has-contrast-border-color has-base-background-color has-background" style="border-width:1px;margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70);padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)">
<!-- wp:columns {"style":{"spacing":{"blockGap":{"left":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns">
<!-- wp:column {"width":"68%","layout":{"type":"default"}} -->
<div class="wp-block-column" style="flex-basis:68%">
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
<!-- wp:image {"sizeSlug":"full","linkDestination":"none","align":"center"} -->
<figure class="wp-block-image aligncenter size-full"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/Unknown_Object.png" alt=""/></figure>
<!-- /wp:image -->

<!-- wp:paragraph {"align":"center","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"><?php echo esc_html__( 'LuaEntity not found.', 'bedrock' ); ?></p>
<!-- /wp:paragraph -->
</main>
<!-- /wp:group -->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"32%"} -->
<div class="wp-block-column" style="flex-basis:32%">
<!-- wp:template-part {"slug":"sidebar"} /-->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
</div>
</div>
<!-- /wp:cover -->
</div>
<!-- /wp:group -->

<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
</div>
<!-- /wp:group -->
60 changes: 60 additions & 0 deletions bedrock/patterns/archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* Title: Archive
* Slug: bedrock/archive
* Inserter: no
*/
declare( strict_types = 1 );
?>

<!-- wp:template-part {"slug":"header","tagName":"header","align":"full"} /-->

<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"backgroundColor":"primary","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-primary-background-color has-background" style="margin-top:0px;margin-bottom:0px">
<!-- wp:cover {"url":"<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png","isRepeated":true,"dimRatio":0,"isUserOverlayColor":true,"align":"full","layout":{"type":"constrained"}} -->
<div class="wp-block-cover alignfull is-repeated">
<span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span>
<div role="img" class="wp-block-cover__image-background is-repeated" style="background-position:50% 50%;background-image:url(<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/background.png)"></div>
<div class="wp-block-cover__inner-container">
<!-- wp:group {"align":"wide","style":{"border":{"width":"1px"},"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|60","left":"var:preset|spacing|60","right":"var:preset|spacing|60"},"margin":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"borderColor":"contrast","backgroundColor":"base","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide has-border-color has-contrast-border-color has-base-background-color has-background" style="border-width:1px;margin-top:var(--wp--preset--spacing--70);margin-bottom:var(--wp--preset--spacing--70);padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)">
<!-- wp:columns {"style":{"spacing":{"blockGap":{"left":"var:preset|spacing|60"}}}} -->
<div class="wp-block-columns">
<!-- wp:column {"width":"68%","layout":{"type":"default"}} -->
<div class="wp-block-column" style="flex-basis:68%">
<!-- wp:group {"tagName":"main","layout":{"type":"default"}} -->
<main class="wp-block-group">
<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|60"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--60)">
<!-- wp:query-title {"type":"archive","showPrefix":false} /-->

<!-- wp:term-description {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30"}}}} /-->
</div>
<!-- /wp:group -->

<!-- wp:pattern {"slug":"bedrock/post-list"} /-->
</main>
<!-- /wp:group -->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"32%"} -->
<div class="wp-block-column" style="flex-basis:32%">
<!-- wp:template-part {"slug":"sidebar"} /-->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
</div>
</div>
<!-- /wp:cover -->
</div>
<!-- /wp:group -->

<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px">
<!-- wp:template-part {"slug":"footer","tagName":"footer","align":"full"} /-->
</div>
<!-- /wp:group -->
80 changes: 80 additions & 0 deletions bedrock/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php
/**
* Title: Default footer
* Slug: bedrock/footer
* Categories: featured, footer
* Block Types: core/template-part/footer
*/
declare( strict_types = 1 );
?>

<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|70","right":"var:preset|spacing|50","bottom":"var:preset|spacing|70","left":"var:preset|spacing|50"}},"border":{"top":{"color":"var:preset|color|contrast","width":"1px"},"right":{},"bottom":{},"left":{}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull has-base-background-color has-background" style="border-top-color:var(--wp--preset--color--contrast);border-top-width:1px;padding-top:var(--wp--preset--spacing--70);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--50)">
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide">
<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%">
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"level":0,"style":{"layout":{"selfStretch":"fill","flexSize":null},"typography":{"lineHeight":"1.43"}}} /-->

<!-- wp:paragraph -->
<p><?php echo esc_html__( 'Discover the ultimate Minetest resource - your go-to guide for expert tutorials, stunning mods, and exclusive stories. Elevate your game with insider knowledge and tips from seasoned Minetest enthusiasts.', 'bedrock' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:social-links {"iconColor":"contrast","iconColorValue":"#ffffff","size":"has-small-icon-size","style":{"spacing":{"blockGap":{"left":"var:preset|spacing|50"}}},"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":"https://www.twitch.tv/","service":"twitch"} /-->
<!-- wp:social-link {"url":"https://twitter.com/","service":"x"} /-->
<!-- wp:social-link {"url":"https://www.tiktok.com/","service":"tiktok"} /-->
<!-- wp:social-link {"url":"https://facebook.com/","service":"facebook"} /-->
<!-- wp:social-link {"url":"https://instagram.com","service":"instagram"} /-->
</ul>
<!-- /wp:social-links -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:column -->

<!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%">
<!-- wp:heading {"level":3,"style":{"typography":{"fontStyle":"normal","fontWeight":"700","textTransform":"uppercase","lineHeight":"1.43"}},"className":"wp-block-heading"} -->
<h3 class="wp-block-heading" style="font-style:normal;font-weight:700;line-height:1.43;text-transform:uppercase"><?php echo esc_html__( 'Subscribe', 'bedrock' ); ?></h3>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php echo esc_html__( 'Enter your email to sign up for our newsletter. We promise to respect your inbox.', 'bedrock' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:jetpack/subscriptions {"fontSize":"1.125rem","customFontSize":"1.125rem","borderWeight":0,"padding":8} /-->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->

<!-- wp:group {"align":"wide","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}},"spacing":{"margin":{"top":"var:preset|spacing|60"}}},"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide has-link-color" style="margin-top:var(--wp--preset--spacing--60)">
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
<div class="wp-block-group">
<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size"><a href="#"><?php echo esc_html__( 'Terms of Use', 'bedrock' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"fontSize":"small"} -->
<p class="has-small-font-size"><a href="#"><?php echo esc_html__( 'Privacy and Cookies', 'bedrock' ); ?></a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->

<!-- wp:paragraph {"lock":{"move":false,"remove":true},"className":"has-small-font-size","fontSize":"small"} -->
<p class="has-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'bedrock' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'bedrock' ),
$wordpress_link
);?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
21 changes: 21 additions & 0 deletions bedrock/patterns/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Title: Default header
* Slug: bedrock/header
* Categories: featured, header
* Block Types: core/template-part/header
*/
declare( strict_types = 1 );
?>

<!-- wp:group {"style":{"border":{"right":[],"bottom":{"color":"var:preset|color|contrast","width":"1px"},"left":[]},"spacing":{"padding":{"right":"var:preset|spacing|60","left":"var:preset|spacing|60","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}}},"backgroundColor":"base","layout":{"type":"default"}} -->
<div class="wp-block-group has-base-background-color has-background" style="border-bottom-color:var(--wp--preset--color--contrast);border-bottom-width:1px;padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--60)">
<!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide">
<!-- wp:site-title {"level":0,"style":{"layout":{"selfStretch":"fit","flexSize":null}}} /-->

<!-- wp:navigation {"align":"wide","layout":{"type":"flex"}} /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
Loading

0 comments on commit e03f5ca

Please sign in to comment.