<?php

/**
 * Title: Blog Section
 * Slug: baty/blog-section
 *  Categories: Featured
 */
?>

<!-- wp:group {"metadata":{"name":"Blog Section "},"className":"blog-section-plus","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|80"}}},"fontFamily":"dm-serif","layout":{"type":"constrained"}} -->
<div class="wp-block-group blog-section-plus has-dm-serif-font-family" style="margin-bottom:var(--wp--preset--spacing--80)"><!-- wp:group {"layout":{"type":"constrained"}} -->
    <div class="wp-block-group"><!-- wp:group {"layout":{"type":"constrained"}} -->
        <div class="wp-block-group"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"18px"},"elements":{"link":{"color":{"text":"var:preset|color|accent-5"}}}},"textColor":"accent-5"} -->
            <p class="has-text-align-center has-accent-5-color has-text-color has-link-color" style="font-size:18px"><?php echo esc_html__('Latest Blogs &amp; News', 'baty'); ?></p>
            <!-- /wp:paragraph -->

            <!-- wp:heading {"textAlign":"center","style":{"typography":{"fontSize":"40px"}},"fontFamily":"dm-serif"} -->
            <h2 class="wp-block-heading has-text-align-center has-dm-serif-font-family" style="font-size:40px"><?php echo esc_html__('Don’t Miss Our Newest Post', 'baty'); ?></h2>
            <!-- /wp:heading -->
        </div>
        <!-- /wp:group -->

        <!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} -->
        <div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--50)"><!-- wp:query {"queryId":2,"query":{"perPage":2,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[],"format":[]}} -->
            <div class="wp-block-query"><!-- wp:post-template {"layout":{"type":"grid","columnCount":2}} -->
                <!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
                <div class="wp-block-group"><!-- wp:group {"className":"content","style":{"spacing":{"blockGap":"16px","padding":{"top":"44px","bottom":"44px","left":"24px","right":"10px"}},"layout":{"selfStretch":"fit","flexSize":null}},"backgroundColor":"accent-3","layout":{"type":"constrained"}} -->
                    <div class="wp-block-group content has-accent-3-background-color has-background" style="padding-top:44px;padding-right:10px;padding-bottom:44px;padding-left:24px"><!-- wp:post-date {"metadata":{"bindings":{"datetime":{"source":"core/post-data","args":{"field":"date"}}}},"style":{"elements":{"link":{"color":{"text":"var:preset|color|accent-5"}}}},"textColor":"accent-5","fontSize":"medium"} /-->

                        <!-- wp:post-title {"level":1,"fontSize":"medium-plus"} /-->

                        <!-- wp:post-excerpt {"moreText":"read more","excerptLength":15,"fontSize":"small","fontFamily":"dm-sans"} /-->
                    </div>
                    <!-- /wp:group -->

                    <!-- wp:group {"className":"img","style":{"layout":{"selfStretch":"fit","flexSize":""},"dimensions":{"minHeight":""}},"layout":{"type":"constrained"}} -->
                    <div class="wp-block-group img"><!-- wp:post-featured-image {"width":"","height":"320px"} /--></div>
                    <!-- /wp:group -->
                </div>
                <!-- /wp:group -->
                <!-- /wp:post-template -->

                <!-- wp:group {"className":"main-btn","layout":{"type":"constrained"}} -->
                <div class="wp-block-group main-btn"><!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
                    <div class="wp-block-buttons"><!-- wp:button {"textAlign":"center","style":{"border":{"radius":{"topLeft":"0px","topRight":"0px","bottomLeft":"0px","bottomRight":"0px"}}}} -->
                        <div class="wp-block-button"><a class="wp-block-button__link has-text-align-center wp-element-button" href="<?php

                                                                                                                                    echo esc_url(get_page_by_path('blogs') ? get_permalink(get_page_by_path('blogs')) : '#');
                                                                                                                                    ?>" style="border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-left-radius:0px;border-bottom-right-radius:0px"><?php echo esc_html__('View All Blogs', 'baty'); ?></a></div>
                        <!-- /wp:button -->
                    </div>
                    <!-- /wp:buttons -->
                </div>
                <!-- /wp:group -->

                <!-- wp:query-no-results -->
                <!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} -->
                <p></p>
                <!-- /wp:paragraph -->
                <!-- /wp:query-no-results -->
            </div>
            <!-- /wp:query -->
        </div>
        <!-- /wp:group -->
    </div>
    <!-- /wp:group -->
</div>
<!-- /wp:group -->