
{% import "Toucan/macros/master.html" as master with context %}
{% import "Toucan/Plugin/Publisher/Page/macros.html" as publisher with context %}
{% include "Toucan/Plugin/Publisher/Page/_include.html" %}

<div class="Publisher-Page">
    {% if post_header %}
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <div class="post-header">
                        <h1>{{ post_header }}</h1>
                        <hr class="small">
                        {% if post_subheader %}
                            <span class="subheading">{{ post_subheader }}</span>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    {% endif %}

    <!-- Main Content -->
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

                {% for post in posts %}
                    <div class="post-preview">
                        <a href="{{ post.url }}">
                            <h2 class="post-title">
                                {{ post.title }}
                            </h2>
                            <h3 class="post-subtitle">
                                {{ post.excerpt }}
                            </h3>
                        </a>
                        {% if post_show_byline %}
                        <p class="post-meta">Posted by <a href="{{ post.author.url }}">{{ post.author.name }}</a> {{ post.published_at | date_since }}</p>
                        {% endif %}
                    </div>

                    <hr>
                {% endfor %}

                {{ master.pagination(posts, next="Older Posts", prev="Newer Posts", pager=True) }}

            </div>
        </div>
    </div>

    <hr>

</div>
