{% from 'macros.html' import print_message, display_form_errors %}

<!DOCTYPE html>
<html lang="en">

  <head>
    {% block head %}
      <meta charset="utf-8">
      <title>{% block title %}MetaBrainz Foundation{% endblock %}</title>
      <meta http-equiv="X-UA-Compatible" content="IE=edge" />
      <meta name="viewport" content="width=device-width, initial-scale=1" />

      <link rel="icon" sizes="16x16" href="{{ url_for('oauth2.static', filename='img/favicon-16.png') }}" type="image/png" />
      <link rel="icon" sizes="32x32" href="{{ url_for('oauth2.static', filename='img/favicon-32.png') }}" type="image/png" />
      <link rel="icon" sizes="64x64" href="{{ url_for('oauth2.static', filename='img/favicon-64.png') }}" type="image/png" />
      <link rel="icon" sizes="128x128" href="{{ url_for('oauth2.static', filename='img/favicon-128.png') }}" type="image/png" />
      <link rel="icon" sizes="256x256" href="{{ url_for('oauth2.static', filename='img/favicon-256.png') }}" type="image/png" />

      {# The css file has a .less extension in the manifest file entry (due to its original name in Webpack entry) #}
      <link href="{{ get_static_path('main.less') }}" rel="stylesheet" media="screen" />
    {% endblock %}
  </head>

  <body>
    {% include 'navbar.html' %}

    <div class="container">
      
      {% with messages = get_flashed_messages(with_categories=true) %}
        {% for category, message in messages %}
          {{ print_message(message, category) }}
        {% endfor %}
      {% endwith %}

      {% block content %}
        <!-- Page content -->
      {% endblock %}

      {% block footer %}
      {% endblock %}

    </div>

    {% block scripts %}
      <script src="{{ url_for('oauth2.static', filename='js/lib/jquery-2.1.1.min.js') }}"></script>
      <script src="{{ url_for('oauth2.static', filename='js/lib/bootstrap.min.js') }}"></script>
    {% endblock %}

  </body>

</html>
