<?php
/**
 * Title: Post Sidebar
 * Slug: wuppi/post-sidebar
 * Categories: posts
 * Description: A reusable post sidebar with search, recent posts, categories, and archives.
 * Keywords: sidebar, posts, recent, categories, archive
 * Block Types: core/post-content
 * Inserter: yes
 * Viewport Width: 480
 */
?>
<!-- wp:group {"className":"wuppi-post-sidebar-pattern","style":{"spacing":{"blockGap":"0"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-pattern"><!-- wp:group {"className":"wuppi-post-sidebar-section wuppi-post-sidebar-section--search","style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-section wuppi-post-sidebar-section--search"><!-- wp:heading -->
<h2 class="wp-block-heading"><?php echo esc_html__( 'FIND AN ARTICLE', 'wuppi' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:search {"label":<?php echo wp_json_encode( __( 'Search articles', 'wuppi' ) ); ?>,"showLabel":false,"placeholder":<?php echo wp_json_encode( __( 'Search articles', 'wuppi' ) ); ?>,"buttonText":<?php echo wp_json_encode( __( 'Search', 'wuppi' ) ); ?>,"buttonUseIcon":true,"className":"wuppi-post-sidebar-search"} /--></div>
<!-- /wp:group -->

<!-- wp:group {"className":"wuppi-post-sidebar-section","style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-section"><!-- wp:heading -->
<h2 class="wp-block-heading"><?php echo esc_html__( 'MORE TO READ', 'wuppi' ); ?></h2>
<!-- /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} /-->

<!-- wp:post-date {"style":{"elements":{"link":{"color":{"text":"var:preset|color|muted-foreground"}}},"typography":{"fontSize":"15px"}},"textColor":"muted-foreground"} /--></div>
<!-- /wp:group -->
<!-- /wp:post-template -->

<!-- wp:query-no-results -->
<!-- wp:paragraph -->
<p><?php echo esc_html__( 'No other posts yet.', 'wuppi' ); ?></p>
<!-- /wp:paragraph -->
<!-- /wp:query-no-results --></div>
<!-- /wp:query --></div>
<!-- /wp:group -->

<!-- wp:group {"className":"wuppi-post-sidebar-section","style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-section"><!-- wp:heading -->
<h2 class="wp-block-heading"><?php echo esc_html__( 'CATEGORIES', 'wuppi' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:categories {"showPostCounts":true,"showOnlyTopLevel":true,"className":"wuppi-post-sidebar-taxonomy"} /--></div>
<!-- /wp:group -->

<!-- wp:group {"className":"wuppi-post-sidebar-section","style":{"spacing":{"blockGap":"var:preset|spacing|30"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group wuppi-post-sidebar-section"><!-- wp:heading -->
<h2 class="wp-block-heading"><?php echo esc_html__( 'ARCHIVE', 'wuppi' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:details {"className":"wuppi-post-sidebar-archive-menu"} -->
<details class="wp-block-details wuppi-post-sidebar-archive-menu"><summary><?php echo esc_html__( 'Select month', 'wuppi' ); ?></summary><!-- wp:archives {"type":"monthly","showPostCounts":false,"className":"wuppi-post-sidebar-archives"} /--></details>
<!-- /wp:details --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
