Skip to content

Commit 91e41bf

Browse files
committed
first commit
0 parents  commit 91e41bf

File tree

3 files changed

+110
-0
lines changed

3 files changed

+110
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Patterns
2+
3+
New Block Patterns to Gutenberg.
4+
5+
## Patterns
6+
7+
This plugin contains patterns for you to check out, ranging from a simple text pattern to a more complex pattern containing both images and text.
8+
9+
### Intro Paragraph with Two Columns
10+
11+
![intro-paragraph-two-columns](https://user-images.githubusercontent.com/2846578/77936659-38f2b800-7281-11ea-9be8-4e33fe3e1fbd.png)
12+
13+
- Column block
14+
- 80% column with 28px paragraph
15+
- 20% empty column
16+
- Column block
17+
- 50% column with paragraph
18+
- 50% column with paragraph
19+
20+
### An Article Introduction
21+
22+
![article-introduction](https://user-images.githubusercontent.com/2846578/77936648-34c69a80-7281-11ea-8c17-74063118242c.png)
23+
24+
- Centered bold paragraph, 16px, for the category or topic
25+
- Centered h1 for the article title
26+
- Centered paragraph, 48px, for the byline
27+
- Centered paragraph, 28px, for an introductory paragraph
28+
29+
### River Gallery with Text
30+
31+
![river-gallery-with-text](https://user-images.githubusercontent.com/2846578/77939696-8d983200-7285-11ea-8699-ccffed67241c.png)
32+
33+
- Column block
34+
- 33% column with spacer bock, large image, and an image resized to 25%
35+
- 33% column with image resized to 25%, and large image
36+
- 33% column with spacer, h2, and paragraphs

index.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
* Plugin Name: Patterns
4+
* Description: A plugin containing Block Patterns to Gutenberg.
5+
* Version: 1.0
6+
* Author: Mervin Praison
7+
*/
8+
9+
/**
10+
* Register Custom Block Styles
11+
*/
12+
function praison_patterns_register_block_patterns() {
13+
if ( function_exists( 'register_block_pattern' ) ) {
14+
/**
15+
* Register block patterns
16+
*/
17+
register_block_pattern(
18+
'praison-gutenberg-block-patterns/intro-two-columns',
19+
array(
20+
'title' => __( 'Intro paragraph with two columns', 'praison-gutenberg-block-patterns' ),
21+
'content' => "<!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column {\"width\":80} -->\n<div class=\"wp-block-column\" style=\"flex-basis:80%\"><!-- wp:paragraph {\"customFontSize\":28} -->\n<p style=\"font-size:28px\">Driving empathy maps and possibly surprise and delight. Target mobile-first design with the aim to build ROI.</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column -->\n\n<!-- wp:column {\"width\":33.33} -->\n<div class=\"wp-block-column\" style=\"flex-basis:33.33%\"></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns -->\n\n<!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph -->\n<p>Informing innovation and then surprise and delight. Driving custom solutions and possibly think outside the box. Create awareness with a goal to funnel users. Lead relevant and engaging content with the possibility to infiltrate new markets.</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:paragraph -->\n<p>Amplifying innovation with the possibility to target the low hanging fruit. Consider dark social but innovate. Creating a holistic approach in order to be on brand. Leading empathy maps but be CMSable. Repurposing branding.</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns -->",
22+
'categories' => array("columns"),
23+
)
24+
);
25+
26+
register_block_pattern(
27+
'praison-gutenberg-block-patterns/article-start',
28+
array(
29+
'title' => __( 'An article introduction', 'praison-gutenberg-block-patterns' ),
30+
'content' => "<!-- wp:paragraph {\"align\":\"center\",\"customFontSize\":16} -->\n<p style=\"font-size:16px\" class=\"has-text-align-center\"><strong>Essay</strong></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:heading {\"align\":\"center\",\"level\":1} -->\n<h1 class=\"has-text-align-center\">Branding</h1>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"align\":\"center\",\"customFontSize\":48} -->\n<p style=\"font-size:48px\" class=\"has-text-align-center\">by Leon Fritz</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:spacer {\"height\":20} -->\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:paragraph {\"align\":\"center\",\"customFontSize\":28} -->\n<p style=\"font-size:28px\" class=\"has-text-align-center\">Synchronize customer experience with a goal to target the low hanging fruit. Inform growth hacking and above all, surprise and delight. Inform empathy maps yet infiltrate new markets. Amplify analytics with the aim to go viral. Demonstrate transformation mapping to in turn think outside the box.</p>\n<!-- /wp:paragraph -->",
31+
'categories' => array("text"),
32+
)
33+
);
34+
35+
register_block_pattern(
36+
'praison-gutenberg-block-patterns/image-diamond-grid',
37+
array(
38+
'title' => __( 'River gallery with text', 'praison-gutenberg-block-patterns' ),
39+
'content' => "<!-- wp:columns {\"align\":\"wide\"} -->\n<div class=\"wp-block-columns alignwide\"><!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:spacer -->\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:image {\"align\":\"right\",\"sizeSlug\":\"large\"} -->\n<div class=\"wp-block-image\"><figure class=\"alignright size-large\"><img src=\"https://cldup.com/rGZ2j5-WRp.jpg\" alt=\"\"/></figure></div>\n<!-- /wp:image -->\n\n<!-- wp:image {\"align\":\"right\",\"width\":192,\"height\":287,\"sizeSlug\":\"large\"} -->\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img src=\"https://cldup.com/eFVKJ-e7rD.jpg\" alt=\"\" width=\"192\" height=\"287\"/></figure></div>\n<!-- /wp:image --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:image {\"align\":\"left\",\"width\":186,\"height\":247,\"sizeSlug\":\"large\"} -->\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large is-resized\"><img src=\"https://cldup.com/ty2U8b9QUw.jpg\" alt=\"\" width=\"186\" height=\"247\"/></figure></div>\n<!-- /wp:image -->\n\n<!-- wp:image {\"align\":\"left\",\"sizeSlug\":\"large\"} -->\n<div class=\"wp-block-image\"><figure class=\"alignleft size-large\"><img src=\"https://cldup.com/YTEryY32so.jpg\" alt=\"\"/></figure></div>\n<!-- /wp:image --></div>\n<!-- /wp:column -->\n\n<!-- wp:column -->\n<div class=\"wp-block-column\"><!-- wp:spacer {\"height\":245} -->\n<div style=\"height:245px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:heading -->\n<h2>Synergy is key</h2>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Creating branding so that we funnel users. Repurposing brand integration to in turn create a better customer experience. Target above the fold but improve overall outcomes.</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Driving brand ambassadors with a goal to create actionable insights. </p>\n<!-- /wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p><a href=\"#\">Learn More</a></p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns -->",
40+
'categories' => array("columns"),
41+
)
42+
);
43+
}
44+
}
45+
add_action( 'init', 'praison_patterns_register_block_patterns' );

readme.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=== Patterns ===
2+
Contributors: mervinpraison
3+
Donate Link: https://goo.gl/Q4oiBG
4+
Tags: gutenberg, blocks, block, pattern, patterns, block patterns, block pattern, blocks pattern, blocks patterns,
5+
Requires at least: 5.0
6+
Tested up to: 5.5.1
7+
Stable tag: trunk
8+
License: GPLv2 or later
9+
10+
New Block Patterns to Gutenberg.
11+
12+
== Description ==
13+
14+
This plugin contains patterns for you to check out, ranging from a simple text pattern to a more complex pattern containing both images and text.
15+
16+
== Installation ==
17+
18+
= Step 1 =
19+
20+
1. Download the zip file
21+
2. Extract the contents
22+
3. Upload the folder `patterns` to your WP plugin folder `/wp-content/plugins/` directory
23+
4. Go to Plugins > Plugins, and activate the plugin
24+
25+
== ChangeLog ==
26+
27+
= Version 1.0 =
28+
29+
* First release

0 commit comments

Comments
 (0)