{% extends "base.html" %}


{% load wagtailcore_tags wagtailimages_tags %}

{% block body_class %}template-blogindexpage{% endblock %}

{% block content %}
	<div class="block">
		<h1 class="title is-3 has-text-centered">Jacks Bastards {{ page.title }}</h1>
	    <h1 class="intro subtitle is-3 has-text-centered">{{ page.intro|richtext }}</h1>
	</div>
	{% for post in blogpages %}
	    {% with post=post.specific %}
			<div class="box">
		        <h1 class="title is-4"><a href="{% pageurl post %}">{{ post.title }}</a></h1>
				
				{% with post.main_image as main_image %}
				    {% if main_image %}{% image main_image fill-160x100 %}{% endif %}
				{% endwith %}
				
		        <p>{{ post.intro }}</p>
		        {{ post.body|richtext }}
			</div>
	    {% endwith %}
	{% endfor %}
{% endblock %}