<?php
/**
 * The template for displaying all single posts
 *
 * @package Proto_Previewer
 */

if (!defined('ABSPATH')) exit;

get_header();
?>

<main id="primary" class="site-main">
    <div class="site-container">
        
        <?php while (have_posts()) : the_post(); ?>
            <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="background: #fff; border-radius: 1rem; border: 1px solid #e2e8f0; padding: 2.5rem; margin-bottom: 2rem;">
                <header class="entry-header" style="margin-bottom: 2rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 1rem;">
                    <h1 class="entry-title" style="margin: 0 0 0.5rem 0;"><?php the_title(); ?></h1>
                    <div class="entry-meta" style="font-size: 0.85rem; color: #64748b;">
                        <?php proto_previewer_posted_on(); ?> <?php proto_previewer_posted_by(); ?>
                    </div>
                </header>

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

                <footer class="entry-footer" style="margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; font-size: 0.85rem; color: #64748b;">
                    <?php proto_previewer_entry_footer(); ?>
                </footer>
            </article>

            <?php
            if (comments_open() || get_comments_number()) :
                comments_template();
            endif;
            ?>
        <?php endwhile; ?>

    </div>
</main>

<?php
get_footer();
