{% extends 'layout.twig' %}

{% set categoryTitle %}{{ 'CoreAdminHome_Administration'|translate }}{% endset %}

{% set bodyClass = postEvent('Template.bodyClass', 'admin') %}
{% set isAdminArea = true %}

{% block body %}
    {% set topMenuModule = 'CoreAdminHome' %}
    {% set topMenuAction = 'home' %}
    {{ postEvent("Template.header", "admin") }}
    {{ parent() }}
    {{ postEvent("Template.footer", "admin") }}

    <div id="sizewarning" class="notification system notification-error">
        This page can't be rendered on screens with width or height below 200px.
    </div>
    <style>
        {# Inlined to ensure it is only applied in the admin area #}
        @media (max-width: 200px), (max-height: 200px) {
            #sizewarning {
                display: block;
            }

            body > #root {
                display: none!important;
            }
        }
    </style>
{% endblock %}


{% block root %}
    {% include "@CoreHome/_topScreen.twig" %}

    <div class="top_controls">
        <div vue-entry="CoreHome.QuickAccess" class="piwikTopControl borderedControl"></div>

        {% block topcontrols %}
        {% endblock %}

        {% include "@CoreHome/_headerMessage.twig" %}
    </div>

    {% import 'ajaxMacros.twig' as ajax %}
    {{ ajax.requestErrorDiv(contactEmail|default(''), areAdsForProfessionalServicesEnabled, currentModule, showMoreFaqInfo) }}
    {{ postEvent("Template.beforeContent", "admin", currentModule, currentAction) }}

    <div class="page">

        {% if showMenu is not defined or showMenu %}
            {% import '@CoreHome/_menu.twig' as menu %}
            {% set collapsibleMenu = hasSomeAdminAccess %}
            {{ menu.menu(adminMenu, false, 'Menu--admin', currentModule, currentAction, collapsibleMenu, isSuperUser) }}
        {% endif %}


        <div class="pageWrap">
            <a name="main"></a>
            {% block notification %}
                {% include "@CoreHome/_notifications.twig" %}
            {% endblock %}
            {% include "@CoreHome/_warningInvalidHost.twig" %}

            <div class="admin" id="content">

                <div class="ui-confirm" id="alert">
                    <h2></h2>
                    <input role="no" type="button" value="{{ 'General_Ok'|translate }}"/>
                </div>

                {% block content %}
                {% endblock %}


            </div>
        </div>
    </div>


{% endblock %}
