<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= post.title %> - Blog Virtual</title>
    <link rel="stylesheet" href="/css/style.css">
</head>
<body>
    <header>
        <h1>Blog Virtual</h1>
        <nav>
            <ul>
                <li><a href="/">Home</a></li>
                <li><a href="/categorias">Categorias</a></li>
                <li><a href="/sobre">Sobre</a></li>
            </ul>
        </nav>
    </header>

    <main>
        <article class="post">
            <h1><%= post.title %></h1>
            <div class="post-meta">
                <span class="date"><%= post.date %></span>
                <span class="author"><%= post.author %></span>
            </div>
            <div class="post-content">
                <%- post.content %>
            </div>
            <div class="post-tags">
                <% post.tags.forEach(tag => { %>
                    <span class="tag"><%= tag %></span>
                <% }); %>
            </div>
        </article>

        <section class="comments">
            <h2>Comentários</h2>
            <% post.comments.forEach(comment => { %>
                <div class="comment">
                    <div class="comment-meta">
                        <span class="author"><%= comment.author %></span>
                        <span class="date"><%= comment.date %></span>
                    </div>
                    <p><%= comment.content %></p>
                </div>
            <% }); %>

            <form action="/post/<%= post.id %>/comment" method="POST" class="comment-form">
                <h3>Deixe seu comentário</h3>
                <div class="form-group">
                    <label for="author">Nome:</label>
                    <input type="text" id="author" name="author" required>
                </div>
                <div class="form-group">
                    <label for="content">Comentário:</label>
                    <textarea id="content" name="content" required></textarea>
                </div>
                <button type="submit">Enviar</button>
            </form>
        </section>
    </main>

    <footer>
        <p>Powered by Cérebro Operante</p>
    </footer>
</body>
</html> 