{% extends 'base.html' %}
{% load cms_tags static %}

{% block hero %}{% endblock hero %}

{% block body %}
    <section class="page-title">
        <div class="wrapper">
            <div class="page-title__container">
                <h1>Latest Events</h1>
            </div>
        </div>
    </section>

    <section class="text-image-block">
        <div class="wrapper">
            {% for event in event_index %}
                <a href="{{ event.get_absolute_url }}" title="{{ event.title }}" class="text-image-block__item">
                    <div class="text-image-block__text col">
                        <div class="upper">
                            <h3>{{ event.title }}</h3>
                            <p>{{ event.intro }}</p>
                        </div>
                        <div class="lower">
                            <p>
                                {{ event.start_at|date:"d F Y" }}
                            </p>
                        </div>
                    </div>
                </a>
            {% empty %}
                <h3>No events currently listed</h3>
            {% endfor %}
        </div>
    </section>
{% endblock body %}
