{% extends "layout.html" %}
{% block title %}Blog{% endblock %}
{% block body %}

  {%- for post in posts.page_content %}
  <div class="entry-overview">
    <div class="date">{{ post.pub_date.strftime("%b %d, %Y") }}</div>
    <div class="detail">
      <h1><a href="{{ post.link }}">{{ post.title }}</a></h1>
      {% if post.config.has_key('summary') %}
      <div class="summary">{{ post.config['summary'] }}</div>
      {% endif %}
    </div>
  </div>
  {%- endfor %}  
  <div class="pagination">
    {% if posts.has_prev -%}
      <a href="{{ url_for('blog.index', page=posts.page - 1) }}">&laquo; Previous</a>
    {%- else -%}
      <span class="disabled">&laquo; Previous</span>
    {%- endif %}{#
    #} — <strong>{{ posts.page }}</strong> — {#
    #}{% if posts.has_next -%}
      <a href="{{ url_for('blog.index', page=posts.page + 1) }}">Next &raquo;</a>
    {%- else -%}
      <span class="disabled">Next &raquo;</span>
    {%- endif %}
  </div>

{% endblock %}