<?php
/**
 *
 * Adds custom Block Patterns to the post/page editor.
 *
 * see: https://developer.wordpress.org/block-editor/developers/block-api/block-patterns/
 *
 * @package Pena Lite
 */


register_block_pattern_category(
	'pena-lite-theme',
	array( 'label' => esc_html__( 'Pena Lite', 'pena-lite' ) )
);


register_block_pattern_category(
	'pena-lite-theme-wc',
	array( 'label' => esc_html__( 'Pena Lite - Products', 'pena-lite' ) )
);

register_block_pattern(
	'pena-lite/pena-lite-hero',
	array(
		'title'			=> esc_html__( 'Hero Section', 'pena-lite' ),
		'description'	=> esc_html_x( 'A pattern to quickly create the top hero section.', 'Block pattern description', 'pena-lite' ),

		'content'		=> '<!-- wp:cover {"url":"' . esc_url( get_theme_file_uri( 'images/hero.jpg' ) ) . '","hasParallax":true,"minHeight":700,"align":"full","className":"is-style-editorskit-diagonal"} -->
        <div class="wp-block-cover alignfull has-background-dim has-parallax hero-image" style="background-image:url(' . esc_url( get_theme_file_uri( 'images/hero.jpg' ) ) . ');min-height:700px"><div class="wp-block-cover__inner-container"><!-- wp:paragraph -->
        <p></p>
        <!-- /wp:paragraph -->

        <!-- wp:group -->
        <div class="wp-block-group has-background"><div class="wp-block-group__inner-container"><!-- wp:heading {"level":1,"style":{"typography":{"fontSize":93}}} -->
        <h1 style="font-size:93px">' . esc_html_x( 'Welcome to Pena Lite', 'Theme starter content', 'pena-lite' ) . '</h1>
        <!-- /wp:heading -->
        
        <!-- wp:paragraph -->
        <p>' . esc_html_x( 'Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes. Commodo metus adipiscing odio. Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes.', 'Theme starter content', 'pena-lite' ) . '</p>
        <!-- /wp:paragraph -->
        
        <!-- wp:buttons -->
        <div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"strong-red","textColor":"strong-gray"} -->
        <div class="wp-block-button"><a class="wp-block-button__link has-strong-gray-color has-strong-red-background-color has-text-color has-background">' . esc_html_x( 'Donate Now', 'Theme starter content', 'pena-lite' ) . '</a></div>
        <!-- /wp:button --></div>
        <!-- /wp:buttons --></div></div>
        <!-- /wp:group --></div></div>
        <!-- /wp:cover -->',

		'viewportWidth'	=> 1400,
		'categories'	=> array( 'pena-lite-theme' ),
	)
);

if ( class_exists( 'Give' ) ) {
	register_block_pattern(
		'pena-lite/donation-forms',
		array(
			'title'			=> esc_html__( 'Donation Form Grid', 'pena-lite' ),
			'description'	=> esc_html_x( 'Three columns donation forms.', 'Block pattern description', 'pena-lite' ),

			'content'		=> '<!-- wp:heading {"align":"left","className":"custom","fontSize":"large"} -->
            <h2 class="has-text-align-left custom has-large-font-size">' . esc_html_x( 'Get Involved', 'Theme starter content', 'pena-lite' ) . '</h2>
            <!-- /wp:heading -->
            
            <!-- wp:give/donation-form-grid {"formsPerPage":"3","columns":"3"} /-->',

			'viewportWidth'	=> 1400,
			'categories'	=> array( 'pena-lite-theme' ),
			'keywords'		=> array( 'give' ),
		)
	);
}

register_block_pattern(
	'pena-lite/pena-lite-text-image',
	array(
		'title'			=> esc_html__( '2 Columns - Text and Image', 'pena-lite' ),
		'description'	=> esc_html_x( 'A pattern to quickly create 2 columns with text and image.', 'Block pattern description', 'pena-lite' ),

		'content'		=> '<!-- wp:columns {"className":"has-2-columns"} -->
        <div class="wp-block-columns has-2-columns"><!-- wp:column -->
        <div class="wp-block-column"><!-- wp:heading {"fontSize":"large"} -->
        <h2 class="has-large-font-size">' . esc_html_x( 'Love for Ellies', 'Theme starter content', 'pena-lite' ) . '</h2>
        <!-- /wp:heading -->
        
        <!-- wp:paragraph -->
        <p>' . esc_html_x( 'Do you know that every 15 minutes one elephant is senselessly killed just for their tusk? That leads to more than 30 000 elephants a year killed for nothing more than a human greed.', 'Theme starter content', 'pena-lite' ) . '</p>
        <!-- /wp:paragraph -->
        
        <!-- wp:list {"className":"styled"} -->
        <ul class="styled"><li><strong>' . esc_html_x( 'Water', 'Theme starter content', 'pena-lite' ) . '</strong>&nbsp;–&nbsp;<em>' . esc_html_x( 'drinking water is essential to animals as much as humans.', 'Theme starter content', 'pena-lite' ) . '</em></li><li><strong>' . esc_html_x( 'Food', 'Theme starter content', 'pena-lite' ) . '</strong>&nbsp;–&nbsp;<em>' . esc_html_x( 'food is essential to animals as much as humans.', 'Theme starter content', 'pena-lite' ) . '</em></li></ul>
        <!-- /wp:list -->
        
        <!-- wp:button {"align":"left"} -->
        <div class="wp-block-button alignleft"><a class="wp-block-button__link" href="https://anarieldesign.com/themedemos/pena-lite/causes/">' . esc_html_x( 'Donate Now', 'Theme starter content', 'pena-lite' ) . '</a></div>
        <!-- /wp:button --></div>
        <!-- /wp:column -->
        
        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image -->
        <figure class="wp-block-image"><img src="' . esc_url( get_theme_file_uri( 'images/ellie-1.jpg' ) ) . '" alt="image" class=""/></figure>
        <!-- /wp:image --></div>
        <!-- /wp:column --></div>
        <!-- /wp:columns -->',

		'viewportWidth'	=> 1400,
		'categories'	=> array( 'pena-lite-theme' ),
	)
);

register_block_pattern(
	'pena-lite/pena-lite-recent-post',
	array(
		'title'			=> esc_html__( 'Recent Post Grid', 'pena-lite' ),
		'description'	=> esc_html_x( 'A pattern to quickly create 3 column recent post.', 'Block pattern description', 'pena-lite' ),

		'content'		=> '<!-- wp:heading {"fontSize":"large"} -->
        <h2 class="has-large-font-size">' . esc_html_x( 'Latest Posts', 'Theme starter content', 'pena-lite' ) . '</h3>
        <!-- /wp:heading -->
        
        <!-- wp:spacer {"height":10} -->
        <div style="height:10px" aria-hidden="true" class="wp-block-spacer"></div>
        <!-- /wp:spacer -->
        
        <!-- wp:columns {"className":"has-3-columns recent-post-standard"} -->
        <div class="wp-block-columns has-3-columns recent-post-standard"><!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image {"linkDestination":"custom","className":"ticss-5a1ad9a0"} -->
        <figure class="wp-block-image ticss-5a1ad9a0"><a href="#"><img src="' . esc_url( get_theme_file_uri( 'images/post-1.jpg' ) ) . '" alt="image" class=""/></a></figure>
        <!-- /wp:image -->
        
        <!-- wp:latest-posts {"postsToShow":1,"displayPostContent":true,"displayPostDate":true} /--></div>
        <!-- /wp:column -->
        
        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image {"linkDestination":"custom","className":"ticss-5a1ad9a0"} -->
        <figure class="wp-block-image ticss-5a1ad9a0"><a href="#"><img src="' . esc_url( get_theme_file_uri( 'images/post-2.jpg' ) ) . '" alt="image" class=""/></a></figure>
        <!-- /wp:image -->
        
        <!-- wp:latest-posts {"postsToShow":1,"displayPostContent":true,"displayPostDate":true} /--></div>
        <!-- /wp:column -->
        
        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image {"linkDestination":"custom","className":"ticss-5a1ad9a0"} -->
        <figure class="wp-block-image ticss-5a1ad9a0"><a href="#"><img src="' . esc_url( get_theme_file_uri( 'images/post-3.jpg' ) ) . '" alt="image" class=""/></a></figure>
        <!-- /wp:image -->
        
        <!-- wp:latest-posts {"postsToShow":1,"displayPostContent":true,"displayPostDate":true} /--></div>
        <!-- /wp:column --></div>
        <!-- /wp:columns -->',

		'viewportWidth'	=> 1400,
		'categories'	=> array( 'pena-lite-theme' ),
	)
);

register_block_pattern(
	'pena-lite/pena-lite-team',
	array(
		'title'			=> esc_html__( 'Team', 'pena-lite' ),
		'description'	=> esc_html_x( 'A pattern to quickly create team block.', 'Block pattern description', 'pena-lite' ),

		'content'		=> '<!-- wp:columns {"className":"has-3-columns"} -->
        <div class="wp-block-columns has-3-columns"><!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image -->
        <figure class="wp-block-image"><img src="' . esc_url( get_theme_file_uri( 'images/team-1.jpg' ) ) . '" alt="image" class=""/></figure>
        <!-- /wp:image -->
        
        <!-- wp:heading {"align":"left","level":3} -->
        <h3 class="has-text-align-left">' . esc_html_x( 'Angela Ema', 'Theme starter content', 'pena-lite' ) . '</h3>
        <!-- /wp:heading -->
        
        <!-- wp:paragraph -->
        <p><em>' . esc_html_x( 'CEO/Founder', 'Theme starter content', 'pena-lite' ) . '</em></p>
        <!-- /wp:paragraph -->
        
        <!-- wp:paragraph -->
        <p>' . esc_html_x( 'Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes. Malesuada nibh montes fusce cum eleifend. Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes.', 'Theme starter content', 'pena-lite' ) . '</p>
        <!-- /wp:paragraph --></div>
        <!-- /wp:column -->
        
        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image -->
        <figure class="wp-block-image"><img src="' . esc_url( get_theme_file_uri( 'images/team-2.jpg' ) ) . '" alt="image" class=""/></figure>
        <!-- /wp:image -->
        
        <!-- wp:heading {"align":"left","level":3} -->
        <h3 class="has-text-align-left">' . esc_html_x( 'Alex Zela', 'Theme starter content', 'pena-lite' ) . '</h3>
        <!-- /wp:heading -->
        
        <!-- wp:paragraph -->
        <p><em>' . esc_html_x( 'Volunteer', 'Theme starter content', 'pena-lite' ) . '</em></p>
        <!-- /wp:paragraph -->
        
        <!-- wp:paragraph -->
        <p>' . esc_html_x( 'Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes. Malesuada nibh montes fusce cum eleifend. Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes.', 'Theme starter content', 'pena-lite' ) . '</p>
        <!-- /wp:paragraph --></div>
        <!-- /wp:column -->
        
        <!-- wp:column -->
        <div class="wp-block-column"><!-- wp:image -->
        <figure class="wp-block-image"><img src="' . esc_url( get_theme_file_uri( 'images/team-3.jpg' ) ) . '" alt="image" class=""/></figure>
        <!-- /wp:image -->
        
        <!-- wp:heading {"align":"left","level":3} -->
        <h3 class="has-text-align-left">' . esc_html_x( 'Talinka Bubi', 'Theme starter content', 'pena-lite' ) . '</h3>
        <!-- /wp:heading -->
        
        <!-- wp:paragraph -->
        <p><em>' . esc_html_x( 'Manager', 'Theme starter content', 'pena-lite' ) . '</em></p>
        <!-- /wp:paragraph -->
        
        <!-- wp:paragraph -->
        <p>' . esc_html_x( 'Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes. Malesuada nibh montes fusce cum eleifend. Malesuada nibh montes fusce cum eleifend fringilla commodo mattis tempor platea montes.', 'Theme starter content', 'pena-lite' ) . '</p>
        <!-- /wp:paragraph --></div>
        <!-- /wp:column --></div>
        <!-- /wp:columns -->',

		'viewportWidth'	=> 1400,
		'categories'	=> array( 'pena-lite-theme' ),
	)
);