{%- extends "bootstrap/base.html" %}

{# enable fixes for legacy browsers. import macros #}
{% import "bootstrap/fixes.html" as fixes %}
{% block head %}
    {{ super() }}
    {#- Docs: http://pythonhosted.org/Flask-Bootstrap/macros.html#fixes
   The sample application already contains the required static files. #}
    {{ fixes.ie8() }}
{%- endblock %}

{# css #}
{% block styles -%}
    {{ super() }}  {# load boostrap css #}
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"
            integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
            crossorigin="anonymous"></script>
    <link rel="stylesheet" type="text/css"
          href="{{ url_for('projects_base.static', filename='default_style.css') }}">
    <script type="text/javascript"
            src="{{ url_for('projects_base.static', filename='common.js') }}">
    </script>
{% endblock %}

{# navigation & flashes #}
{% block navbar %}
    {{ nav.nav_bar.render() }}
    {# flashes #}
    <div class="container">
        <ul class="flashes" id="flashes">
            {% with messages = get_flashed_messages(with_categories=true) %}
                {% if messages %}
                    {% for category, message in messages %}
                        <div class="alert alert-{{ category }}" role="alert">
                            {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}
            {% endwith %}
        </ul>
    </div>
{% endblock %}
