Skip to content

Commit

Permalink
Merge pull request #87 from Codeinwp/New-Patterns
Browse files Browse the repository at this point in the history
New patterns
  • Loading branch information
HardeepAsrani authored Dec 8, 2023
2 parents ea20f44 + 5461d14 commit b8e5eaf
Show file tree
Hide file tree
Showing 38 changed files with 2,411 additions and 337 deletions.
24 changes: 17 additions & 7 deletions inc/Block_Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ private function setup_properties() {
'raft/team' => array( 'label' => __( 'Team', 'raft' ) ),
'raft/pricing' => array( 'label' => __( 'Pricing', 'raft' ) ),
'raft/call_to_action' => array( 'label' => __( 'Call to Action', 'raft' ) ),
'raft/singles' => array( 'label' => __( 'Singles', 'raft' ) ),
'raft/post_loops' => array( 'label' => __( 'Post Loops', 'raft' ) ),
'raft/pages' => array( 'label' => __( 'Pages', 'raft' ) ),

/* Visible only in Site Editor */

'raft/singles' => array( 'label' => __( 'Singles', 'raft' ) ),
'raft/archives' => array( 'label' => __( 'Archives', 'raft' ) ),
);

$patterns = array(
Expand Down Expand Up @@ -101,6 +105,7 @@ private function setup_properties() {
'features-centered',
'feature-cards',
'features-background',
'single-feature-button',
'hero-columns',
'hero-boxed',
'title-button',
Expand All @@ -117,15 +122,20 @@ private function setup_properties() {
'loop-rows',
'loop-3',
'call-to-action-image',
'call-to-action-4',
'call-to-action-3',
'text-columns',
'centered-text-background',
'portfolio-columns',
'team-columns',
'team-grid',
'team-rows',
'single-post-2',
'single-post-3',
'single-post-cover',
'homepage-2',
'homepage -3',
'homepage-3',
'about-page',
'contact-page',
'portfolio-page',
'services-page',
'centered-title',
'contact-details',
);

$this->categories = apply_filters( 'raft_block_patterns_categories', $categories );
Expand Down
78 changes: 53 additions & 25 deletions inc/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,45 +120,73 @@ public function strings( $strings = array() ) {
$strings = array(

// Generic patterns.
'hero_title' => __( 'Block Based Themes Made simple', 'raft' ),
'page_title' => __( 'This is a page title', 'raft' ),
'section_title' => __( 'This is section title', 'raft' ),
'subtitle' => __( 'Subtitle', 'raft' ),
'section_description' => __( 'A short section description', 'raft' ),
'paragraph_text' => __( 'This is placeholder text, feel free to replace it with your unique content as it\'s included here just to provide you with a better understanding of how your text will fit in the layout. Explore the various patterns and templates as you create your personalized web experience.', 'raft' ),
'short_text' => __( 'Just some placeholder text', 'raft' ),
'hero_title' => __( 'Block Based Themes Made simple', 'raft' ),
'raft_feature_1' => __( 'Style Variations', 'raft' ),
'raft_feature_2' => __( 'Built-in Patterns', 'raft' ),
'raft_feature_3' => __( 'Powered by Blocks', 'raft' ),
'page_title' => __( 'This is a page title', 'raft' ),
'about_page_title' => __( 'About our Team', 'raft' ),
'services_page_title' => __( 'Explore our Services', 'raft' ),
'section_title' => __( 'This is section title', 'raft' ),
'subtitle' => __( 'Subtitle', 'raft' ),
'section_description' => __( 'A short section description', 'raft' ),
'paragraph_text' => __( 'This is placeholder text, feel free to replace it with your unique content as it\'s included here just to provide you with a better understanding of how your text will fit in the layout. Explore the various patterns and templates as you create your personalized web experience.', 'raft' ),
'short_text' => __( 'Just some placeholder text', 'raft' ),

// Feature patterns.
'feature_section_title' => __( 'Showcase your Features and Services', 'raft' ),
'feature_title' => __( 'This is feature title', 'raft' ),
'feature_description' => __( 'A placeholder description that you can replace with your own content.', 'raft' ),
'button_text' => __( 'Button Text', 'raft' ),
'feature_section_title' => __( 'Showcase your Features and Services', 'raft' ),
'feature_title' => __( 'This is feature title', 'raft' ),
'feature_description' => __( 'A placeholder description that you can replace with your own content.', 'raft' ),
'button_text' => __( 'Button Text', 'raft' ),
'button_text_2' => __( 'Get Started', 'raft' ),

// Team patterns.
'team_section_title' => __( 'Our Team', 'raft' ),
'team_member' => __( 'Team member name', 'raft' ),
'member_role' => __( 'Company role', 'raft' ),
'team_section_title' => __( 'Our Team', 'raft' ),
'team_member' => __( 'Team member name', 'raft' ),
'member_role' => __( 'Company role', 'raft' ),

// Pricing patterns.
'pricing_section_title' => __( 'A pricing section. Join premium!', 'raft' ),
'plan_title' => __( 'Plan title', 'raft' ),
'price' => __( '$19.99', 'raft' ),
'price_feature' => __( 'A pricing feature', 'raft' ),
'pricing_section_title' => __( 'A pricing section. Join premium!', 'raft' ),
'plan_title' => __( 'Plan title', 'raft' ),
'price' => __( '$19.99', 'raft' ),
'price_feature' => __( 'A pricing feature', 'raft' ),

// Contact patterns.
'contact_page_title' => __( 'Get in touch', 'raft' ),
'contact_section_title' => __( 'Contact details', 'raft' ),
'follow' => __( 'Follow us', 'raft' ),
'contact_details' => __( 'Contact detail example', 'raft' ),

// FAQ patterns.
'faq_section_title' => __( 'Frequently Asked Questions', 'raft' ),
'faq_title' => __( 'Just a frequent question', 'raft' ),
'faq_section_title' => __( 'Frequently Asked Questions', 'raft' ),
'faq_title' => __( 'Just a frequent question', 'raft' ),

// Portfolio patterns.
'portfolio_section_title' => __( 'Selected Portfolio', 'raft' ),
'portfolio_title' => __( 'A project title', 'raft' ),
'portfolio_client' => __( 'Client Name', 'raft' ),

// Loops and templates.
'read_more' => __( 'Read more', 'raft' ),
'continue_reading' => __( 'Continue reading', 'raft' ),
'no_posts_found' => __( 'Unfortunately no posts were found', 'raft' ),
'search_results' => __( 'Search results', 'raft' ),
'search_button' => __( 'Search', 'raft' ),
'search_placeholder' => __( 'Search for a keyword...', 'raft' ),
'404' => __( '404', 'raft' ),
'page_not_found' => __( 'Unfortunately the page was not found.', 'raft' ),

// Content Patterns.
'content_title' => __( 'A generic content title', 'raft' ),
'content_subtitle' => __( 'A content subtitle', 'raft' ),
'content_title' => __( 'A generic content title', 'raft' ),
'content_subtitle' => __( 'A content subtitle', 'raft' ),

// Testimonial patterns.
'testimonial' => __( '"...Absolutely one of the best services out there, very professional and easy-going experience, highly recommended..."', 'raft' ),
'testimonial_name' => __( 'Jason Doe', 'raft' ),
'testimonial' => __( '"...Absolutely one of the best services out there, very professional and easy-going experience, highly recommended..."', 'raft' ),
'testimonial_name' => __( 'Jason Doe', 'raft' ),

// CTA patterns.
'cta_title' => __( 'Get started today, get in touch!', 'raft' ),
'cta_title' => __( 'Get started today, get in touch!', 'raft' ),
'raft_cta_title' => __( 'Create your new website today, with Raft!', 'raft' ),
);

return $strings;
Expand Down
32 changes: 32 additions & 0 deletions inc/patterns/about-page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* About Page
*
* @author Themeisle
* @package raft
* @since 1.0.5
*
* slug: about-page
* title: About Page
* categories: raft/pages
* keywords: contact, social
*/

$raft_strings = apply_filters( 'raft_strings', array() );

return array(
'title' => __( 'About Page', 'raft' ),
'categories' => array( 'raft/pages' ),
'content' => '
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|80","bottom":"var:preset|spacing|80","left":"var:preset|spacing|40","right":"var:preset|spacing|40"},"margin":{"top":"0","bottom":"0"}}},"backgroundColor":"raft-bg-alt","layout":{"inherit":true,"type":"constrained"}} -->
<div class="wp-block-group alignfull has-raft-bg-alt-background-color has-background" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--80);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--80);padding-left:var(--wp--preset--spacing--40)">
<!-- wp:heading {"textAlign":"center","level":1,"align":"wide"} -->
<h1 class="wp-block-heading alignwide has-text-align-center">' . esc_html( $raft_strings['about_page_title'] ) . '</h1>
<!-- /wp:heading -->
</div>
<!-- /wp:group -->
<!-- wp:pattern {"slug":"raft/team"} /-->
<!-- wp:pattern {"slug":"raft/centered-text-background"} /-->
<!-- wp:pattern {"slug":"raft/single-feature-button"} /-->
',
);
139 changes: 83 additions & 56 deletions inc/patterns/alternating-feature-columns.php
Original file line number Diff line number Diff line change
@@ -1,83 +1,110 @@
<?php
/**
* Pattern
* Alternating Feature Columns
*
* @author Themeisle
* @package raft
* @since 1.0.5
*
* Hero Section
*
* slug: alternating-feature-columns
* title: Alternating feature columns
* categories: raft
* keywords: hero, section, features, columns
* title: Alternating Feature Columns
* categories: raft/features
* keywords: alternating, feature, columns
*/

$strings = array(
'learn_more' => __( 'Learn More', 'raft' ),
);
$raft_strings = apply_filters( 'raft_strings', array() );

$images = array(
RAFT_URL . 'assets/img/shape-010.svg',
RAFT_URL . 'assets/img/shape-011.svg',
);

return array(
'title' => __( 'Alternating feature columns', 'raft' ),
'title' => __( 'Alternating Feature Columns', 'raft' ),
'categories' => array( 'raft/features' ),
'content' => '
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"0px","bottom":"0px","right":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"}},"layout":{"inherit":false}} -->
<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"><!-- wp:columns {"verticalAlignment":"center","style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-columns are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}}} -->
<div class="wp-block-column is-vertically-aligned-center" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px"><!-- wp:group {"layout":{"inherit":false,"contentSize":"600px","type":"constrained"},"otterConditions":[]} -->
<div class="wp-block-group"><!-- wp:heading -->
<h2>Lorem ipsum</h2>
<!-- /wp:heading -->
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"0px","bottom":"0px","right":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"}},"layout":{"inherit":false}} -->
<div class="wp-block-group alignfull" style="margin-top:0px;margin-bottom:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px">
<!-- wp:columns {"verticalAlignment":"center","style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-columns are-vertically-aligned-center">
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}}} -->
<div class="wp-block-column is-vertically-aligned-center" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px">
<!-- wp:group {"layout":{"inherit":false,"contentSize":"600px","type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:heading -->
<h2 class="wp-block-heading">' . esc_html( $raft_strings['feature_title'] ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>' . esc_html( $raft_strings['paragraph_text'] ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-primary","otterConditions":[]} -->
<div class="wp-block-button is-style-primary"><a class="wp-block-button__link wp-element-button">' . esc_html( $strings['learn_more'] ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group --></div>
<!-- /wp:column -->
<!-- wp:buttons -->
<div class="wp-block-buttons">
<!-- wp:button {"className":"is-style-primary"} -->
<div class="wp-block-button is-style-primary">
<a class="wp-block-button__link wp-element-button">' . esc_html( $raft_strings['button_text'] ) . '</a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}},"backgroundColor":"raft-bg-alt"} -->
<div class="wp-block-column is-vertically-aligned-center has-raft-bg-alt-background-color has-background" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px"><!-- wp:image {"align":"center","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full"><img src="' . esc_url( $images[0] ) . '" alt=""/></figure>
<!-- /wp:image --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}},"backgroundColor":"raft-bg-alt"} -->
<div class="wp-block-column is-vertically-aligned-center has-raft-bg-alt-background-color has-background" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px">
<!-- wp:image {"align":"center","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full">
<img src="' . esc_url( $images[0] ) . '" alt=""/>
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- wp:columns {"verticalAlignment":"center","style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-columns are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}},"backgroundColor":"raft-bg-alt"} -->
<div class="wp-block-column is-vertically-aligned-center has-raft-bg-alt-background-color has-background" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px"><!-- wp:image {"align":"center","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full"><img src="' . esc_url( $images[1] ) . '" alt=""/></figure>
<!-- /wp:image --></div>
<!-- /wp:column -->
<!-- wp:columns {"verticalAlignment":"center","style":{"spacing":{"blockGap":"0px"}}} -->
<div class="wp-block-columns are-vertically-aligned-center">
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}},"backgroundColor":"raft-bg-alt"} -->
<div class="wp-block-column is-vertically-aligned-center has-raft-bg-alt-background-color has-background" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px">
<!-- wp:image {"align":"center","sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image aligncenter size-full">
<img src="' . esc_url( $images[1] ) . '" alt=""/>
</figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}}} -->
<div class="wp-block-column is-vertically-aligned-center" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px"><!-- wp:group {"layout":{"inherit":false,"contentSize":"600px","type":"constrained"},"otterConditions":[]} -->
<div class="wp-block-group"><!-- wp:heading -->
<h2>Lorem ipsum</h2>
<!-- /wp:heading -->
<!-- wp:column {"verticalAlignment":"center","style":{"spacing":{"padding":{"top":"32px","right":"32px","bottom":"32px","left":"32px"}}}} -->
<div class="wp-block-column is-vertically-aligned-center" style="padding-top:32px;padding-right:32px;padding-bottom:32px;padding-left:32px">
<!-- wp:group {"layout":{"inherit":false,"contentSize":"600px","type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:heading -->
<h2 class="wp-block-heading">' . esc_html( $raft_strings['feature_title'] ) . '</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>' . esc_html( $raft_strings['paragraph_text'] ) . '</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"className":"is-style-primary","otterConditions":[]} -->
<div class="wp-block-button is-style-primary"><a class="wp-block-button__link wp-element-button">' . esc_html( $strings['learn_more'] ) . '</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons --></div>
<!-- /wp:group --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></div>
<!-- /wp:group -->',
<!-- wp:buttons -->
<div class="wp-block-buttons">
<!-- wp:button {"className":"is-style-primary"} -->
<div class="wp-block-button is-style-primary">
<a class="wp-block-button__link wp-element-button">' . esc_html( $raft_strings['button_text'] ) . '</a>
</div>
<!-- /wp:button -->
</div>
<!-- /wp:buttons -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
',
);
Loading

0 comments on commit b8e5eaf

Please sign in to comment.