<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 */

get_header(); ?>

<main id="primary" class="site-main container my-5">
    <?php
    while (have_posts()):
        the_post();
        ?>
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
            <header class="entry-header text-center mb-5">
                <?php the_title('<h1 class="entry-title display-4 fw-bold mb-4">', '</h1>'); ?>
            </header>

            <?php if (has_post_thumbnail()): ?>
                <div class="post-thumbnail-full mb-5">
                    <?php the_post_thumbnail('full', array(
                        'class' => 'img-fluid rounded shadow-sm w-100',
                        'style' => 'aspect-ratio: 16/9; object-fit: cover;'
                    )); ?>
                </div>
            <?php endif; ?>

            <div class="row">
                <div class="col-lg-8 mx-auto">
                    <div class="entry-content fs-5 lh-lg font-sans text-dark">
                        <?php
                        the_content();

                        wp_link_pages(
                            array(
                                'before' => '<div class="page-links mt-4"><strong>' . esc_html__('Pages:', 'wisdom1') . '</strong>',
                                'after' => '</div>',
                            )
                        );
                        ?>
                    </div><!-- .entry-content -->
                </div> <!-- .col-lg-8 -->
            </div> <!-- .row -->
        </article><!-- #post-<?php the_ID(); ?> -->
        <?php
    endwhile; // End of the loop.
    ?>
</main><!-- #main -->

<?php
get_footer();
