{% extends "base.html" %}

{% block content %}
  {% if posts %}
  	<h2>All posts</h2>
  	<ol>
  		{% for post in posts %}
  		<li>
  			<time datetime="{{ post.published_on|date:"c" }}">
  			  {{ post.published_on|date:"F d, Y" }}</time><br>
  			<a href="{% url post post.slug %}">{{ post.title }}</a><br>
  		</li>
  		{% endfor %}
  	</ol>
  {% else %}
    <h2>No posts found</h2>
  {% endif %}
{% endblock %}
