<?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 columns of quotes on a background image', 'Block pattern title.', 'zooey' ),
	'keywords' => array(
		esc_html_x( 'testimonials', 'keyword', 'zooey' ),
	),
) );

// Block pattern content:

$color_text = Demo::get_value( 'color_primary', 'is_dark', 'white', 'black' );

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

?>

<!-- wp:group {"align":"full","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignfull">

	<!-- wp:columns {"align":"wide"} -->
	<div class="wp-block-columns alignwide">

		<?php foreach ( $images as $url ) : ?>
		<!-- wp:column -->
		<div class="wp-block-column">

			<!-- wp:cover {"url":"<?php echo esc_url_raw( $url ); ?>","dimRatio":90,"overlayColor":"secondary","isUserOverlayColor":true,"minHeight":62,"minHeightUnit":"vh","contentPosition":"bottom center","style":{"border":{"radius":"var:preset|border-radius|s"},"spacing":{"padding":{"top":"var:preset|spacing|content","bottom":"var:preset|spacing|content"}}},"textColor":"<?php echo esc_attr( $color_text ); ?>"} -->
			<div class="wp-block-cover has-custom-content-position is-position-bottom-center has-<?php echo esc_attr( $color_text ); ?>-color has-text-color" style="border-radius:var(--wp--preset--border-radius--s);padding-top:var(--wp--preset--spacing--content);padding-bottom:var(--wp--preset--spacing--content);min-height:62vh">
				<span aria-hidden="true" class="wp-block-cover__background has-secondary-background-color has-background-dim-90 has-background-dim"></span>
				<img class="wp-block-cover__image-background" alt="" src="<?php echo esc_url_raw( $url ); ?>" data-object-fit="cover"/>
				<div class="wp-block-cover__inner-container">

					<!-- wp:quote {"textColor":"black","fontSize":"xl"} -->
					<blockquote class="wp-block-quote has-black-color has-text-color has-xl-font-size">
						<!-- wp:paragraph -->
						<p><?php Demo::The_text( '190' ); ?></p>
						<!-- /wp:paragraph -->
						<cite><?php Demo::The_text( 'people/name' ); ?></cite>
					</blockquote>
					<!-- /wp:quote -->

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

		</div>
		<!-- /wp:column -->
		<?php endforeach; ?>

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

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