Skip to content

Commit

Permalink
Add additional pages and menus to One-click Theme Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamwhisper committed Mar 7, 2019
1 parent c5f9b6b commit b688ac6
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 6 deletions.
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;
110 changes: 110 additions & 0 deletions config/import/content/block-examples.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?php
/**
* Genesis Sample.
*
* Block example 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/
*/

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:heading {"level":1} -->
<h1>Block Content Examples</h1>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Below are examples of column classes that are available in the block editor.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"align":"left"} -->
<h2 style="text-align:left">Two Columns</h2>
<!-- /wp:heading -->
<!-- wp:columns -->
<div class="wp-block-columns has-2-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind. </p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind. </p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->
<!-- wp:heading {"align":"left"} -->
<h2 style="text-align:left">Three Columns</h2>
<!-- /wp:heading -->
<!-- wp:columns {"columns":3} -->
<div class="wp-block-columns has-3-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column"><!-- wp:paragraph -->
<p>
This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to share with your readers what exactly is on your mind.
</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->
<!-- wp:heading {"align":"left"} -->
<h2 style="text-align:left">Buttons</h2>
<!-- /wp:heading -->
<!-- wp:button {"align":"center"} -->
<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="#">Button<br></a></div>
<!-- /wp:button -->
<!-- wp:button {"align":"center","className":"is-style-outline"} -->
<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="#">Outlined Button<br></a></div>
<!-- /wp:button -->
<!-- wp:separator {"className":"is-style-wide"} -->
<hr class="wp-block-separator is-style-wide"/>
<!-- /wp:separator -->
<!-- wp:heading {"align":"left"} -->
<h2 style="text-align:left">Blockquotes &amp; Pullquotes</h2>
<!-- /wp:heading -->
<!-- wp:pullquote {"align":"wide"} -->
<figure class="wp-block-pullquote alignwide"><blockquote><p>Good design is as little as possible. Less, but better, because it concentrates on the essential aspects. Back to purity, back to simplicity. </p><cite> <br>Dieter Rams</cite></blockquote></figure>
<!-- /wp:pullquote -->
CONTENT;
19 changes: 19 additions & 0 deletions config/import/content/contact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Genesis Sample.
*
* Contact 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/
*/

return <<<CONTENT
<!-- wp:paragraph -->
<p>Add a contact form to this page with the pre-installed WPForms Lite plugin. Learn <a href="https://my.studiopress.com/documentation/wpforms/plugin-usage/create-contact-forms-with-wpforms/" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">how to create a form using WPForms</a>.</p>
<!-- /wp:paragraph -->
CONTENT;
6 changes: 2 additions & 4 deletions config/import/content/homepage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
$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_homepage_faq_image_url = CHILD_URL . '/config/import/images/home-about.jpg';

$genesis_sample_homepage_content = <<<CONTENT
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_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>
Expand Down Expand Up @@ -132,5 +132,3 @@
<!-- /wp:column --></div>
<!-- /wp:columns -->
CONTENT;

return $genesis_sample_homepage_content;
54 changes: 54 additions & 0 deletions config/import/content/landing-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
/**
* Genesis sample.
*
* Landing 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 Felipe Dolce on Unsplash.
$genesis_sample_landing_image_url = CHILD_URL . '/config/import/images/landing.jpg';

return <<<CONTENT
<!-- wp:image {"id":1377} -->
<figure class="wp-block-image"><img src="$genesis_sample_landing_image_url" alt="Paris" class="wp-image-1377"/><figcaption> Photo by <a href="https://unsplash.com/photos/Pi3YUQivm6o" target="_blank" rel="noreferrer noopener" aria-label=" (opens in a new tab)">Felipe Dolce</a> on <a href="https://unsplash.com/">Unsplash</a> </figcaption></figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind.</p>
<!-- /wp:paragraph -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>“There are only two places in the world where we can live happy: at home and in Paris.”<br></p><cite>— Ernest Hemingway</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind.</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":4} -->
<h4>This is a Sample Heading</h4>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Here’s a sample paragraph with a custom background color:</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"customBackgroundColor":"#f5f5f5"} -->
<p style="background-color:#f5f5f5" class="has-background">This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind. This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind.</p>
<!-- /wp:paragraph -->
CONTENT;
Binary file modified 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/home-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/landing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 56 additions & 2 deletions config/onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

return array(
'dependencies' => array(
'dependencies' => array(
'plugins' => array(
array(
'name' => __( 'Atomic Blocks', 'genesis-sample' ),
Expand All @@ -34,7 +34,7 @@
),
),
),
'content' => array(
'content' => array(
'homepage' => array(
'post_title' => 'Homepage',
'post_name' => 'homepage-gutenberg',
Expand All @@ -45,5 +45,59 @@
'comment_status' => 'closed',
'ping_status' => 'closed',
),
'blocks' => array(
'post_title' => 'Block Content Examples',
'post_content' => require dirname( __FILE__ ) . '/import/content/block-examples.php',
'post_type' => 'page',
'post_status' => 'publish',
'page_template' => 'page-templates/blocks.php',
'comment_status' => 'closed',
'ping_status' => 'closed',
),
'about' => array(
'post_title' => 'About Us',
'post_content' => require dirname( __FILE__ ) . '/import/content/about.php',
'post_type' => 'page',
'post_status' => 'publish',
'page_template' => 'page-templates/blocks.php',
'comment_status' => 'closed',
'ping_status' => 'closed',
),
'contact' => array(
'post_title' => 'Contact Us',
'post_content' => require dirname( __FILE__ ) . '/import/content/contact.php',
'post_type' => 'page',
'post_status' => 'publish',
'comment_status' => 'closed',
'ping_status' => 'closed',
),
'landing' => array(
'post_title' => 'Landing Page',
'post_content' => require dirname( __FILE__ ) . '/import/content/landing-page.php',
'post_type' => 'page',
'post_status' => 'publish',
'page_template' => 'page-templates/landing.php',
'comment_status' => 'closed',
'ping_status' => 'closed',
),
),
'navigation_menus' => array(
'primary' => array(
'homepage' => array(
'title' => 'Home',
),
'about' => array(
'title' => 'About Us',
),
'contact' => array(
'title' => 'Contact Us',
),
'blocks' => array(
'title' => 'Block Examples',
),
'landing' => array(
'title' => 'Landing Page',
),
),
),
);

0 comments on commit b688ac6

Please sign in to comment.