Skip to content

Commit

Permalink
Merge pull request #179 from studiopress/release/2.8.0
Browse files Browse the repository at this point in the history
Genesis Sample 2.8.0
  • Loading branch information
nickcernis authored Jan 15, 2019
2 parents e668355 + 85a70d2 commit 3755f6e
Show file tree
Hide file tree
Showing 24 changed files with 575 additions and 169 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# Genesis Sample Theme Changelog

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

* New: Block-based homepage layout.
* New: Auto homepage setup upon theme activation using the new onboarding feature from Genesis 2.8.0. (See `config/onboarding.php`.)
* New: “Blocks” page template for use with the block editor. The template removes the title and breadcrumbs, and forces a full-width layout.
* New: Load configuration with the new `genesis_get_config()` function from Genesis 2.8.0. (See `functions.php` and the `config/` folder.)
* New: Add `has-no-blocks` body class if singular post/page contains no blocks.
* New: Add `first-block-[block-name]` body class. Helps remove top padding when blocks such as the Cover block are first on the page.
* New: Add `first-block-align-[alignment]` body class. Helps adjust styles if the first block is full-width.
* Update: Styling adjustments for buttons, content width, and column blocks.
* Update: Prevent 'admin' user being created during manual XML demo content import.
* Update: Remove editor font sizes shortname from Gutenberg font sizes config. (The shortname is no longer used in WordPress.)
* Tools: Improve `npm run zip` command to create archives that unzip to a 'genesis-sample' folder on Windows.

## [2.7.1] - 2018-12-20
* Fix: Reinstate normalize.css and update to version 8.0.1.
* Fix: Reinstate Genesis Column Classes in main stylesheet.
* Fix: Reinstate Genesis Column Classes.
* Fix: Stop background hover color appearing for mobile menu-highlight button.

## [2.7.0] - 2018-12-12
Expand Down Expand Up @@ -63,6 +78,7 @@
* Set localization.
* Update XML file.

[2.8.0]: https://github.com/copyblogger/genesis-sample/compare/2.7.1...2.8.0
[2.7.1]: https://github.com/copyblogger/genesis-sample/compare/2.7.0...2.7.1
[2.7.0]: https://github.com/copyblogger/genesis-sample/compare/2.6.0...2.7.0
[2.6.0]: https://github.com/copyblogger/genesis-sample/compare/2.3.0...2.6.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ You can then type any of these commands:
3. Bump version numbers manually and commit those changes.
4. Type `npm run zip` to create `genesis-sample.zip`. Files marked export-ignore in `.gitattributes` are excluded from the zip.

The `zip` command is an alias for `git archive -o genesis-sample.zip HEAD`.
The `zip` command is an alias for `git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD`.
19 changes: 19 additions & 0 deletions config/accessibility.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Genesis Accessibility features to support.
*/
return array(
'404-page',
'drop-down-menu',
'headings',
'search-form',
'skip-links',
);
18 changes: 18 additions & 0 deletions config/custom-logo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Custom Logo configuration.
*/
return array(
'height' => 120,
'width' => 700,
'flex-height' => true,
'flex-width' => true,
);
29 changes: 29 additions & 0 deletions config/editor-color-palette.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Editor color palette config.
*/
return array(
array(
'name' => __( 'Light gray', 'genesis-sample' ),
'slug' => 'light-gray',
'color' => '#f5f5f5',
),
array(
'name' => __( 'Medium gray', 'genesis-sample' ),
'slug' => 'medium-gray',
'color' => '#999',
),
array(
'name' => __( 'Dark gray', 'genesis-sample' ),
'slug' => 'dark-gray',
'color' => '#333',
),
);
34 changes: 34 additions & 0 deletions config/editor-font-sizes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Editor font sizes config.
*/
return array(
array(
'name' => __( 'Small', 'genesis-sample' ),
'size' => 12,
'slug' => 'small',
),
array(
'name' => __( 'Normal', 'genesis-sample' ),
'size' => 16,
'slug' => 'normal',
),
array(
'name' => __( 'Large', 'genesis-sample' ),
'size' => 20,
'slug' => 'large',
),
array(
'name' => __( 'Larger', 'genesis-sample' ),
'size' => 24,
'slug' => 'larger',
),
);
19 changes: 19 additions & 0 deletions config/html5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Elements to output as html5.
*/
return array(
'caption',
'comment-form',
'comment-list',
'gallery',
'search-form',
);
136 changes: 136 additions & 0 deletions config/import/content/homepage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?php
/**
* Genesis Sample.
*
* Homepage content optionally installed after theme activation.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

$genesis_homepage_header_image_url = CHILD_URL . '/config/import/images/mountain-bw.jpg';

// Photo by Haley Powers on Unsplash: https://unsplash.com/photos/rjhvXX7JBPc
$genesis_homepage_faq_image_url = CHILD_URL . '/config/import/images/about.jpg';

$genesis_sample_homepage_content = <<<CONTENT
<!-- wp:media-text {"align":"full","mediaId":1477,"mediaType":"image","isStackedOnMobile":true} -->
<div class="wp-block-media-text alignfull is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="$genesis_homepage_header_image_url" alt="" class="wp-image-1477"/></figure><div class="wp-block-media-text__content"><!-- wp:heading {"level":1} -->
<h1>We'll teach you how to build and grow an online business.</h1>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>All the resources, training, and support you need to run your dream online business! </p>
<!-- /wp:paragraph -->
<!-- wp:button {"textColor":"light-gray","className":"is-style-default"} -->
<div class="wp-block-button is-style-default"><a class="wp-block-button__link has-text-color has-light-gray-color" href="#">Learn More<br></a></div>
<!-- /wp:button -->
</div></div>
<!-- /wp:media-text -->
<!-- wp:atomic-blocks/ab-container {"containerPaddingTop":4.5,"containerWidth":"full","containerBackgroundColor":"#333"} -->
<div style="background-color:#333;padding-left:0%;padding-right:0%;padding-bottom:0%;padding-top:4.5%;margin-top:0%;margin-bottom:0%" class="wp-block-atomic-blocks-ab-container alignfull ab-block-container"><div class="ab-container-inside"><div class="ab-container-content" style="max-width:1600px"><!-- wp:atomic-blocks/ab-cta {"buttonText":"Get Started Today","buttonBackgroundColor":"#0072e5","ctaBackgroundColor":"#333333","ctaTextColor":"#f5f5f5"} -->
<div style="background-color:#333333;text-align:center" class="wp-block-atomic-blocks-ab-cta ab-block-cta"><div class="ab-cta-content"><h2 class="ab-cta-title ab-font-size-32" style="color:#f5f5f5">Ready to take your next step?</h2><div class="ab-cta-text ab-font-size-32" style="color:#f5f5f5"><p>Grow your audience and build a profitable online business.</p></div></div><div class="ab-cta-button"><a href="#" target="_self" class="ab-button ab-button-shape-rounded ab-button-size-medium" style="color:#ffffff;background-color:#0072e5">Get Started Today</a></div></div>
<!-- /wp:atomic-blocks/ab-cta -->
</div></div></div>
<!-- /wp:atomic-blocks/ab-container -->
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":60} -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:60px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->
<!-- wp:heading {"align":"center"} -->
<h2 style="text-align:center">What people are saying</h2>
<!-- /wp:heading -->
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":25} -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:25px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->
<!-- wp:columns {"columns":3,"align":"wide"} -->
<div class="wp-block-columns alignwide has-3-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:atomic-blocks/ab-testimonial -->
<div style="background-color:#f2f2f2;color:#32373c" class="wp-block-atomic-blocks-ab-testimonial left-aligned ab-font-size-18 ab-block-testimonial"><div class="ab-testimonial-text"><p>Your course helped me to grow my email list from 500 to over 10,000 subscribers—all within 3 months! </p></div><div class="ab-testimonial-info"><h2 class="ab-testimonial-name" style="color:#32373c">Jane</h2><small class="ab-testimonial-title" style="color:#32373c">Food Blogger</small></div></div>
<!-- /wp:atomic-blocks/ab-testimonial --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:atomic-blocks/ab-testimonial -->
<div style="background-color:#f2f2f2;color:#32373c" class="wp-block-atomic-blocks-ab-testimonial left-aligned ab-font-size-18 ab-block-testimonial"><div class="ab-testimonial-text"><p>I started using your email marketing technique and it helped me to make $5,000 more a month without any extra work! </p></div><div class="ab-testimonial-info"><h2 class="ab-testimonial-name" style="color:#32373c">Rob</h2><small class="ab-testimonial-title" style="color:#32373c">Copywriter</small></div></div>
<!-- /wp:atomic-blocks/ab-testimonial --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:atomic-blocks/ab-testimonial -->
<div style="background-color:#f2f2f2;color:#32373c" class="wp-block-atomic-blocks-ab-testimonial left-aligned ab-font-size-18 ab-block-testimonial"><div class="ab-testimonial-text"><p>I was skeptical but I found that your system had multiplied my revenue by 40% after just the first quarter! </p></div><div class="ab-testimonial-info"><h2 class="ab-testimonial-name" style="color:#32373c">Susan</h2><small class="ab-testimonial-title" style="color:#32373c">Entrepreneur</small></div></div>
<!-- /wp:atomic-blocks/ab-testimonial --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:atomic-blocks/ab-spacer -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:30px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->
<!-- wp:atomic-blocks/ab-container {"containerPaddingTop":12,"containerPaddingRight":5,"containerPaddingBottom":2.5,"containerPaddingLeft":5,"containerMarginTop":6,"containerMarginBottom":5,"containerWidth":"full","containerMaxWidth":1062,"containerBackgroundColor":"#333"} -->
<div style="background-color:#333;padding-left:5%;padding-right:5%;padding-bottom:2.5%;padding-top:12%;margin-top:6%;margin-bottom:5%" class="wp-block-atomic-blocks-ab-container alignfull ab-block-container"><div class="ab-container-inside"><div class="ab-container-content" style="max-width:1062px"><!-- wp:columns -->
<div class="wp-block-columns has-2-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph {"align":"left","textColor":"light-gray","customFontSize":40} -->
<p style="font-size:40px;text-align:left" class="has-text-color has-light-gray-color">Contact us today</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:button {"align":"right","className":"is-style-outline"} -->
<div class="wp-block-button alignright is-style-outline"><a class="wp-block-button__link" href="/contact">Get in touch</a></div>
<!-- /wp:button -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph --></div></div></div>
<!-- /wp:atomic-blocks/ab-container -->
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":60} -->
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:60px"/></div>
<!-- /wp:atomic-blocks/ab-spacer -->
<!-- wp:columns {"align":"wide"} -->
<div class="wp-block-columns alignwide has-2-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:atomic-blocks/ab-accordion {"accordionOpen":true} -->
<div class="wp-block-atomic-blocks-ab-accordion ab-block-accordion ab-font-size-18"><details open><summary class="ab-accordion-title">Can I phone or email you?</summary><div class="ab-accordion-text"><!-- wp:paragraph -->
<p>You can reach us on our <a href="/contact">contact page</a> or by calling us at 1.123.456.7891</p>
<!-- /wp:paragraph --></div></details></div>
<!-- /wp:atomic-blocks/ab-accordion -->
<!-- wp:atomic-blocks/ab-accordion -->
<div class="wp-block-atomic-blocks-ab-accordion ab-block-accordion ab-font-size-18"><details><summary class="ab-accordion-title">How long have you been in business?</summary><div class="ab-accordion-text"><!-- wp:paragraph -->
<p>Our team has a combined experience of over 60 years.</p>
<!-- /wp:paragraph --></div></details></div>
<!-- /wp:atomic-blocks/ab-accordion -->
<!-- wp:atomic-blocks/ab-accordion -->
<div class="wp-block-atomic-blocks-ab-accordion ab-block-accordion ab-font-size-18"><details><summary class="ab-accordion-title">What is your return policy?</summary><div class="ab-accordion-text"><!-- wp:paragraph -->
<p>We offer a 30-day return policy for all unused items. For more information, please view our terms of service.</p>
<!-- /wp:paragraph --></div></details></div>
<!-- /wp:atomic-blocks/ab-accordion --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":308} -->
<figure class="wp-block-image"><img src="$genesis_homepage_faq_image_url" alt="" class="wp-image-308"/><figcaption>Photo by&nbsp;<a href="https://unsplash.com/photos/rjhvXX7JBPc">Haley Powers</a>&nbsp;on&nbsp;<a href="https://unsplash.com/">Unsplash</a></figcaption></figure>
<!-- /wp:image --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
CONTENT;

return $genesis_sample_homepage_content;
Binary file added config/import/images/about.jpg
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 config/import/images/mountain-bw.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions config/menus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Genesis Sample child theme.
*
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://my.studiopress.com/themes/genesis-sample/
*/

/**
* Supported Genesis navigation menus.
*/
return array(
'primary' => __( 'Header Menu', 'genesis-sample' ),
'secondary' => __( 'Footer Menu', 'genesis-sample' ),
);
34 changes: 34 additions & 0 deletions config/onboarding.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* Genesis Sample.
*
* Onboarding config to load plugins and homepage content on theme activation.
*
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
*/

return array(
'dependencies' => array(
'plugins' => array(
array(
'name' => __( 'Atomic Blocks', 'genesis-sample' ),
'slug' => 'atomic-blocks/atomicblocks.php',
),
),
),
'content' => array(
'homepage' => array(
'post_title' => 'Homepage',
'post_name' => 'homepage-gutenberg',
'post_content' => require dirname( __FILE__ ) . '/import/content/homepage.php',
'post_type' => 'page',
'post_status' => 'publish',
'page_template' => 'template-blocks.php',
'comment_status' => 'closed',
'ping_status' => 'closed',
),
),
);
Loading

0 comments on commit 3755f6e

Please sign in to comment.