
{% import "Mambo/macros/html.html" as html with context %}
{% import "Mambo/macros/nav.html" as nav with context %}
{% import "Mambo/macros/forms.html" as forms with context %}
{% import "Mambo/macros/widget.html" as widget with context %}

{% set wide_view = false %}
{% set show_menus = true %}

{% if __.__USER_AUTH_ENABLED__ and current_user and not current_user.is_authenticated %}
    {% set wide_view = true %}
    {% set show_menus = false %}
{% endif %}



<!DOCTYPE html>
<html>

<head>
        {{ html.header("%title% | " + __.APPLICATION_NAME) }}
        {{ html.favicon("favicon.ico") }}
        {{ html.global_assets() }}
        {{ html.fontawesome() }}
        {{ html.bootswatch_theme(__.MAMBO_ADMIN_THEME) }}
        {{ html.css_asset("mambo-admin.css") }}
        {{ html.js_asset("mambo-admin.js") }}
</head>

<body>

    {{ nav.top_nav(brand=__.MAMBO_ADMIN_BRAND, url="/") }}

    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                {{ widget.flashed_messages() }}
            </div>
        </div>
    </div>

    <div class="container-fluid" id="{% block admin_page_id %}{% endblock %}">

        {% if not wide_view %}
            <div class="row">
                <div class="col-md-12">
                    <h4>
                      <div class="visible-xs pull-left btn-offcanvas" data-toggle="offcanvas"><i class="fa fa-bars"></i></div>
                      <div class="pull-right"><strong>{{ nav.current_title() }} {{ nav.current_sub_title("/") }}</strong></div>
                      <div class="clearfix"></div>
                    </h4>
                    <hr>
                </div>
            </div>
        {% endif %}

        <div class="row row-offcanvas row-offcanvas-left">

            {% if wide_view %}
                <div class="col-md-12 col-sm-12 col-xs-12 main">
                    {% include __template__ %}
                </div>

            {% else %}
                <div class="col-md-2 col-sm-3 sidebar  sidebar-offcanvas">
                    {{ nav.panel(use_active=True) }}
                </div>

                <div class="col-md-10 col-sm-9 col-xs-12 main">
                    {% include __template__ %}
                </div>
            {% endif %}

        </div>
    </div>



</body>
</html>





