<!DOCTYPE html>
<html lang="fr">
    <head>
        <meta charset="utf-8">
        <title><%= title %></title>
        <link rel="stylesheet" href="/style.css">

    </head>
    <body>
        <aside>
            <h1>Sauveteurs du dunkerquois</h1>
            <form action="/search">
                <input type="search">
                <input type="submit" value="Rechercher" class="search">
            </form>
            <footer>
                <nav>
                    <ul>
                        <li><a href="/">Accueil</a></li>
                        <li><a href="/historique">Historique</a></li>
                        <li><a href="/a-propos">À propos</a></li>
                        <li><a href="/admin/login">Connexion</a></li>
                    </ul>
                </nav>
            </footer>
        </aside>
        <div class="editor">
            <% if (isNew) { %>
                <form action="/admin/articles/new" method="post">
            <% } else { %>
                <form action="/admin/articles/<%= article_id %>/edit" method="post">
            <% } %>
                <input name="title" id="title" placeholder="Titre" type="text" value="<%= title %>">
                <textarea id="contents" name="contents" placeholder="add info in markdown here"><%= contents %></textarea>
                <% if (isNew) { %>
                    <input type="submit" value="Proposer la création">
                <% } else { %>
                    <input type="submit" value="Proposer la modification">
                <% } %>
            </form>
            <div class="editor_preview">
                <p>Test</p><br><br>
            </div>
        </div>
</body>
</html>
