Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename theme to TT1 Blocks #145

Merged
merged 6 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tt1-blocks-staging-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: FTP Deploy
uses: SamKirkland/[email protected]
with:
local-dir: twentytwentyone-blocks/
local-dir: tt1-blocks/
# Deployment destination server & path. Formatted as protocol://domain.com:port/full/destination/path/
ftp-server: sftp://2021blocks.wordpress.net:22/home/blockswordpress/public_html/wp-content/themes/twentytwentyone-blocks
ftp-server: sftp://2021blocks.wordpress.net:22/home/blockswordpress/public_html/wp-content/themes/tt1-blocks
# FTP account username
ftp-username: ${{ secrets.TT1BLOCKS_STAGING_SFTP_USERNAME }}
# FTP account password
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This repository is dedicated to exploring how WordPress themes can best leverage
| [Photo Blocks](https://github.com/WordPress/theme-experiments/tree/master/photo-blocks) | Gutenberg 9.5 |
| [Twenty Nineteen Blocks](https://github.com/WordPress/theme-experiments/tree/master/twentynineteen-blocks) | Gutenberg 8.6 |
| [Twenty Twenty Blocks](https://github.com/WordPress/theme-experiments/tree/master/twentytwenty-blocks) | Gutenberg 8.6 |
| [Twenty Twenty-One Blocks](https://github.com/WordPress/theme-experiments/tree/master/twentytwentyone-blocks) | Gutenberg 9.4 |
| [TT1 Blocks](https://github.com/WordPress/theme-experiments/tree/master/tt1-blocks) | Gutenberg 9.4 |

`require-gutenberg` _is a utility for themes to check whether the Gutenberg plugin is installed._

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions twentytwentyone-blocks/README.md → tt1-blocks/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Twenty Twenty-One Blocks
# TT1 Blocks

Ongoing development for the block-based version of Twenty Twenty-One, the default WordPress theme slated for 5.6.

Expand All @@ -14,12 +14,12 @@ To contribute to TT1 development, please read the [contributor's guide](/CONTRIB
2. Click the 'Code' button on [the main Theme Experiments Repository GitHub page](https://github.com/wordpress/theme-experiments).
3. Unzip the resulting download.
4. Move or upload the "theme-experiments" folder into your site's `wp-content/themes` folder.
6. Visit `Appearance > Themes` and activate the "Twenty Twenty-One Blocks" theme.
6. Visit `Appearance > Themes` and activate the "TT1 Blocks" theme.

## Copyright

Twenty Twenty-One Blocks WordPress Theme, 2020 WordPress.org
Twenty Twenty-One Blocks is distributed under the terms of the GNU GPL.
TT1 Blocks WordPress Theme, 2020 WordPress.org
TT1 Blocks is distributed under the terms of the GNU GPL.

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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- wp:template-part {"slug":"header","theme":"twentytwentyone-blocks","align":"full", "tagName":"header","className":"site-header"} /-->
<!-- wp:template-part {"slug":"header","theme":"tt1-blocks","align":"full", "tagName":"header","className":"site-header"} /-->

<!-- wp:heading {"level":1,"align":"wide"} -->
<h1 class="alignwide">Nothing Here</h1>
Expand All @@ -22,4 +22,4 @@ <h1 class="alignwide">Nothing Here</h1>
<div style="height:70px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:template-part {"slug":"footer","theme":"twentytwentyone-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
<!-- wp:template-part {"slug":"footer","theme":"tt1-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
5 changes: 5 additions & 0 deletions tt1-blocks/block-templates/front-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- wp:template-part {"slug":"header","theme":"tt1-blocks","align":"full", "tagName":"header","className":"site-header"} /-->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait I see its deleted below... weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is weird, I wonder why github didn't catch that it was a file rename.


<!-- wp:post-content /-->

<!-- wp:template-part {"slug":"footer","theme":"tt1-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- wp:template-part {"slug":"header","theme":"twentytwentyone-blocks","align":"full", "tagName":"header","className":"site-header"} /-->
<!-- wp:template-part {"slug":"header","theme":"tt1-blocks","align":"full", "tagName":"header","className":"site-header"} /-->

<!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} -->
<!-- wp:query-loop -->
Expand Down Expand Up @@ -35,4 +35,4 @@
<!-- /wp:query-loop -->
<!-- /wp:query -->

<!-- wp:template-part {"slug":"footer","theme":"twentytwentyone-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
<!-- wp:template-part {"slug":"footer","theme":"tt1-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- wp:template-part {"slug":"header","theme":"twentytwentyone-blocks","align":"full", "tagName":"header","className":"site-header"} /-->
<!-- wp:template-part {"slug":"header","theme":"tt1-blocks","align":"full", "tagName":"header","className":"site-header"} /-->

<!-- wp:post-title {"level":1,"align":"wide"} /-->

Expand All @@ -13,4 +13,4 @@
<!-- wp:post-content /-->
<!-- wp:post-comments /-->

<!-- wp:template-part {"slug":"footer","theme":"twentytwentyone-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
<!-- wp:template-part {"slug":"footer","theme":"tt1-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- wp:template-part {"slug":"header","theme":"twentytwentyone-blocks","align":"full", "tagName":"header","className":"site-header"} /-->
<!-- wp:template-part {"slug":"header","theme":"tt1-blocks","align":"full", "tagName":"header","className":"site-header"} /-->

<!-- wp:post-title {"level":1,"align":"wide"} /-->

Expand Down Expand Up @@ -39,4 +39,4 @@
<!-- /wp:spacer -->
<!-- wp:post-comments /-->

<!-- wp:template-part {"slug":"footer","theme":"twentytwentyone-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
<!-- wp:template-part {"slug":"footer","theme":"tt1-blocks","align":"full","tagName":"footer","className":"site-footer"} /-->
86 changes: 43 additions & 43 deletions twentytwentyone-blocks/functions.php → tt1-blocks/functions.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

if ( ! function_exists( 'twenty_twenty_one_blocks_setup' ) ) {
if ( ! function_exists( 'tt1_blocks_setup' ) ) {
/**
* Sets up theme defaults and registers support for various WordPress features.
*
Expand All @@ -12,14 +12,14 @@
*
* @return void
*/
function twenty_twenty_one_blocks_setup() {
function tt1_blocks_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on Twenty Twenty-One, use a find and replace
carolinan marked this conversation as resolved.
Show resolved Hide resolved
* to change 'twentytwentyone-blocks' to the name of your theme in all the template files.
* to change 'tt1-blocks' to the name of your theme in all the template files.
*/
load_theme_textdomain( 'twentytwentyone-blocks', get_template_directory() . '/languages' );
load_theme_textdomain( 'tt1-blocks', get_template_directory() . '/languages' );

// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
Expand Down Expand Up @@ -53,44 +53,44 @@ function twenty_twenty_one_blocks_setup() {
'editor-font-sizes',
array(
array(
'name' => esc_html__( 'Extra small', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'XS', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Extra small', 'tt1-blocks' ),
'shortName' => esc_html_x( 'XS', 'Font size', 'tt1-blocks' ),
'size' => 16,
'slug' => 'extra-small',
),
array(
'name' => esc_html__( 'Small', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'S', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Small', 'tt1-blocks' ),
'shortName' => esc_html_x( 'S', 'Font size', 'tt1-blocks' ),
'size' => 18,
'slug' => 'small',
),
array(
'name' => esc_html__( 'Normal', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'M', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Normal', 'tt1-blocks' ),
'shortName' => esc_html_x( 'M', 'Font size', 'tt1-blocks' ),
'size' => 20,
'slug' => 'normal',
),
array(
'name' => esc_html__( 'Large', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'L', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Large', 'tt1-blocks' ),
'shortName' => esc_html_x( 'L', 'Font size', 'tt1-blocks' ),
'size' => 24,
'slug' => 'large',
),
array(
'name' => esc_html__( 'Extra Large', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Extra Large', 'tt1-blocks' ),
'shortName' => esc_html_x( 'XL', 'Font size', 'tt1-blocks' ),
'size' => 40,
'slug' => 'extra-large',
),
array(
'name' => esc_html__( 'Huge', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'XXL', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Huge', 'tt1-blocks' ),
'shortName' => esc_html_x( 'XXL', 'Font size', 'tt1-blocks' ),
'size' => 96,
'slug' => 'huge',
),
array(
'name' => esc_html__( 'Gigantic', 'twentytwentyone-blocks' ),
'shortName' => esc_html_x( 'XXXL', 'Font size', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Gigantic', 'tt1-blocks' ),
'shortName' => esc_html_x( 'XXXL', 'Font size', 'tt1-blocks' ),
'size' => 144,
'slug' => 'gigantic',
),
Expand All @@ -113,52 +113,52 @@ function twenty_twenty_one_blocks_setup() {
'editor-color-palette',
array(
array(
'name' => esc_html__( 'Black', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Black', 'tt1-blocks' ),
'slug' => 'black',
'color' => $black,
),
array(
'name' => esc_html__( 'Dark Gray', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Dark Gray', 'tt1-blocks' ),
'slug' => 'dark-gray',
'color' => $dark_gray,
),
array(
'name' => esc_html__( 'Gray', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Gray', 'tt1-blocks' ),
'slug' => 'gray',
'color' => $gray,
),
array(
'name' => esc_html__( 'Green', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Green', 'tt1-blocks' ),
'slug' => 'green',
'color' => $green,
),
array(
'name' => esc_html__( 'Blue', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Blue', 'tt1-blocks' ),
'slug' => 'blue',
'color' => $blue,
),
array(
'name' => esc_html__( 'Purple', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Purple', 'tt1-blocks' ),
'slug' => 'purple',
'color' => $purple,
),
array(
'name' => esc_html__( 'Red', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Red', 'tt1-blocks' ),
'slug' => 'red',
'color' => $red,
),
array(
'name' => esc_html__( 'Orange', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Orange', 'tt1-blocks' ),
'slug' => 'orange',
'color' => $orange,
),
array(
'name' => esc_html__( 'Yellow', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Yellow', 'tt1-blocks' ),
'slug' => 'yellow',
'color' => $yellow,
),
array(
'name' => esc_html__( 'White', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'White', 'tt1-blocks' ),
'slug' => 'white',
'color' => $white,
),
Expand All @@ -169,42 +169,42 @@ function twenty_twenty_one_blocks_setup() {
'editor-gradient-presets',
array(
array(
'name' => esc_html__( 'Purple to Yellow', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Purple to Yellow', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $yellow . ')',
'slug' => 'purple-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Purple', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Yellow to Purple', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $purple . ')',
'slug' => 'yellow-to-purple',
),
array(
'name' => esc_html__( 'Green to Yellow', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Green to Yellow', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $green . ', ' . $yellow . ')',
'slug' => 'green-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Green', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Yellow to Green', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $green . ')',
'slug' => 'yellow-to-green',
),
array(
'name' => esc_html__( 'Red to Yellow', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Red to Yellow', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $yellow . ')',
'slug' => 'red-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Red', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Yellow to Red', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $red . ')',
'slug' => 'yellow-to-red',
),
array(
'name' => esc_html__( 'Purple to Red', 'twentytwentyone-blocks' ),
'name' => esc_html__( 'Purple to Red', 'tt1-blocks' ),
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $red . ')',
'slug' => 'purple-to-red',
),
array(
'name' => esc_html__( 'Red to Purple', 'twentytwentyone_blocks_block_editor_script' ),
'name' => esc_html__( 'Red to Purple', 'tt1_blocks_block_editor_script' ),
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $purple . ')',
'slug' => 'red-to-purple',
),
Expand All @@ -227,7 +227,7 @@ function twenty_twenty_one_blocks_setup() {
add_theme_support( 'custom-units' );
}
}
add_action( 'after_setup_theme', 'twenty_twenty_one_blocks_setup' );
add_action( 'after_setup_theme', 'tt1_blocks_setup' );

/**
* Enqueue scripts and styles.
Expand All @@ -236,10 +236,10 @@ function twenty_twenty_one_blocks_setup() {
*
* @return void
*/
function twenty_twenty_one_blocks_scripts() {
wp_enqueue_style( 'twenty-twenty-one-blocks-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
function tt1_blocks_scripts() {
wp_enqueue_style( 'tt1-blocks-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'twenty_twenty_one_blocks_scripts' );
add_action( 'wp_enqueue_scripts', 'tt1_blocks_scripts' );

/**
* Enqueue block editor script.
Expand All @@ -248,11 +248,11 @@ function twenty_twenty_one_blocks_scripts() {
*
* @return void
*/
function twentytwentyone_blocks_block_editor_script() {
function tt1_blocks_block_editor_script() {

wp_enqueue_script( 'twenty-twenty-one-blocks-unregister-block-style', get_theme_file_uri( '/assets/js/unregister-block-style.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
wp_enqueue_script( 'tt1-blocks-unregister-block-style', get_theme_file_uri( '/assets/js/unregister-block-style.js' ), array( 'wp-blocks', 'wp-dom' ), wp_get_theme()->get( 'Version' ), true );
}
add_action( 'enqueue_block_editor_assets', 'twentytwentyone_blocks_block_editor_script' );
add_action( 'enqueue_block_editor_assets', 'tt1_blocks_block_editor_script' );

// Block Patterns.
require get_template_directory() . '/inc/block-patterns.php';
Expand Down
Loading