{% extends 'blog/base.html' %}


{% block extra_head %}
	{{ block.super }}
	
	{% if post %}
		<link rel="alternate" type="application/rss+xml" title="Blog feed" href="http://{{ SITE.domain }}{% url 'blog_posts_feed' %}" />
	{% else %}
		<link rel="alternate" type="application/rss+xml" title="Blog feed" href="http://{{ SITE.domain }}{{ request.path }}feed/" />
	{% endif %}
{% endblock extra_head %}

{% block form_content %}
	{% for post in page.object_list %}
		{% include 'blog/post.inc.html' %}
		{% if not forloop.last %}<hr />{% endif %}
	{% endfor %}
	
	{% if page.has_previous or page.has_next %}
		{% if page.object_list|length > 1 %}
			<hr />
		{% endif %}
		
		<div class="blog-pagination clearfix">
			{% if page.has_previous %}
				<a href="?page={{ page.previous_page_number }}" class="pull-left">&larr; Newer blog posts</a>
			{% endif %}
		
			{% if page.has_next %}
				<a href="?page={{ page.next_page_number }}" class="pull-right">Older blog posts &rarr;</a>
			{% endif %}
		</div>
	{% endif %}
{% endblock form_content %}