{% extends "base.html" %}

{% load static wagtailimages_tags %}

{% block content %}
<div id="main">
    <div class="container">
        {% include "common/content.html" %}

        {% if page.body %}
            <hr />
        {% endif %}

        {% for child in page.get_children.specific %}
            <div class="media list-page-item mb-3">
                <div class="d-none d-md-block align-self-center img-wrapper mr-3">
                    {% if child.image %}
                        <a href="{{ child.url }}">
                            {% image child.image width-300 as photo %}
                            <div class="image" data-image='{{ photo.url }}'></div>
                        </a>
                    {% endif %}
                </div>
                <div class="media-body">
                    <a href="{{ child.url }}">
                    <h5 class="my-0">{{ child.title }}</h5>
                    </a>
                    <small>{% include "common/content-details.html" with page=child %}</small>
                    <p>{{ child.get_short_body }}</p>
                </div>
            </div>
        {% endfor %}
    </div>
  </div>
{% endblock %}