-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLANET-6638: Issues block pattern #811
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
/** | ||
* Issues class. | ||
* | ||
* @package P4GBKS | ||
* @since 0.1 | ||
*/ | ||
|
||
namespace P4GBKS\Patterns; | ||
|
||
/** | ||
* Issues pattern includes: | ||
* Column, Image, Heading, Paragraph, Media & Text. | ||
* | ||
* @package P4GBKS\Patterns | ||
*/ | ||
class Issues extends Block_Pattern { | ||
|
||
/** | ||
* Returns the pattern name. | ||
*/ | ||
public static function get_name(): string { | ||
return 'p4/issues'; | ||
} | ||
|
||
/** | ||
* Returns the template for one media-text. | ||
*/ | ||
public static function get_media_text_template(): string { | ||
|
||
return ' | ||
<!-- wp:media-text {"mediaWidth":15,"mediaSizeSlug":"thumbnail","isStackedOnMobile":false,"verticalAlignment":"center","imageFill":false,"backgroundColor":"white","className":"is-style-large-padding"} --> | ||
<div class="wp-block-media-text alignwide is-vertically-aligned-center has-white-background-color is-style-large-padding has-background" style="grid-template-columns:15% auto"> | ||
<figure class="wp-block-media-text__media"></figure> | ||
<div class="wp-block-media-text__content"> | ||
<!-- wp:paragraph {"align":"left","placeholder":"' . __( 'Enter text', 'planet4-blocks-backend' ) . '","style":{"typography":{"fontSize":"1rem","fontStyle":"normal","fontWeight":"700"}},"className":"is-style-roboto-font-family"} --> | ||
<p class="has-text-align-left is-style-roboto-font-family" style="font-size:1rem;font-style:normal;font-weight:700"></p> | ||
<!-- /wp:paragraph --></div></div> | ||
<!-- /wp:media-text --> | ||
'; | ||
} | ||
|
||
/** | ||
* Returns the pattern config. | ||
*/ | ||
public static function get_config(): array { | ||
return [ | ||
'title' => __( 'Issues', 'planet4-blocks-backend' ), | ||
'categories' => [ 'planet4' ], | ||
'content' => ' | ||
<!-- wp:group {"align":"full","backgroundColor":"grey-10"} --> | ||
<div class="wp-block-group alignfull has-grey-10-background-color has-background"> | ||
Inwerpsel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<!-- wp:group {"className":"container"} --> | ||
<div class="wp-block-group container"> | ||
|
||
<!-- wp:spacer {"height":"60px"} --> | ||
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:heading {"textAlign":"center","level":1, "placeholder":"' . __( 'Enter title', 'planet4-blocks-backend' ) . '"} --> | ||
<h1 class="has-text-align-center"></h1> | ||
<!-- /wp:heading --> | ||
|
||
<!-- wp:paragraph {"align":"center", "placeholder":"' . __( 'Enter description', 'planet4-blocks-backend' ) . '"} --> | ||
<p class="has-text-align-center"></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:spacer {"height":"37px"} --> | ||
<div style="height:37px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:group {"className":"is-style-space-evenly","layout":{"type":"flex","allowOrientation":false}} --> | ||
<div class="wp-block-group is-style-space-evenly"> | ||
' . self::get_media_text_template() . ' | ||
' . self::get_media_text_template() . ' | ||
' . self::get_media_text_template() . ' | ||
' . self::get_media_text_template() . ' | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:spacer {"height":"37px"} --> | ||
<div style="height:37px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
<!-- wp:buttons {"placeholder":"' . __( 'Enter text', 'planet4-blocks-backend' ) . '","layout":{"type":"flex","justifyContent":"center"}} --> | ||
<div class="wp-block-buttons"> | ||
<!-- wp:button --> | ||
<div class="wp-block-button is-style-secondary"><a class="wp-block-button__link"></a></div> | ||
<!-- /wp:button --></div> | ||
<!-- /wp:buttons --> | ||
|
||
<!-- wp:spacer {"height":"69px"} --> | ||
<div style="height:69px" aria-hidden="true" class="wp-block-spacer"></div> | ||
<!-- /wp:spacer --> | ||
|
||
</div><!-- /wp:group --> | ||
</div><!-- /wp:group --> | ||
', | ||
]; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style allows to editors to choose the
Roboto
font family as default.