{% macro post_max(page) %}
<div>
  <h1><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
  <p>{{ page.description }}</p>
  <dl class="dl-horizontal">
    <dt>Date</dt>
    <dd>{{ page.date | date(format="%Y-%m-%d") }}</dd>
    <dt>Author</dt>
    <dd>
      {% if page.extra.author %}
        {{page.extra.author}}
      {% else %}
        {{config.extra.author}}
      {% endif %}
    </dd>

    {% if page.taxonomies.categories %}
    <dt>Tags</dt>
    <dd>
      <a href="{{ get_taxonomy_url(kind="categories", name=page.taxonomies.categories[0]) }}">
        {{ page.taxonomies.categories[0] }}
      </a>
      {% if page.taxonomies.tags %}
      |
      {% for tag in page.taxonomies.tags %}
        <a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}{% endif %}
      {% endfor %}
      {% endif %}
    </a>
    </dd>
    {% endif %}

    <dt>Reading Time</dt>
    <dd>{{ page.reading_time }}'</dd>
  </dl>
  <p>
    <a href="{{ page.permalink }}" class="btn btn-info" role="button">more...</a>
  </p>
  <hr class="soften">
  <p></p>
</div>
{% endmacro post_max %}


{% macro post_min(page) %}
<a href="{{ page.permalink }}">{{ page.date }} | {{ page.title }}</a>
{% endmacro post_min %}


{% macro paginator(ref, extra) %}
<div class="pagination">
  {% if ref.current_index != 1 %}
  <a href="{{ ref.first }}">&larrb;</a>
  {% else %}
  <a class="disabled" href="{{ ref.first }}">&larrb;</a>
  {% endif %}

  {% if ref.next %}
  <a href="{{ ref.previous }}">&larr;</a>
  {% else %}
  <a class="disabled" href="#">&larr;</a>
  {% endif %}

  <div>{{ ref.current_index }}/{{ ref.number_pagers }}</div>

  {% if ref.next %}
  <a href="{{ ref.next }}">&rarr;</a>
  {% else %}
  <a class="disabled" href="#">&rarr;</a>
  {% endif %}

  {% if ref.current_index != ref.number_pagers %}
  <a href="{{ ref.last }}">&rarrb;</a>
  {% else %}
  <a class="disabled" href="{{ ref.last }}">&rarrb;</a>
  {% endif %}
</div>
{% endmacro paginator %}
