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

Genesis Sample 2.9.0 #206

Merged
merged 52 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
868ff6f
Merge release 2.8.0 into develop branch (#180)
nickcernis Jan 15, 2019
71e85dd
Set up 2.8.1 dev cycle
nickcernis Jan 15, 2019
a4fe4a8
Setup 2.9.0 development cycle
dreamwhisper Mar 7, 2019
89c2fbf
Extract default child theme settings into config files for Genesis 2.9
dreamwhisper Mar 7, 2019
b169239
Remove basepath from phpcs config
dreamwhisper Mar 7, 2019
41c7930
Remove '/contact' links from homepage onboarding content
dreamwhisper Mar 7, 2019
13e1d63
Move templates to page-templates folder & rename
dreamwhisper Mar 7, 2019
83c7ff7
Better function name for landing page body class
dreamwhisper Mar 7, 2019
2b71b17
Fix Outlined button color
dreamwhisper Mar 7, 2019
21d4fe9
Fix latest post block padding
dreamwhisper Mar 7, 2019
5df206f
Ensure wide-aligned cover block is proper width
dreamwhisper Mar 7, 2019
f5d415d
Fix right and left-aligned pullquote margin
dreamwhisper Mar 7, 2019
d8fa64a
Allow block styling to extend outside `.entry-content`
dreamwhisper Mar 7, 2019
057ca84
Match pullquotes to other right/left-aligned elements
dreamwhisper Mar 7, 2019
9b60661
Organize in alpha order
dreamwhisper Mar 7, 2019
48fe379
Change focus/hover order
dreamwhisper Mar 8, 2019
49790a8
Add additional plugins to onboarding config
dreamwhisper Mar 7, 2019
84846f0
Add additional pages and menus to One-click Theme Setup
dreamwhisper Mar 7, 2019
7d9cd15
Add Atomic Blocks URL, adjust spacing
nickcernis Mar 8, 2019
36042fa
Remove post_name key and value
nickcernis Mar 8, 2019
2fd7920
Add Customizer colors to block editor palette
nickcernis Mar 8, 2019
ccb4173
Add featured image example to about page
dreamwhisper Mar 10, 2019
3268cb6
Fix missing comma
dreamwhisper Mar 10, 2019
e8bb966
Add WPForms styles
dreamwhisper Mar 8, 2019
ee7a71b
Update custom colors to use consistent slugs between themes
nickcernis Mar 11, 2019
64fa4bc
Reduce block editor config to single file, add inline styles logic
nickcernis Mar 12, 2019
3b65ea7
Remove font sizes now supplied by inline CSS
nickcernis Mar 12, 2019
eeae74d
Adjust normal font size to reflect default body size
nickcernis Mar 12, 2019
ef92278
Remove color palette CSS
nickcernis Mar 13, 2019
987aacc
Fix since versions
nickcernis Mar 13, 2019
1086ca5
Adjust button styling to account for new inline button styles
nickcernis Mar 13, 2019
8bd023d
Drop gray colors
nickcernis Mar 13, 2019
18fb5e2
Update container block to use inline text and button colors
nickcernis Mar 13, 2019
36e9292
Merge branch 'develop' into feature/inline-block-editor-styles
nickcernis Mar 13, 2019
2a9038e
Pull colors from config file instead of theme support
nickcernis Mar 13, 2019
17ca205
Fix editor link hover
dreamwhisper Mar 14, 2019
111b8aa
Fix editor (admin) outlined button default color
dreamwhisper Mar 14, 2019
6c2d56f
Merge pull request #198 from studiopress/feature/inline-block-editor-…
nickcernis Mar 14, 2019
63c7c24
Remove XML in favor of one-click theme setup
dreamwhisper Mar 14, 2019
77700e5
Fix phpcs standards
nickcernis Mar 14, 2019
44ff97c
Bump version to 2.9.0
nickcernis Mar 14, 2019
f581a09
Get child theme version from the stylesheet header
nickcernis Mar 14, 2019
dc0b55c
Drop child theme URL constant
nickcernis Mar 14, 2019
53f1233
Drop deprecated CHILD_THEME_NAME constant and use CHILD_THEME_HANDLE
nickcernis Mar 14, 2019
5fa9627
Update package lock file
nickcernis Mar 14, 2019
2d554dd
Update changelog for the 2.9.0 release
nickcernis Mar 14, 2019
8829e1c
Update language file
nickcernis Mar 14, 2019
a0c707b
Changelog clarifications
nickcernis Mar 14, 2019
6740866
Add script to rename Markdown files to txt files when zipping
nickcernis Mar 14, 2019
305345b
Update package lock
nickcernis Mar 14, 2019
dc392cd
Add new theme tags for edtitor-style, block-styles, wide-blocks
dreamwhisper Mar 14, 2019
ed70b97
Fix conflicts
nickcernis Mar 14, 2019
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
31 changes: 31 additions & 0 deletions .scripts/md-to-txt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env node

// This script renames the Markdown files in the generated zip file to use a
// .txt extension. This is useful to adhere to WordPress theme standards and
// to reduce support requests asking what an `.md` file is.

const chalk = require('chalk');
const admzip = require('adm-zip');

console.log(chalk`{cyan Renaming .md files to .txt files inside the zip}...`);

// Create a zip object to manipulate the existing zip file.
const zip = new admzip(`${process.env.npm_package_name}.zip`);
const newZip = new admzip(`${process.env.npm_package_name}.zip`);
const zipEntries = zip.getEntries();
const themeSlug = process.env.npm_package_name;

for (let entry of zipEntries) {
if (entry.entryName === `${themeSlug}/README.md`) {
newZip.addFile(`${themeSlug}/README.txt`, zip.readAsText(entry.entryName));
newZip.deleteFile(entry.entryName);
}
if (entry.entryName === `${themeSlug}/CHANGELOG.md`) {
newZip.addFile(`${themeSlug}/CHANGELOG.txt`, zip.readAsText(entry.entryName));
newZip.deleteFile(entry.entryName);
}
}

newZip.writeZip(); // Overwrites existing zip.

console.log(chalk`{cyan Done renaming .md files to .txt. Please test the new zip file}...`);
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Genesis Sample Theme Changelog

## [2.9.0] - 2019-03-14
Requires Genesis 2.9.0+.

* Added: Additional pages are created during One-Click Theme Setup.
* Added: A menu is set up during One-Click Theme Setup.
* Added: Install and activate WPForms Lite, Genesis eNews Extended, and Simple Social Icons during One-Click Theme Setup.
* Changed: Added Customizer colors to the Block Editor color palette.
* Changed: Use `theme-primary` and `theme-secondary` slugs for Block Editor color palette to prevent possible loss of styling when switching themes. We are now using this convention for new StudioPress theme releases and updates and encourage theme developers to do the same.
* Changed: Removed gray colors from the Block Editor color palette.
* Changed: Generate inline styles for the Block Editor from theme supports, reducing manual Block Editor CSS required. See `lib/gutenberg/inline-styles.php` and https://github.com/studiopress/genesis-sample/pull/198.
* Changed: The default button block color is now blue and not gray.
* Changed: Combined all Block Editor config into a single file at `config/block-editor-settings.php`.
* Changed: Removed the XML sample content file. You can import sample content via One-Click Theme Setup by visiting `/wp-admin/admin.php?page=genesis-getting-started` instead.
* Changed: CSS adjustments including button, blockquote, latest posts block, and WPForms styling.
* Changed: improvements to CSS and PHP coding standards.

## [2.8.0] - 2019-01-16
Requires Genesis 2.8.0+.

Expand Down
1 change: 1 addition & 0 deletions config/accessibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Genesis Sample child theme.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
Expand Down
56 changes: 56 additions & 0 deletions config/block-editor-settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
/**
* Block Editor settings specific to Genesis Sample.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

$genesis_sample_link_color = get_theme_mod( 'genesis_sample_link_color', genesis_sample_customizer_get_default_link_color() );
$genesis_sample_link_color_contrast = genesis_sample_color_contrast( $genesis_sample_link_color );
$genesis_sample_link_color_brightness = genesis_sample_color_brightness( $genesis_sample_link_color, 35 );

return array(
'admin-fonts-url' => 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700',
'content-width' => 1062,
'default-button-bg' => $genesis_sample_link_color,
'default-button-color' => $genesis_sample_link_color_contrast,
'default-button-outline-hover' => $genesis_sample_link_color_brightness,
'default-link-color' => $genesis_sample_link_color,
'editor-color-palette' => array(
array(
'name' => __( 'Custom color', 'genesis-sample' ), // Called “Link Color” in the Customizer options. Renamed because “Link Color” implies it can only be used for links.
'slug' => 'theme-primary',
'color' => get_theme_mod( 'genesis_sample_link_color', genesis_sample_customizer_get_default_link_color() ),
),
array(
'name' => __( 'Accent color', 'genesis-sample' ),
'slug' => 'theme-secondary',
'color' => get_theme_mod( 'genesis_sample_accent_color', genesis_sample_customizer_get_default_accent_color() ),
),
),
'editor-font-sizes' => array(
array(
'name' => __( 'Small', 'genesis-sample' ),
'size' => 12,
'slug' => 'small',
),
array(
'name' => __( 'Normal', 'genesis-sample' ),
'size' => 18,
'slug' => 'normal',
),
array(
'name' => __( 'Large', 'genesis-sample' ),
'size' => 20,
'slug' => 'large',
),
array(
'name' => __( 'Larger', 'genesis-sample' ),
'size' => 24,
'slug' => 'larger',
),
),
);
32 changes: 32 additions & 0 deletions config/child-theme-settings-genesis.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Genesis Sample settings specific to Genesis.
*
* Used in `config/child-theme-settings.php` and `lib/theme-defaults.php`.
*
* Can be removed when the Genesis Theme Settings page is removed from WP admin.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

return array(
'blog_cat_num' => 6,
'breadcrumb_home' => 0,
'breadcrumb_front_page' => 0,
'breadcrumb_posts_page' => 0,
'breadcrumb_single' => 0,
'breadcrumb_page' => 0,
'breadcrumb_archive' => 0,
'breadcrumb_404' => 0,
'breadcrumb_attachment' => 0,
'content_archive' => 'full',
'content_archive_limit' => 0,
'content_archive_thumbnail' => 0,
'image_size' => '',
'image_alignment' => 'alignleft',
'posts_nav' => 'numeric',
'site_layout' => 'content-sidebar',
);
16 changes: 16 additions & 0 deletions config/child-theme-settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Genesis Sample theme settings.
*
* Genesis 2.9+ updates these settings when themes are activated.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

return array(
GENESIS_SETTINGS_FIELD => genesis_get_config( 'child-theme-settings-genesis' ),
'posts_per_page' => 6,
);
1 change: 1 addition & 0 deletions config/custom-logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Genesis Sample child theme.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
Expand Down
29 changes: 0 additions & 29 deletions config/editor-color-palette.php

This file was deleted.

34 changes: 0 additions & 34 deletions config/editor-font-sizes.php

This file was deleted.

1 change: 1 addition & 0 deletions config/html5.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Genesis Sample child theme.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
Expand Down
59 changes: 59 additions & 0 deletions config/import/content/about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
/**
* Genesis Sample.
*
* About page content optionally installed after theme activation.
*
* Visit `/wp-admin/admin.php?page=genesis-getting-started` to trigger import.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

// Photo by Fabrice Villard on Unsplash.
$genesis_sample_about_image_url = CHILD_URL . '/config/import/images/about.jpg';

return <<<CONTENT
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":70} -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:70px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->

<!-- wp:image {"id":2141,"align":"center"} -->
<div class="wp-block-image"><figure class="aligncenter"><img src="$genesis_sample_about_image_url" alt="" class="wp-image-2141"/></figure></div>
<!-- /wp:image -->

<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":29} -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:29px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->

<!-- wp:columns -->
<div class="wp-block-columns has-2-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"level":1} -->
<h1>About Us</h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hello! We are StudioPress, and we build themes with an emphasis on typography, white space, and mobile-optimized design to make your website look absolutely breathtaking. </p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"align":"right"} -->
<h2 style="text-align:right" id="mce_9">Contact Us</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"right"} -->
<p style="text-align:right"> 555.555.5555</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"right"} -->
<p style="text-align:right">
1234 Block Blvd.<br>San Francisco, CA 94120

</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
CONTENT;
Loading