<?php
/**
 * Title: Post Sidebar
 * Slug: wuppi/post-sidebar
 * Categories: posts
 * Description: A reusable post sidebar with recent posts.
 * Keywords: sidebar, posts, recent
 * Block Types: core/post-content
 * Inserter: yes
 * Viewport Width: 480
 */
?>
<!-- wp:group {"className":"wuppi-post-sidebar-pattern","style":{"spacing":{"blockGap":"var:preset|spacing|40"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-pattern"><!-- wp:group {"className":"is-style-card wuppi-post-sidebar-card","style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group is-style-card wuppi-post-sidebar-card"><!-- wp:paragraph {"textColor":"primary","fontSize":"small"} -->
<p class="has-primary-color has-text-color has-small-font-size"><?php echo esc_html__( 'MORE TO READ', 'wuppi' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading has-large-font-size"><?php echo esc_html__( 'Recent posts', 'wuppi' ); ?></h3>
<!-- /wp:heading -->

<!-- wp:query {"queryId":41,"query":{"perPage":5,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"namespace":"wuppi/post-sidebar","className":"wuppi-post-sidebar-list","layout":{"type":"constrained"}} -->
<div class="wp-block-query wuppi-post-sidebar-list"><!-- wp:post-template -->
<!-- wp:group {"className":"wuppi-post-sidebar__item","style":{"spacing":{"blockGap":"var:preset|spacing|15"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar__item"><!-- wp:post-title {"isLink":true,"level":4,"fontSize":"medium"} /-->

<!-- wp:post-date {"textColor":"muted-foreground","fontSize":"small"} /--></div>
<!-- /wp:group -->
<!-- /wp:post-template -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"textColor":"muted-foreground","fontSize":"small"} -->
<p class="has-muted-foreground-color has-text-color has-small-font-size"><?php echo esc_html__( 'No other posts yet.', 'wuppi' ); ?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></div>
<!-- /wp:query --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
