<!DOCTYPE html>
{% set fluid = False %}
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="Description" content="Free and open source qualitative research tool">
    <link rel="stylesheet" href="{{ static_url('css/custom.css') }}">
    <link rel="stylesheet" href="{{ static_url('css/fa-all.min.css') }}">
    <link rel="stylesheet" href="{{ static_url('css/bootstrap.min.css') }}">
    <title>{% block title %}Taguette{% endblock %}</title>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
      <div class="container">
        <a class="navbar-brand special-brand" href="{{ reverse_url('index') }}"><span style="font-family:BadScript;">TAGUETTE</span></a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbar">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item">
              <a class="nav-link {{ 'active' if active_page == 'index' else '' }}" href="{{ reverse_url('index') }}">{% trans %}Home{% endtrans %}</a>
            </li>
            {% if project %}
            <li class="nav-item">
              <a class="nav-link {{ 'active' if active_page == 'project' else '' }} project-name" href="{{ reverse_url('project', project.id) }}">{{ project.name }}</a>
            </li>
            {% endif %}
          </ul>
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              {% set external_icon %}<i class="fas fa-external-link-alt"></i>{% endset %}
              <a class="nav-link" href="https://www.taguette.org/getting-started.html">{% trans %}Taguette Guide {{ external_icon }}{% endtrans %}</a>
            </li>
            {% if not multiuser %}
            <li class="nav-item">
              <a class="nav-link disabled">{% trans %}Single-user mode{% endtrans %}</a>
            </li>
            {% elif current_user %}
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle {{ 'active' if active_page == 'account' else '' }}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% trans %}Account{% endtrans %}</a>
              <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                <a class="dropdown-item {{ 'active' if active_page == 'account' else '' }}" href="{{ reverse_url('account') }}">{% trans %}Settings{% endtrans %}</a>
                {% if tos %}
                <a class="dropdown-item" href="{{ reverse_url('tos') }}">{% trans %}Terms of Service{% endtrans %}</a>
                {% endif %}
                <a class="dropdown-item" href="{{ reverse_url('logout') }}">{% trans %}Log out{% endtrans %}</a>
              </div>
            </li>
            {% else %}
            <li class="nav-item {{ 'active' if active_page == 'login' else '' }}">
              <a class="nav-link" href="{{ reverse_url('login') }}">{# TRANSLATORS: Link to form #}{% trans %}Log in{% endtrans %}</a>
            </li>
            {% endif %}
          </ul>
        </div>
      </div>
    </nav>

    <div class="{% block containerclass %}container{% endblock %} container-body">
      {% block contents %}{% endblock %}

      <footer class="footer">
        <hr/>
        <div class="container">
          <p>{% trans %}Taguette {{ version }} is released under a <a href="https://gitlab.com/remram44/taguette/blob/master/LICENSE.txt">BSD-3-Clause license</a>, &#169; Rémi Rampin and Taguette contributors | <a href="https://www.taguette.org/getting-started.html">User Documentation</a> | Please report issues via <a href="https://gitlab.com/remram44/taguette">GitLab</a> or <a href="mailto:hi@taguette.org">hi@taguette.org</a>!{% endtrans %}</p>
        </div>
      </footer>
    </div>

    <script src="{{ static_url('js/jquery-3.3.1.min.js') }}"></script>
    <script src="{{ static_url('js/bootstrap.bundle.min.js') }}"></script>
  </body>
</html>
