<%- include('partials/header', {title: 'New Post'}); %>

<body class="text-center">
    <div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
        <%- include('partials/navbar_loggedin') -%>
        <main role="main" class="inner-cover">
            <div class="form lead">
                <form action="/post" class="form" method="POST">
                    <h3 class="form-heading lead">New Post</h3><br>
                    <br>
                    <input class="form-control" type="text" name="title" id="title" placeholder="Title of post">
                    <br>
                    <textarea class="form-control" rows="5" name="body" placeholder="Body of post"></textarea>
                    <br>
                    <input class="form-control" type="url" name="image" id="image" placeholder="(Optional) Image Link">
                    <br>
                    <button type="submit" class="btn btn-lg btn-dark">Post</button>
                </form>
                <div>
                    <img id="img-preview" src="" alt="preview of image">
                </div>
            </div>
        </main>
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="js/post_image_utils.js"></script>
</body>

</html>