From b12635a2cefe850b9996c0d9d311b820b29801f8 Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Wed, 16 Dec 2020 12:20:17 -0500 Subject: [PATCH 1/5] Rename theme to TT1 Blocks. --- .../workflows/tt1-blocks-staging-deploy.yml | 4 +- README.md | 2 +- .../LICENSE | 0 .../README.md | 8 +- .../assets/css/blocks.css | 0 .../assets/css/style-editor.css | 0 .../assets/css/style-shared.css | 0 .../assets/images/Daffodils.jpg | Bin .../assets/images/Reading.jpg | Bin .../assets/images/in-the-bois-de-boulogne.jpg | Bin .../assets/images/playing-in-the-sand.jpg | Bin .../roses-tremieres-hollyhocks-1884.jpg | Bin .../images/roses-tremieres-hollyhocks.jpg | Bin .../assets/images/self-portrait-1885.jpg | Bin .../images/the-garden-at-bougival-1884.jpg | Bin .../images/villa-with-orange-trees-nice.jpg | Bin .../assets/images/young-woman-in-mauve.jpg | Bin .../assets/js/unregister-block-style.js | 0 .../block-template-parts/footer.html | 0 .../block-template-parts/header.html | 0 .../block-templates/404.html | 4 +- tt1-blocks/block-templates/front-page.html | 5 + .../block-templates/index.html | 4 +- .../block-templates/page.html | 4 +- .../block-templates/single.html | 4 +- .../experimental-theme.json | 0 .../functions.php | 80 ++++++------ tt1-blocks/inc/block-patterns.php | 120 ++++++++++++++++++ .../inc/block-styles.php | 20 +-- .../index.php | 0 .../screenshot.png | Bin .../style.css | 14 +- .../block-templates/front-page.html | 5 - twentytwentyone-blocks/inc/block-patterns.php | 120 ------------------ 34 files changed, 197 insertions(+), 197 deletions(-) rename {twentytwentyone-blocks => tt1-blocks}/LICENSE (100%) rename {twentytwentyone-blocks => tt1-blocks}/README.md (88%) rename {twentytwentyone-blocks => tt1-blocks}/assets/css/blocks.css (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/css/style-editor.css (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/css/style-shared.css (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/Daffodils.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/Reading.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/in-the-bois-de-boulogne.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/playing-in-the-sand.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/roses-tremieres-hollyhocks-1884.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/roses-tremieres-hollyhocks.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/self-portrait-1885.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/the-garden-at-bougival-1884.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/villa-with-orange-trees-nice.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/images/young-woman-in-mauve.jpg (100%) rename {twentytwentyone-blocks => tt1-blocks}/assets/js/unregister-block-style.js (100%) rename {twentytwentyone-blocks => tt1-blocks}/block-template-parts/footer.html (100%) rename {twentytwentyone-blocks => tt1-blocks}/block-template-parts/header.html (100%) rename {twentytwentyone-blocks => tt1-blocks}/block-templates/404.html (73%) create mode 100644 tt1-blocks/block-templates/front-page.html rename {twentytwentyone-blocks => tt1-blocks}/block-templates/index.html (81%) rename {twentytwentyone-blocks => tt1-blocks}/block-templates/page.html (61%) rename {twentytwentyone-blocks => tt1-blocks}/block-templates/single.html (82%) rename {twentytwentyone-blocks => tt1-blocks}/experimental-theme.json (100%) rename {twentytwentyone-blocks => tt1-blocks}/functions.php (62%) create mode 100644 tt1-blocks/inc/block-patterns.php rename {twentytwentyone-blocks => tt1-blocks}/inc/block-styles.php (73%) rename {twentytwentyone-blocks => tt1-blocks}/index.php (100%) rename {twentytwentyone-blocks => tt1-blocks}/screenshot.png (100%) rename {twentytwentyone-blocks => tt1-blocks}/style.css (77%) delete mode 100644 twentytwentyone-blocks/block-templates/front-page.html delete mode 100644 twentytwentyone-blocks/inc/block-patterns.php diff --git a/.github/workflows/tt1-blocks-staging-deploy.yml b/.github/workflows/tt1-blocks-staging-deploy.yml index 1c4487cf..5e5549b3 100644 --- a/.github/workflows/tt1-blocks-staging-deploy.yml +++ b/.github/workflows/tt1-blocks-staging-deploy.yml @@ -15,9 +15,9 @@ jobs: - name: FTP Deploy uses: SamKirkland/FTP-Deploy-Action@3.0.0 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 diff --git a/README.md b/README.md index 087872e5..8d77ec1c 100644 --- a/README.md +++ b/README.md @@ -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._ diff --git a/twentytwentyone-blocks/LICENSE b/tt1-blocks/LICENSE similarity index 100% rename from twentytwentyone-blocks/LICENSE rename to tt1-blocks/LICENSE diff --git a/twentytwentyone-blocks/README.md b/tt1-blocks/README.md similarity index 88% rename from twentytwentyone-blocks/README.md rename to tt1-blocks/README.md index 34b6eeee..18147119 100644 --- a/twentytwentyone-blocks/README.md +++ b/tt1-blocks/README.md @@ -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. @@ -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 diff --git a/twentytwentyone-blocks/assets/css/blocks.css b/tt1-blocks/assets/css/blocks.css similarity index 100% rename from twentytwentyone-blocks/assets/css/blocks.css rename to tt1-blocks/assets/css/blocks.css diff --git a/twentytwentyone-blocks/assets/css/style-editor.css b/tt1-blocks/assets/css/style-editor.css similarity index 100% rename from twentytwentyone-blocks/assets/css/style-editor.css rename to tt1-blocks/assets/css/style-editor.css diff --git a/twentytwentyone-blocks/assets/css/style-shared.css b/tt1-blocks/assets/css/style-shared.css similarity index 100% rename from twentytwentyone-blocks/assets/css/style-shared.css rename to tt1-blocks/assets/css/style-shared.css diff --git a/twentytwentyone-blocks/assets/images/Daffodils.jpg b/tt1-blocks/assets/images/Daffodils.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/Daffodils.jpg rename to tt1-blocks/assets/images/Daffodils.jpg diff --git a/twentytwentyone-blocks/assets/images/Reading.jpg b/tt1-blocks/assets/images/Reading.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/Reading.jpg rename to tt1-blocks/assets/images/Reading.jpg diff --git a/twentytwentyone-blocks/assets/images/in-the-bois-de-boulogne.jpg b/tt1-blocks/assets/images/in-the-bois-de-boulogne.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/in-the-bois-de-boulogne.jpg rename to tt1-blocks/assets/images/in-the-bois-de-boulogne.jpg diff --git a/twentytwentyone-blocks/assets/images/playing-in-the-sand.jpg b/tt1-blocks/assets/images/playing-in-the-sand.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/playing-in-the-sand.jpg rename to tt1-blocks/assets/images/playing-in-the-sand.jpg diff --git a/twentytwentyone-blocks/assets/images/roses-tremieres-hollyhocks-1884.jpg b/tt1-blocks/assets/images/roses-tremieres-hollyhocks-1884.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/roses-tremieres-hollyhocks-1884.jpg rename to tt1-blocks/assets/images/roses-tremieres-hollyhocks-1884.jpg diff --git a/twentytwentyone-blocks/assets/images/roses-tremieres-hollyhocks.jpg b/tt1-blocks/assets/images/roses-tremieres-hollyhocks.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/roses-tremieres-hollyhocks.jpg rename to tt1-blocks/assets/images/roses-tremieres-hollyhocks.jpg diff --git a/twentytwentyone-blocks/assets/images/self-portrait-1885.jpg b/tt1-blocks/assets/images/self-portrait-1885.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/self-portrait-1885.jpg rename to tt1-blocks/assets/images/self-portrait-1885.jpg diff --git a/twentytwentyone-blocks/assets/images/the-garden-at-bougival-1884.jpg b/tt1-blocks/assets/images/the-garden-at-bougival-1884.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/the-garden-at-bougival-1884.jpg rename to tt1-blocks/assets/images/the-garden-at-bougival-1884.jpg diff --git a/twentytwentyone-blocks/assets/images/villa-with-orange-trees-nice.jpg b/tt1-blocks/assets/images/villa-with-orange-trees-nice.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/villa-with-orange-trees-nice.jpg rename to tt1-blocks/assets/images/villa-with-orange-trees-nice.jpg diff --git a/twentytwentyone-blocks/assets/images/young-woman-in-mauve.jpg b/tt1-blocks/assets/images/young-woman-in-mauve.jpg similarity index 100% rename from twentytwentyone-blocks/assets/images/young-woman-in-mauve.jpg rename to tt1-blocks/assets/images/young-woman-in-mauve.jpg diff --git a/twentytwentyone-blocks/assets/js/unregister-block-style.js b/tt1-blocks/assets/js/unregister-block-style.js similarity index 100% rename from twentytwentyone-blocks/assets/js/unregister-block-style.js rename to tt1-blocks/assets/js/unregister-block-style.js diff --git a/twentytwentyone-blocks/block-template-parts/footer.html b/tt1-blocks/block-template-parts/footer.html similarity index 100% rename from twentytwentyone-blocks/block-template-parts/footer.html rename to tt1-blocks/block-template-parts/footer.html diff --git a/twentytwentyone-blocks/block-template-parts/header.html b/tt1-blocks/block-template-parts/header.html similarity index 100% rename from twentytwentyone-blocks/block-template-parts/header.html rename to tt1-blocks/block-template-parts/header.html diff --git a/twentytwentyone-blocks/block-templates/404.html b/tt1-blocks/block-templates/404.html similarity index 73% rename from twentytwentyone-blocks/block-templates/404.html rename to tt1-blocks/block-templates/404.html index e3f6fe23..767cb4aa 100644 --- a/twentytwentyone-blocks/block-templates/404.html +++ b/tt1-blocks/block-templates/404.html @@ -1,4 +1,4 @@ - +

Nothing Here

@@ -22,4 +22,4 @@

Nothing Here

- \ No newline at end of file + \ No newline at end of file diff --git a/tt1-blocks/block-templates/front-page.html b/tt1-blocks/block-templates/front-page.html new file mode 100644 index 00000000..2f7f6505 --- /dev/null +++ b/tt1-blocks/block-templates/front-page.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/twentytwentyone-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html similarity index 81% rename from twentytwentyone-blocks/block-templates/index.html rename to tt1-blocks/block-templates/index.html index 5e1a18c1..d49e4351 100644 --- a/twentytwentyone-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -1,4 +1,4 @@ - + @@ -35,4 +35,4 @@ - + diff --git a/twentytwentyone-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html similarity index 61% rename from twentytwentyone-blocks/block-templates/page.html rename to tt1-blocks/block-templates/page.html index 78b1d912..86fa87e9 100644 --- a/twentytwentyone-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -1,4 +1,4 @@ - + @@ -13,4 +13,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/twentytwentyone-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html similarity index 82% rename from twentytwentyone-blocks/block-templates/single.html rename to tt1-blocks/block-templates/single.html index e53643fa..7048864e 100644 --- a/twentytwentyone-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,4 +1,4 @@ - + @@ -39,4 +39,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/twentytwentyone-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json similarity index 100% rename from twentytwentyone-blocks/experimental-theme.json rename to tt1-blocks/experimental-theme.json diff --git a/twentytwentyone-blocks/functions.php b/tt1-blocks/functions.php similarity index 62% rename from twentytwentyone-blocks/functions.php rename to tt1-blocks/functions.php index 8ee5151f..37a96e5a 100644 --- a/twentytwentyone-blocks/functions.php +++ b/tt1-blocks/functions.php @@ -1,6 +1,6 @@ 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', ), @@ -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, ), @@ -169,37 +169,37 @@ 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', ), @@ -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. @@ -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. @@ -250,7 +250,7 @@ function twenty_twenty_one_blocks_scripts() { */ function twentytwentyone_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' ); diff --git a/tt1-blocks/inc/block-patterns.php b/tt1-blocks/inc/block-patterns.php new file mode 100644 index 00000000..dc407ce6 --- /dev/null +++ b/tt1-blocks/inc/block-patterns.php @@ -0,0 +1,120 @@ + esc_html__( 'TT1 Blocks', 'tt1-blocks' ) ) + ); +} + +/** + * Register Block Patterns. + */ +if ( function_exists( 'register_block_pattern' ) ) { + + // Large Text. + register_block_pattern( + 'tt1-blocks/large-text', + array( + 'title' => esc_html__( 'Large Text', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1440, + 'content' => '

' . esc_html__( 'A new portfolio default theme for WordPress', 'tt1-blocks' ) . '

', + ) + ); + + // Links Area. + register_block_pattern( + 'tt1-blocks/links-area', + array( + 'title' => esc_html__( 'Links Area', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1440, + 'description' => esc_html_x( 'A huge text followed by social networks and email address links.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '

', + ) + ); + + // Media & Text Article Title. + register_block_pattern( + 'tt1-blocks/media-text-article-title', + array( + 'title' => esc_html__( 'Media and Text Article Title', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1440, + 'description' => esc_html_x( 'A Media & Text block with a big image on the left and a heading on the right. The heading is followed by a separator and a description paragraph.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '
' . esc_attr__( '“Playing in the Sand” by Berthe Morisot', 'tt1-blocks' ) . '

' . esc_html__( 'Playing in the Sand', 'tt1-blocks' ) . '


' . wp_kses_post( __( 'Berthe Morisot
(French, 1841-1895)', 'tt1-blocks' ) ) . '

', + ) + ); + + // Overlapping Images. + register_block_pattern( + 'tt1-blocks/overlapping-images', + array( + 'title' => esc_html__( 'Overlapping Images', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1024, + 'description' => esc_html_x( 'Three images inside an overlapping columns block.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'tt1-blocks' ) . '
' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'tt1-blocks' ) . '
' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'tt1-blocks' ) . '
', + ) + ); + + // Two Images Showcase. + register_block_pattern( + 'tt1-blocks/two-images-showcase', + array( + 'title' => esc_html__( 'Two Images Showcase', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1440, + 'description' => esc_html_x( 'A Media & Text block with a big image on the left and a smaller one with bordered frame on the right.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '
' . esc_attr__( '“Daffodils” by Berthe Morisot', 'tt1-blocks' ) . '
' . esc_attr__( '“Self portrait” by Berthe Morisot', 'tt1-blocks' ) . '
', + ) + ); + + // Overlapping Images and Text. + register_block_pattern( + 'tt1-blocks/overlapping-images-and-text', + array( + 'title' => esc_html__( 'Overlapping Images and Text', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'viewportWidth' => 1440, + 'description' => esc_html_x( 'An overlapping columns block with two images and a text description.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '
' . esc_attr__( '“The Garden at Bougival” by Berthe Morisot', 'tt1-blocks' ) . '

' . esc_html__( 'Beautiful gardens painted by Berthe Morisot in the late 1800s', 'tt1-blocks' ) . '

' . esc_attr__( '“Villa with Orange Trees, Nice” by Berthe Morisot', 'tt1-blocks' ) . '
', + ) + ); + + // Portfolio List. + register_block_pattern( + 'tt1-blocks/portfolio-list', + array( + 'title' => esc_html__( 'Portfolio List', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'description' => esc_html_x( 'A list of projects with thumbnail images.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'tt1-blocks' ) . '

“Villa with Orange Trees, Nice” by Berthe Morisot

' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'tt1-blocks' ) . '

' . esc_attr__( '“The Garden at Bougival” by Berthe Morisot', 'tt1-blocks' ) . '

' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'tt1-blocks' ) . '

' . esc_attr__( '“Reading” by Berthe Morisot', 'tt1-blocks' ) . '

', + ) + ); + + register_block_pattern( + 'tt1-blocks/contact-information', + array( + 'title' => esc_html__( 'Contact Information', 'tt1-blocks' ), + 'categories' => array( 'tt1-blocks' ), + 'description' => esc_html_x( 'A block with 3 columns that display contact information and social media links.', 'Block pattern description', 'tt1-blocks' ), + 'content' => '

' . esc_html__( 'example@example.com', 'tt1-blocks' ) . '
' . esc_html__( '123-456-7890', 'tt1-blocks' ) . '

' . esc_html__( '123 Main Street', 'tt1-blocks' ) . '
' . esc_html__( 'Cambridge, MA, 02139', 'tt1-blocks' ) . '

', + ) + ); +} diff --git a/twentytwentyone-blocks/inc/block-styles.php b/tt1-blocks/inc/block-styles.php similarity index 73% rename from twentytwentyone-blocks/inc/block-styles.php rename to tt1-blocks/inc/block-styles.php index 010be691..1b239f1d 100644 --- a/twentytwentyone-blocks/inc/block-styles.php +++ b/tt1-blocks/inc/block-styles.php @@ -23,7 +23,7 @@ function twenty_twenty_one_register_block_styles() { 'core/columns', array( 'name' => 'twentytwentyone-columns-overlap', - 'label' => esc_html__( 'Overlap', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Overlap', 'tt1-blocks' ), ) ); @@ -32,7 +32,7 @@ function twenty_twenty_one_register_block_styles() { 'core/cover', array( 'name' => 'twentytwentyone-border', - 'label' => esc_html__( 'Borders', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Borders', 'tt1-blocks' ), ) ); @@ -41,7 +41,7 @@ function twenty_twenty_one_register_block_styles() { 'core/group', array( 'name' => 'twentytwentyone-border', - 'label' => esc_html__( 'Borders', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Borders', 'tt1-blocks' ), ) ); @@ -50,7 +50,7 @@ function twenty_twenty_one_register_block_styles() { 'core/image', array( 'name' => 'twentytwentyone-border', - 'label' => esc_html__( 'Borders', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Borders', 'tt1-blocks' ), ) ); @@ -59,7 +59,7 @@ function twenty_twenty_one_register_block_styles() { 'core/image', array( 'name' => 'twentytwentyone-image-frame', - 'label' => esc_html__( 'Frame', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Frame', 'tt1-blocks' ), ) ); @@ -68,7 +68,7 @@ function twenty_twenty_one_register_block_styles() { 'core/latest-posts', array( 'name' => 'twentytwentyone-latest-posts-dividers', - 'label' => esc_html__( 'Dividers', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Dividers', 'tt1-blocks' ), ) ); @@ -77,7 +77,7 @@ function twenty_twenty_one_register_block_styles() { 'core/latest-posts', array( 'name' => 'twentytwentyone-latest-posts-borders', - 'label' => esc_html__( 'Borders', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Borders', 'tt1-blocks' ), ) ); @@ -86,7 +86,7 @@ function twenty_twenty_one_register_block_styles() { 'core/media-text', array( 'name' => 'twentytwentyone-border', - 'label' => esc_html__( 'Borders', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Borders', 'tt1-blocks' ), ) ); @@ -95,7 +95,7 @@ function twenty_twenty_one_register_block_styles() { 'core/separator', array( 'name' => 'twentytwentyone-separator-thick', - 'label' => esc_html__( 'Thick', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Thick', 'tt1-blocks' ), ) ); @@ -104,7 +104,7 @@ function twenty_twenty_one_register_block_styles() { 'core/social-links', array( 'name' => 'twentytwentyone-social-icons-color', - 'label' => esc_html__( 'Dark Gray', 'twentytwentyone-blocks' ), + 'label' => esc_html__( 'Dark Gray', 'tt1-blocks' ), ) ); } diff --git a/twentytwentyone-blocks/index.php b/tt1-blocks/index.php similarity index 100% rename from twentytwentyone-blocks/index.php rename to tt1-blocks/index.php diff --git a/twentytwentyone-blocks/screenshot.png b/tt1-blocks/screenshot.png similarity index 100% rename from twentytwentyone-blocks/screenshot.png rename to tt1-blocks/screenshot.png diff --git a/twentytwentyone-blocks/style.css b/tt1-blocks/style.css similarity index 77% rename from twentytwentyone-blocks/style.css rename to tt1-blocks/style.css index 02f6724c..dd79e4ef 100644 --- a/twentytwentyone-blocks/style.css +++ b/tt1-blocks/style.css @@ -1,20 +1,20 @@ /* -Theme Name: Twenty Twenty-One Blocks -Theme URI: https://github.com/WordPress/theme-experiments/twentytwentyone-blocks +Theme Name: TT1 Blocks +Theme URI: https://github.com/WordPress/theme-experiments/tt1-blocks Author: the WordPress team Author URI: https://wordpress.org/ -Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog. +Description: TT1 Blocks is a block-based version of the default Twenty Twenty-One theme. It's just like Twenty Twenty-One, but it works with the experimental Full-Site Editing & Global Styles features of WordPress. Requires at least: 5.3 -Tested up to: 5.5 +Tested up to: 5.3 Requires PHP: 5.6 Version: 1.0.0 License: GNU General Public License v2 or later License URI: LICENSE -Text Domain: twentytwentyone-blocks +Text Domain: tt1-blocks Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready -Twenty Twenty-One WordPress Theme, (C) 2020 WordPress.org -Twenty Twenty-One is distributed under the terms of the GNU GPL. +TT1 Blocks WordPress Theme, (C) 2020 WordPress.org +TT1 Blocks is distributed under the terms of the GNU GPL. */ /*-------------------------------------------------------------- diff --git a/twentytwentyone-blocks/block-templates/front-page.html b/twentytwentyone-blocks/block-templates/front-page.html deleted file mode 100644 index 86f444d1..00000000 --- a/twentytwentyone-blocks/block-templates/front-page.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/twentytwentyone-blocks/inc/block-patterns.php b/twentytwentyone-blocks/inc/block-patterns.php deleted file mode 100644 index 40864b6d..00000000 --- a/twentytwentyone-blocks/inc/block-patterns.php +++ /dev/null @@ -1,120 +0,0 @@ - esc_html__( 'Twenty Twenty-One Blocks', 'twentytwentyone-blocks' ) ) - ); -} - -/** - * Register Block Patterns. - */ -if ( function_exists( 'register_block_pattern' ) ) { - - // Large Text. - register_block_pattern( - 'twentytwentyone-blocks/large-text', - array( - 'title' => esc_html__( 'Large Text', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1440, - 'content' => '

' . esc_html__( 'A new portfolio default theme for WordPress', 'twentytwentyone-blocks' ) . '

', - ) - ); - - // Links Area. - register_block_pattern( - 'twentytwentyone-blocks/links-area', - array( - 'title' => esc_html__( 'Links Area', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1440, - 'description' => esc_html_x( 'A huge text followed by social networks and email address links.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '

', - ) - ); - - // Media & Text Article Title. - register_block_pattern( - 'twentytwentyone-blocks/media-text-article-title', - array( - 'title' => esc_html__( 'Media and Text Article Title', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1440, - 'description' => esc_html_x( 'A Media & Text block with a big image on the left and a heading on the right. The heading is followed by a separator and a description paragraph.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '
' . esc_attr__( '“Playing in the Sand” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

' . esc_html__( 'Playing in the Sand', 'twentytwentyone-blocks' ) . '


' . wp_kses_post( __( 'Berthe Morisot
(French, 1841-1895)', 'twentytwentyone-blocks' ) ) . '

', - ) - ); - - // Overlapping Images. - register_block_pattern( - 'twentytwentyone-blocks/overlapping-images', - array( - 'title' => esc_html__( 'Overlapping Images', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1024, - 'description' => esc_html_x( 'Three images inside an overlapping columns block.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
', - ) - ); - - // Two Images Showcase. - register_block_pattern( - 'twentytwentyone-blocks/two-images-showcase', - array( - 'title' => esc_html__( 'Two Images Showcase', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1440, - 'description' => esc_html_x( 'A Media & Text block with a big image on the left and a smaller one with bordered frame on the right.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '
' . esc_attr__( '“Daffodils” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
' . esc_attr__( '“Self portrait” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
', - ) - ); - - // Overlapping Images and Text. - register_block_pattern( - 'twentytwentyone-blocks/overlapping-images-and-text', - array( - 'title' => esc_html__( 'Overlapping Images and Text', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'viewportWidth' => 1440, - 'description' => esc_html_x( 'An overlapping columns block with two images and a text description.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '
' . esc_attr__( '“The Garden at Bougival” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

' . esc_html__( 'Beautiful gardens painted by Berthe Morisot in the late 1800s', 'twentytwentyone-blocks' ) . '

' . esc_attr__( '“Villa with Orange Trees, Nice” by Berthe Morisot', 'twentytwentyone-blocks' ) . '
', - ) - ); - - // Portfolio List. - register_block_pattern( - 'twentytwentyone-blocks/portfolio-list', - array( - 'title' => esc_html__( 'Portfolio List', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'description' => esc_html_x( 'A list of projects with thumbnail images.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '
' . esc_attr__( '“Roses Tremieres” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

“Villa with Orange Trees, Nice” by Berthe Morisot

' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

' . esc_attr__( '“The Garden at Bougival” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

' . esc_attr__( '“Reading” by Berthe Morisot', 'twentytwentyone-blocks' ) . '

', - ) - ); - - register_block_pattern( - 'twentytwentyone-blocks/contact-information', - array( - 'title' => esc_html__( 'Contact Information', 'twentytwentyone-blocks' ), - 'categories' => array( 'twentytwentyone-blocks' ), - 'description' => esc_html_x( 'A block with 3 columns that display contact information and social media links.', 'Block pattern description', 'twentytwentyone-blocks' ), - 'content' => '

' . esc_html__( 'example@example.com', 'twentytwentyone-blocks' ) . '
' . esc_html__( '123-456-7890', 'twentytwentyone-blocks' ) . '

' . esc_html__( '123 Main Street', 'twentytwentyone-blocks' ) . '
' . esc_html__( 'Cambridge, MA, 02139', 'twentytwentyone-blocks' ) . '

', - ) - ); -} From bc3ece76e317167e4784b3ba6e7bc2badff60f2a Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Wed, 16 Dec 2020 12:22:42 -0500 Subject: [PATCH 2/5] Revert tested up to. --- tt1-blocks/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tt1-blocks/style.css b/tt1-blocks/style.css index 32c72e33..84168c02 100644 --- a/tt1-blocks/style.css +++ b/tt1-blocks/style.css @@ -5,7 +5,7 @@ Author: the WordPress team Author URI: https://wordpress.org/ Description: TT1 Blocks is a block-based version of the default Twenty Twenty-One theme. It's just like Twenty Twenty-One, but it works with the experimental Full-Site Editing & Global Styles features of WordPress. Requires at least: 5.3 -Tested up to: 5.3 +Tested up to: 5.5 Requires PHP: 5.6 Version: 1.0.0 License: GNU General Public License v2 or later From ba186316440442288f0e0d5212dbfd3aa4f739da Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Wed, 16 Dec 2020 12:30:31 -0500 Subject: [PATCH 3/5] Fix missing tt1-blocks replacements. --- tt1-blocks/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tt1-blocks/functions.php b/tt1-blocks/functions.php index 37a96e5a..428c35b0 100644 --- a/tt1-blocks/functions.php +++ b/tt1-blocks/functions.php @@ -204,7 +204,7 @@ function tt1_blocks_setup() { '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', ), @@ -248,11 +248,11 @@ function tt1_blocks_scripts() { * * @return void */ -function twentytwentyone_blocks_block_editor_script() { +function tt1_blocks_block_editor_script() { 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'; From ec24dae50221f1dc0d1446d4492409d5986fabb8 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 17 Dec 2020 09:04:18 +0100 Subject: [PATCH 4/5] Update tt1-blocks/inc/block-patterns.php --- tt1-blocks/inc/block-patterns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tt1-blocks/inc/block-patterns.php b/tt1-blocks/inc/block-patterns.php index dc407ce6..d55c218e 100644 --- a/tt1-blocks/inc/block-patterns.php +++ b/tt1-blocks/inc/block-patterns.php @@ -6,7 +6,7 @@ * @link https://developer.wordpress.org/reference/functions/register_block_pattern_category/ * * @package WordPress - * @subpackage Twenty_Twenty_One + * @subpackage TT1_Blocks * @since 1.0.0 */ From 6fd48af6aacd0fc3f703eae74b6bcd3572db692a Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 17 Dec 2020 09:04:41 +0100 Subject: [PATCH 5/5] Update tt1-blocks/functions.php --- tt1-blocks/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tt1-blocks/functions.php b/tt1-blocks/functions.php index 428c35b0..eb5c00c7 100644 --- a/tt1-blocks/functions.php +++ b/tt1-blocks/functions.php @@ -16,7 +16,7 @@ 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 + * If you're building a theme based on TT1 Blocks, use a find and replace * to change 'tt1-blocks' to the name of your theme in all the template files. */ load_theme_textdomain( 'tt1-blocks', get_template_directory() . '/languages' ); @@ -258,4 +258,4 @@ function tt1_blocks_block_editor_script() { require get_template_directory() . '/inc/block-patterns.php'; // Block Styles. -require get_template_directory() . '/inc/block-styles.php'; \ No newline at end of file +require get_template_directory() . '/inc/block-styles.php';