{% extends "base.html" %}

{% load wagtailcore_tags wagtailimages_tags %}

{% block body_class %}helvetica{% endblock %}

{% block content %}
  <h1>{{ page.title }}</h1>
  <p class="meta">{{ page.date }}</p>

  <div class="intro">{{ page.intro }}</div>
  {{ page.body|richtext }}

  {% for item in page.gallery_images.all %}
    <div class="fl ma1">
      {% image item.image fill-320x240 %}
      <p> {{ item.caption }}</p>
    </div>
  {% endfor %}

  {% if page.tags.all.count %}
    <div class="tags">
      <h3>Tags</h3>
      {% for tag in page.tags.all %}
        <a href="{% slugurl 'tags' %}?tag={{ tag }}">
          <button type="button">{{ tag }}</button>
        </a>
      {% endfor %}
    </div>

  {% endif %}

  <p><a href="{{ page.get_parent.url }}">Return to blog</a></p>
{% endblock %}