{% load i18n %}
{% comment %}
Content related context:
- object: object to display
- cover: cover
- title: title
- subtitle: subtitle
- content: content to display

Styling related context:
- is_active: add "active" css class
- is_small: add "small" css class
- is_tiny: add "tiny" css class
- tag
- tag_class: css class to set to main tag
- tag_extra: extra tag attributes

{% endcomment %}

{% block outer %}
<{{ tag|default:"article" }} class="preview {% if not cover %}no-cover {% endif %}{% if is_active %}active {% endif %}{% block tag-class %}{{ tag_class|default:"" }} {% endblock %}" {% block tag-extra %}{% endblock %}>
{% block inner %}
    {% block headings-container %}
    <header class="headings{% block headings-class %}{% endblock %}"{% block headings-tag-extra %}{% endblock %}>
    {% block headings %}
        {% block title-container %}
        <a href="{{ url|escape }}" class="heading title {% block title-class %}{% endblock %}"{% if title %} title="{{ title|escape }}"{% endif %}>
            {% block title %}{{ title|default:"" }}{% endblock %}
        </a>
        {% endblock %}
        {% block subtitle-container %}
            <span class="heading subtitle {% block subtitle-class %}{% endblock %}">
                {% block subtitle %}{{ subtitle|default:"" }}{% endblock %}
            </span>
        {% endblock %}
    {% endblock %}
    </header>
    {% endblock %}

    {% block content-container %}
    <section class="content headings-container">
        {% block content %}
        {% if content and with_content %}
        {% autoescape off %}
            {{ content|striptags|linebreaks }}
        {% endautoescape %}
        {% endif %}
        {% endblock %}
    </section>
    {% endblock %}

    {% block actions-container %}
    <div class="actions">
        {% block actions %}{% endblock %}
    </div>
    {% endblock %}
{% endblock %}
</{{ tag|default:"article" }}>
{% endblock %}
