<?php
/**
 * Block pattern setup file.
 *
 * @package    Zooey
 * @copyright  WebMan Design, Oliver Juhas
 *
 * @since    1.0.0
 * @version  2.0.5
 */

namespace WebManDesign\Zooey\Content;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

// Add block pattern setup args.
Block_Pattern::add_pattern_args( __FILE__, array(
	'title'    => _x( '2 images with large text and button below', 'Block pattern title.', 'zooey' ),
	'keywords' => array(
		esc_html_x( 'buttons', 'keyword', 'zooey' ),
		esc_html_x( 'gallery', 'keyword', 'zooey' ),
	),
	'viewportWidth' => 800,
) );

// Block pattern content:

$images = array(
	Demo::Get_image_url( '3to4-1' ),
	Demo::Get_image_url( '3to4-2' ),
);

?>

<!-- wp:group {"meta":"auto"} -->
<div class="wp-block-group">

	<!-- wp:gallery {"linkTo":"none","style":{"spacing":{"blockGap":{"top":"var:preset|spacing|s","left":"var:preset|spacing|s"}}}} -->
	<figure class="wp-block-gallery has-nested-images columns-default is-cropped">

		<?php foreach ( $images as $url ) : ?>
		<!-- wp:image {"sizeSlug":"thumbnail"} -->
		<figure class="wp-block-image size-thumbnail"><img src="<?php echo esc_url_raw( $url ); ?>" alt="<?php echo esc_attr( Demo::Get_text( 'alt' ) ); ?>" /></figure>
		<!-- /wp:image -->
		<?php endforeach; ?>

	</figure>
	<!-- /wp:gallery -->

	<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.2"},"fontSize":"h-3","fontFamily":"supplemental"} -->
	<p class="has-supplemental-font-family has-h-3-font-size" style="line-height:1.2"><?php Demo::The_text( '70' ); ?></p>
	<!-- /wp:paragraph -->

	<!-- wp:buttons -->
	<div class="wp-block-buttons">

		<!-- wp:button -->
		<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="#0"><?php Demo::The_text( 'button' ); ?></a></div>
		<!-- /wp:button -->

	</div>
	<!-- /wp:buttons -->

</div>
<!-- /wp:group -->
