{% import "Pylot/macros/base.html" as m with context %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{{ __.META["title"] | safe }}</title>

    {{ m.css("vendor/font-awesome/css/font-awesome.min.css") }}

    {# List all css in here #}
    {% assets output="all_css.css",
        "vendor/bootstrap/css/bootstrap.min.css",
        "vendor/bootswatch/superhero.css",
        "css/style.css"
    -%}
    <link href="{{ ASSET_URL }}" rel="stylesheet">
    {% endassets -%}

    {{ m.js("vendor/jquery/jquery.min.js") }}
    {{ m.js("vendor/bootstrap/js/bootstrap.min.js")}}

    <link rel="shortcut icon" href="{{ m.static('favicon.ico') }}">

    {#:: Include Pylot header: metadata, scripts ::#}
    {% include "Pylot/includes/header.html" %}


</head>
<body>

    <div class="navbar navbar-default">
            <div class="container ">
                <div class="navbar-header">
                  <a href="{{url_for('Index:index')}}" class="navbar-brand">{{ __.APP_NAME }}</a>
                  <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                  </button>
                </div>
                <div class="navbar-collapse collapse" id="navbar-main">

                    <ul class="nav navbar-nav">
                        {% if __.LOGIN_ENABLED and current_user.is_authenticated() %}
                        <li><a href="/">Home</a></li>
                        {% endif %}
                    </ul>

                    <ul class="nav navbar-nav navbar-right">
                        {% if __.LOGIN_ENABLED %}
                            {% if current_user.is_authenticated() %}
                            <li class="dropdown">
                              <a href="{{url_for('Index:index')}}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i>  {{current_user.name}}<span class="caret"></span></a>
                              <ul class="dropdown-menu" role="menu">
                                <li><a href="{{url_for('Login:account_settings')}}">Settings</a></li>
                                <li class="divider"></li>
                                <li><a href="{{url_for('Login:logout')}}">Logout</a></li>
                              </ul>
                            </li>
                            {% else %}
                            <li><a href="{{url_for('Login:login')}}">Login</a></li>
                            {% endif %}
                        {% endif %}
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">

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

            {#:: The content of the site will be included here ::#}
            {%- include __view_template__ -%}

        </div>

        {#: List all js to be combined ::#}
        {% assets output="all_js.js",
                "js/app.js"
        -%}
            <script type="text/javascript" src="{{ ASSET_URL }}"></script>
        {% endassets -%}
</body>
</html>



