<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Pelican-Admin</title>
        <link href="{{ url_for('static', filename='css/bootstrap.css') }}" rel="stylesheet">
        <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap-table/dist/bootstrap-table.css') }}">
    </head>
    <body>
        <div class="container">
            <nav class="navbar navbar-default">
                {% set navigation_bar = [
                    (url_for('admin.index'), 'index', 'Index'),
                    (url_for('admin.settings'), 'setting', 'Setting'),
                ] -%}
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <a class="navbar-brand" href="#">Pelican manager</a>
                    </div>
                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            {% for href, id, caption in navigation_bar %}
                                <li {% if id == active_page %}class="active"{% endif %}><a href="{{ href }}">{{ caption }}</a> </li>
                            {% endfor %}
                            <!-- <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li> -->
                        </ul>
                    </div>
                    <!-- /.navbar-collapse -->
                </div>
                <!-- /.container-fluid -->
            </nav>
            {% with messages = get_flashed_messages() %}
              {% if messages %}
                <ul class=flashes>
                {% for message in messages %}

                  <div class="alert alert-success" role="alert">
                      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                      {{ message }}
                  </div>
                {% endfor %}
                </ul>
              {% endif %}
            {% endwith %}

            {% block content %}

            {% endblock %}
        </div>
    </body>
    <script src="{{ url_for('static', filename='js/jquery.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.js') }}" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='bootstrap-table/dist/bootstrap-table.js') }}" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}" charset="utf-8"></script>
    {% block script %}

    {% endblock %}

</html>
