{% extends 'includes/layout.swig' %}

{% import "includes/paginator.swig" as P %}

{% block body %}
    <h2 style="margin-left: 1rem">{{page.tag}}</h2>
    <ul class="collapsible popout">
    {% for article in page.posts.toArray() %}
    <li>
      <div class="collapsible-header">{{article.title}}</div>
      <div class="collapsible-body small-padding">
        <div class="mdi mdi-clock" style="padding-left: 1rem; padding-bottom: 8px;">{{ date(article.date) }}</div>
        <div class="entry">{{article.excerpt}}</div>
        <div class="card z-depth-0">
          <div class="card-action" style="padding-bottom: 0; padding-left: 14px;">
            <a href="{{url_for(article.path)}}">Go To "{{article.title}}"</a>
          </div>
        </div>
      </div>
    </li>
    {% endfor %}
  </ul>

  <div id="center">
    {{ P.Paginiation() }}
  </div>
{% endblock %}
