{% extends 'base_site.html' %}

{% block container %}
<nav class="navbar navbar-expand-sm navbar-light bg-light fixed-top">
    <a class="navbar-brand" href="{{ reverse_url('admin:index') }}">
        <img src="{{ static_url('tornadmin/img/nav-logo.png') }}" alt="Tornadmin" class="d-none d-sm-block">
        <img src="{{ static_url('tornadmin/img/icon.png') }}" alt="Tornadmin" class="d-sm-none">
    </a>
    <button class="navbar-toggler" type="button" id="sideNavToggler">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNavDropdown">
        <ul class="navbar-nav ml-auto">
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown">
                    <i class="bi bi-person-circle"></i> {{ current_user.display_name }}
                </a>
                <div class="dropdown-menu dropdown-menu-right">
                    <form action="{{ reverse_url('admin:logout') }}" method="POST">
                        <input type="submit" class="dropdown-item" value="Logout">
                    </form>
                </div>
            </li>
        </ul>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="side-nav px-0 col-10 col-sm-3 col-lg-3 col-xl-2" id="sideNav">
            {% module SideNav(handler) %}
        </div>
        <div class="content-area col-12 col-sm-9 col-lg-9 col-xl-10 px-lg-5 ml-sm-auto">
            {% block content %}{% end %}
        </div>
    </div>
</div>
{% end %}
