{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags i18n %}
{% block titletag %}{% trans "Dashboard" %}{% endblock %}
{% block bodyclass %}homepage{% endblock %}

{% block extra_css %}
    {{ block.super }}

    <link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/layouts/home.css' %}" type="text/css" />
    <link rel="stylesheet" href="{% versioned_static 'wagtailadmin/css/layouts/page-editor.css' %}" />
    {{ media.css }}
{% endblock %}

{% block content %}
    <header class="merged nice-padding">
        <div class="avatar"><img src="{% avatar_url user %}" alt="" /></div>

        <div>
            <h1>{% block branding_welcome %}{% blocktrans trimmed %}Welcome to the {{ site_name }} Wagtail CMS{% endblocktrans %}{% endblock %}</h1>
            <div class="user-name">{{ user|user_display_name }}</div>
        </div>
    </header>

    {% if panels %}
        {% for panel in panels %}
            {% component panel fallback_render_method=True %}
        {% endfor %}
    {% else %}
        <p>{% trans "This is your dashboard on which helpful information about content you've created will be displayed." %}</p>
    {% endif %}
{% endblock %}

{% block extra_js %}
    {{ block.super }}
    <script src="{% versioned_static 'wagtailadmin/js/collapsible.js' %}"></script>
    {{ media.js }}
{% endblock %}
