<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 *
 * @package Rosea
 *
 * This file is part of the Rosea WordPress theme.
 *
 * Rosea WordPress Theme, Copyright 2026 nopStation
 * Rosea is distributed under the terms of the GNU General Public License v2 or later.
 *
 * @license GPL-2.0-or-later
 * @license URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

get_header();
?>

<main id="main" role="main">
<!--blog main content-->
<div class="blog-page-container">
	<?php
	while ( have_posts() ) :
		the_post();
		?>
		<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
			<header class="entry-header">
				<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
			</header>

			<?php
			if ( has_post_thumbnail() ) {
				?>
				<div class="post-featured-image">
					<?php the_post_thumbnail( 'large' ); ?>
				</div>
				<?php
			}
			?>

			<div class="entry-content">
				<?php
				the_content();

				wp_link_pages( array(
					'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'rosea' ),
					'after'  => '</div>',
				) );
				?>
			</div>

			<?php
			// If comments are open or we have at least one comment, load up the comment template.
			if ( comments_open() || get_comments_number() ) :
				comments_template();
			endif;
			?>
		</article>
		<?php
	endwhile; // End of the loop.
	?>
</div>
</main>

<?php
get_footer();
