{% load i18n %}
{% load thumbnail %}

<div class="introcontent-layout-{{ content.layout }} introcontent-item-{{ content.ordering }} introcontent-type-{{ content.type }}">
    {% block title %}
    <h3 class="item-title">
        {% if content.url %}
            <a href="{{ content.url }}">{{ content.title }}</a>
        {% else %}
            {{ content.title }}
        {% endif %}
    </h3>
    {% endblock %}

    <div class="item-content">
        {% block mediafile %}
        {% if content.mediafile %}
        <div class="image">
            {% thumbnail content.mediafile.file "749" upscale=False as im %}
            <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="introcontent-mediafile">
            {% endthumbnail %}
        </div>
        {% endif %}
        {% endblock %}

        {% block richtext %}
        <div class="richtext-content">{{ content.richtext|safe }}</div>
        {% endblock %}
    </div>
    {% block target %}
    {% if content.url %}
        <a class="introcontent-target" href="{{ content.url }}">{% trans "Go to" %}</a>
    {% endif %}
    {% endblock %}
</div>
