{% extends "cofcms/base.html" %}
{% load wagtailcore_tags wagtailimages_tags cofcms_tags %}

{% block content %}
    <section class="intro">
        <h1>{{ page.title }}</h1>
        <div>{{ page.introduction|richtext }}</div>
    </section>

    <section class="pagecontent">
        {% for block in page.body %}
            {% if block.block_type == "heading" %}
                <h2>{{ block.value }}</h2>
            {% elif block.block_type == "paragraph" %}
                <article class="paragraph">
                    {{ block.value|richtext }}
                </article>
            {% elif block.block_type == "image" %}
                <div class="image">
                    {% image block.value width-800 %}
                </div>
            {% elif block.block_type == "iframe" %}
                <article class="paragraph">
                    <iframe src="{{ block.value.url }}" width="100%" height="{{ block.value.height }}px"></iframe>
                </article>
            {% endif %}
        {% endfor %}
    </section>
{% endblock %}
