<%- include('partials/header') %>
    <div class="container">
        <div class="jumbotron p-5 mb-2 text-white rounded front">
            <div class="col-md-6 ">
                <h1 class="display-4 font-italic">Subscribe to our Newsletter</h1>
                <p class="lead my-3">If you like our content please concider subscribing to our newsletter below.</p>
            </div>
        </div>

        <div class="container m-0 p-0">
            <div class="row ml-0" style="margin-left: 0px;">
                <div class="col-md-8 mb-3 blog-main bg-light rounded">
                    <hr class="pb-3 mt-3">
                    <div class="blog-post">
                        <div class="mb-4">
                            <h2>Newsletter</h2>
                            <p>Enter your email bellow to subscribe to our weekly newsletter.</p>
                            <% if(message !='' ){ %>
                                <div class="alert alert-success" role="alert">
                                    <%=message%>
                                </div>
                                <% } %>
                                    <form action="/subscribe" method="post" class="row row-cols-md-auto mx-1 g-3">
                                        <div class="col">
                                            <input type="email"
                                                class="form-control form-control-light text-bg-light col"
                                                placeholder="Enter email here ..." name="subscriberMail" required>
                                        </div>
                                        <div class="col">
                                            <button type="submit" class="btn btn-outline-secondary">Subscribe</button>
                                        </div>
                                    </form>
                                    <hr class="pb-3 mt-3">
                        </div>
                    </div>
                </div>
                <aside class="col-md-4 blog-sidebar">
                    <div class="p-3 mb-3 bg-light rounded">
                        <h4 class="font-italic">About</h4>
                        <p class="mb-0">This is a sample blog format.
                            All data is for educational purposes.</p>
                    </div>
                    <div class=" bg-light rounded">
                        <div class="p-3 ">
                            <h4 class="font-italic">Latest News</h4>
                            <ol class="list-unstyled mb-0">
                                <li><a href="/posts/<%=last10[0]%>">
                                        <%=last10[0]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[1]%>">
                                        <%=last10[1]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[2]%>">
                                        <%=last10[2]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[3]%>">
                                        <%=last10[3]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[4]%>">
                                        <%=last10[4]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[5]%>">
                                        <%=last10[5]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[6]%>">
                                        <%=last10[6]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[7]%>">
                                        <%=last10[7]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[8]%>">
                                        <%=last10[8]%>
                                    </a></li>
                                <li><a href="/posts/<%=last10[9]%>">
                                        <%=last10[9]%>
                                    </a></li>
                            </ol>
                        </div>
                    </div>
                </aside>
            </div>
        </div>
        <%- include('partials/footer') %>