{% load kmuhelper_tags %}

<html lang="de" style="height: 100%;">
<head>
    {% if isonline %}
        <title>E-Mail Viewer | KMUHelper</title>
    {% endif %}

    <meta name="viewport" content="width=device-width, initial-scale=1">

    {% block extrahead %}

    {% endblock %}
</head>
<body style="height: 100%; margin: 0; padding: 0; font-size: 14px; color: #333; background: #fff; font-family: 'Roboto','Lucida Grande','DejaVu Sans','Bitstream Vera Sans',Verdana,Arial,sans-serif;">
<div style="width: 100%; padding: 0;">
    {% block header %}
        {% if not noheader %}
            <div style="color: {{ header_foreground|default:'#FFEE88' }}; background-color:
                    {{ header_background|default:'#AA1155' }}; width: auto; padding: 10px 20px;">
                <h1 style="padding: 0; margin: 0 20px 0 0; font-weight: 300; font-size: 24px;">
                    {% block title %}{{ header_title|default:'KMUHelper | E-Mail' }}{% endblock %}</h1>
            </div>
        {% endif %}
    {% endblock %}

    {% block content %}
        <div style="padding: 20px;">
            <h2 style="margin: 0 0 20px; font-weight: 300; font-size: 20px; color: #666;">
                {% block subtitle %}{{ subtitle }}{% endblock %}</h2>

            {% block precontent %}
                {{ precontent|urlize|linebreaks }}
            {% endblock %}
            {% block maincontent %}
                {{ text|urlize|linebreaks }}
            {% endblock %}
            {% block postcontent %}
                <br>
                {{ postcontent|urlize|linebreaks }}
            {% endblock %}
        </div>
    {% endblock %}
</div>

{% if isonline %}
    {% block attachments %}
        {% if attachments %}
            <hr>
            <h3 style="margin-left: 20px;">Anhänge</h3>
            <p style="margin-left: 20px;">Achtung: Es kann unter Umständen vorkommen, dass nicht mehr alle Anhänge
                verfügbar sind.</p>
            <ul style="padding-bottom: 20px;">
                {% for attachment in attachments %}
                    <li><a href="{{ attachment.get_url }}">{{ attachment.filename }}</a></li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endblock %}
{% else %}
    {% block view_online_info %}
        {% if not disable_viewonline %}
            {% if view_online_url %}
                <hr>
                <p style="color: #404040; font-size: 11px;">E-Mail wird nicht richtig dargestellt? - Im Webbrowser
                    ansehen: <a href="{{ view_online_url }}">{{ view_online_url }}</a></p>
            {% endif %}
        {% endif %}
    {% endblock %}
{% endif %}
</body>
</html>