{% extends "base.html" %}

{% load wagtailcore_tags wagtailimages_tags %}

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

{% block content %}
  {% include 'common/header.html' %}
  {% if page.intro %}
    <section>
      <div class="container">
        {{ page.intro|richtext }}
      </div>
    </section>
  {% endif %}
  {% if not page.hide_list %}
    <section>
      <div class="container">
        <div class="row no-gutter">
          {% for child in page.get_children.specific %}
            <div class="media category">
              <div class="media-left">
                <a href="{{ child.url }}">
                  {% image child.image max-200x200 %}
                </a>
              </div>
              <div class="media-body">
                <a href="{{ child.url }}">
                  <h4 class="media-heading">{{ child.title }}</h4>
                </a>
                <p>{{ child.get_meta_description }}</p>
              </div>
            </div>
          {% endfor %}
        </div>
      </div>
    </section>
  {% endif %}
{% endblock %}