Skip to content

Commit

Permalink
Release 3.1.0 (#296)
Browse files Browse the repository at this point in the history
* Append version number to zip file name.

- Was: genesis-sample.zip
- Now: genesis-sample.3.0.1.zip

This helps prevent write issues when uploading zips to
my.studiopress.com, and makes it less confusing what version is
being uploaded.

Files will still unzip to a genesis-sample folder.

* Bump lodash from 4.17.11 to 4.17.14 (#279)

* Add footer widgets to onboarding config (#277)

Ensures footer widgets are imported during one-click theme setup.

Dependent on widget import being implemented in Genesis 3.1.
See https://github.com/studiopress/genesis/issues/2141.

Fixes #276.

* Add theme support for genesis-custom-logo (#281)

* Feature/Starter Packs (#283)

- Remove Blocks template
- Update homepage import meta
-- set full width layout
-- hide Title
-- hide Breadcrumbs
- Remove `breadcrumb_front_page` setting filter
- Add missing photo credit in onboarding content
- Add homepage starter packs

* Change/short array syntax (#285)

* Update phpcs config to use short array syntax
* Update files to use PHP short array syntax

Fixes #284

* Feature/tooling circleci (#286)

- Ignore .DS_Store files
- Add circleci
- Bump phpcs testing versions

* Add featured image support for singular posts and pages (#282)

- Adds image size
- Adds config file for post type supports (reflecting how we're handling theme supports)

* Feature/landing page settings (#289)
- Allow alternate layouts on landing page
- Allow breadcrumbs on landing page
- Update landing page import meta

* Ensure a logo width of lower than 100 cannot be saved (#288)

Even though the field has a min attribute of 100, a value of lower
than 100 can still be saved if entered manually rather than using the
input field stepper controls.

This commit adds a custom validation callback to prevent values under
100 from being saved.

Reported by Marcy Diaz in Slack.

Props @dreamwhisper.

* Update child-theme-settings.php (#292)
* Update archive image size and alignment (#295)

Sets the Content Archive image size to `genesis-singular-images` with center alignment. This better fits the theme and is more reliable since we can't guarantee the `thumbnail` size exists (is unset) or is suitable.

* Release/3.1.0 (#294)
* Update screenshot.png (#297)
* Refactor genesis_sample_secondary_menu_args function (#299)
  • Loading branch information
dreamwhisper authored Aug 20, 2019
1 parent 7d62fab commit 063fef9
Show file tree
Hide file tree
Showing 34 changed files with 583 additions and 288 deletions.
22 changes: 22 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2.1
jobs:
standards:
docker:
- image: circleci/php:7.3.3-stretch-node-browsers
steps:
- checkout
- install-dependencies
- run: composer phpcs
- run: npm run lint:css
- run: npm run lint:js
commands:
install-dependencies:
description: "Install development dependencies."
steps:
- run: composer install
- run: npm ci
workflows:
version: 2
check-standards:
jobs:
- standards
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
/composer.lock
/phpcs.xml
node_modules/
Expand Down
12 changes: 7 additions & 5 deletions .scripts/makezip.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const recursive = require("recursive-readdir");
const prettyBytes = require("pretty-bytes");

const excludes = [
".circleci",
".DS_Store",
".editorconfig",
".eslintignore",
Expand All @@ -37,8 +38,11 @@ const excludes = [
];

// Creates a file to stream archive data to.
// Uses the name in package.json, such as 'child-theme.zip'.
let output = fs.createWriteStream(`${process.env.npm_package_name}.zip`);
// Uses the name in package.json, such as 'child-theme.1.1.0.zip'.
let fileName = `${process.env.npm_package_name}.${
process.env.npm_package_theme_version
}.zip`;
let output = fs.createWriteStream(fileName);

let archive = archiver("zip", {
zlib: { level: 9 } // Best compression.
Expand All @@ -52,9 +56,7 @@ const setupZipArchive = function() {
// Report the zip name and size, and rename *.txt files back to *.md again.
output.on("close", function() {
let fileSize = prettyBytes(archive.pointer());
console.log(
chalk`{cyan Created ${process.env.npm_package_name}.zip, ${fileSize}}`
);
console.log(chalk`{cyan Created ${fileName}, ${fileSize}}`);

renameTxtFilesToMarkdown();
});
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Genesis Sample Theme Changelog

## [3.1.0] - 2019-08-21
Requires Genesis 3.1.0+

### Added
* Starter Pack feature to allow imported content choices.
* Customizer Logo width validation and messaging.
* Featured image display options for singular posts and pages.
* Footer widget import with one-click theme setup.

### Changed
* Updated Screenshot to reflect one-click theme setup content.
* Set archive image size to genesis-singular-images on theme activation.
* Allow breadcrumbs and layout settings to be used on the landing page template.
* Use `genesis-custom-logo` functionality in place of `custom-logo`.
* Use PHP short array syntax.
* Update one-click theme setup content page meta to accommodate new Genesis 3.1 features.
* Add version number to zip files generated with `npm run zip`. ([GitHub version](https://github.com/studiopress/genesis-sample/) only.)
* Update the phpcs config to include a PHP short array rule and update PHP and WordPress testing versions. ([GitHub version](https://github.com/studiopress/genesis-sample/) only.)
* Update developer dependencies. ([GitHub version](https://github.com/studiopress/genesis-sample/) only.)
* Simplified `genesis_sample_secondary_menu_args` function.

### Removed
* Block page template in favor of new Genesis per-page settings.

## [3.0.1] - 2019-06-25
* Use current theme name instead of 'genesis-sample' when enqueueing assets. This ensures assets continue to load if the theme is renamed.

Expand Down
40 changes: 20 additions & 20 deletions config/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* @link https://www.studiopress.com/
*/

$genesis_sample_default_colors = array(
$genesis_sample_default_colors = [
'link' => '#0073e5',
'accent' => '#0073e5',
);
];

$genesis_sample_link_color = get_theme_mod(
'genesis_sample_link_color',
Expand All @@ -26,46 +26,46 @@
$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(
return [
'fonts-url' => 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700&display=swap',
'content-width' => 1062,
'button-bg' => $genesis_sample_link_color,
'button-color' => $genesis_sample_link_color_contrast,
'button-outline-hover' => $genesis_sample_link_color_brightness,
'link-color' => $genesis_sample_link_color,
'default-colors' => $genesis_sample_default_colors,
'editor-color-palette' => array(
array(
'editor-color-palette' => [
[
'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' => $genesis_sample_link_color,
),
array(
],
[
'name' => __( 'Accent color', 'genesis-sample' ),
'slug' => 'theme-secondary',
'color' => $genesis_sample_accent_color,
),
),
'editor-font-sizes' => array(
array(
],
],
'editor-font-sizes' => [
[
'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',
),
),
);
],
],
];
12 changes: 6 additions & 6 deletions config/child-theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* @link https://www.studiopress.com/
*/

return array(
GENESIS_SETTINGS_FIELD => array(
return [
GENESIS_SETTINGS_FIELD => [
'blog_cat_num' => 6,
'breadcrumb_home' => 0,
'breadcrumb_front_page' => 0,
Expand All @@ -24,10 +24,10 @@
'content_archive' => 'full',
'content_archive_limit' => 0,
'content_archive_thumbnail' => 0,
'image_size' => '',
'image_alignment' => 'alignleft',
'image_size' => 'genesis-singular-images',
'image_alignment' => 'aligncenter',
'posts_nav' => 'numeric',
'site_layout' => 'content-sidebar',
),
],
'posts_per_page' => 6,
);
];
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @link https://www.studiopress.com/
*/

// Photo by Rohit Tandon on Unsplash: https://unsplash.com/photos/9wg5jCEPBsw.
$genesis_sample_homepage_header_image_url = CHILD_URL . '/config/import/images/mountain-bw.jpg';

// Photo by Haley Powers on Unsplash: https://unsplash.com/photos/rjhvXX7JBPc.
Expand All @@ -26,7 +27,7 @@
<!-- /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>
<div class="wp-block-button is-style-default"><a class="wp-block-button__link has-text-color has-light-gray-color" href="#">Learn More</a></div>
<!-- /wp:button -->
</div></div>
Expand Down
127 changes: 127 additions & 0 deletions config/import/content/home-color.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?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/
*/

// Photo by Rohit Tandon on Unsplash: https://unsplash.com/photos/9wg5jCEPBsw.
$genesis_sample_homepage_header_image_url = CHILD_URL . '/config/import/images/mountain-color.jpg';

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

return <<<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_sample_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</a></div>
<!-- /wp:button -->
</div></div>
<!-- /wp:media-text -->
<!-- wp:atomic-blocks/ab-container {"containerPaddingTop":4.5,"containerWidth":"full","containerBackgroundColor":"#111"} -->
<div style="background-color:#111;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":"#111111","ctaTextColor":"#f5f5f5"} -->
<div style="background-color:#111111;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":"#111"} -->
<div style="background-color:#111;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 ab-block-container alignfull"><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","customTextColor":"#f5f5f5","customFontSize":40} -->
<p style="color:#f5f5f5;font-size:40px;text-align:left" class="has-text-color">Contact us today</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:button {"customTextColor":"#f5f5f5","align":"right","className":"is-style-outline"} -->
<div class="wp-block-button alignright is-style-outline home-contact"><a class="wp-block-button__link has-text-color" href="#" style="color:#f5f5f5">Get in touch</a></div>
<!-- /wp:button --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></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 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_sample_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;
Binary file added config/import/images/home-about-color.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-color.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/thumbnails/home-color.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 063fef9

Please sign in to comment.