<div id="MainMenu">
  <div class="text-center mb-4">
    <a href="/">
      <img src="{{ url_for('static', filename='img/bigslice_logo.png') }}" class="img-fluid">
    </a>
  </div>
  <div class="list-group panel">
    {% for nav_item in nav_items %}
      {% if nav_item[1] is string %}
        <a href="{{ nav_item[1] }}" class="list-group-item list-group-item-info list-group-item-action {{ 'active' if request.path.split('/')[1] == nav_item[1].split('/')[1] else '' }}" data-parent="#MainMenu">{{ nav_item[0] }}</a>
      {% else %}
        <a href="#SubMenu-{{ nav_item[0].replace(' ', '-') }}" class="list-group-item list-group-item-info list-group-item-action" data-toggle="collapse" data-parent="#MainMenu">{{ nav_item[0] }}</a>
        <div class="collapse list-group-submenu {{'show' if request.path.split('/')[1] == nav_item[1][0][1].split('/')[1] else 'collapsed' }}" id="SubMenu-{{ nav_item[0].replace(' ', '-') }}">
          {% for nav_sub in nav_item[1] %}
            <a href="{{ nav_sub[1] }}" class="list-group-item list-group-item-secondary list-group-item-action {{ 'active' if request.path.startswith(nav_sub[1]) else '' }}" data-parent="#SubMenu-{{ nav_item[0].replace(' ', '-') }}">{{ nav_sub[0] }}</a>
          {% endfor %}
        </div>
      {% endif %}
    {% endfor %}
  </div>
  <div class="text-center mt-4">
    App version: {{ g["version"] }} <br />
    License:
    <a href="https://github.com/medema-group/bigslice/blob/master/LICENSE.txt">
      <img src="{{ url_for('static', filename='img/agplv3_logo.png') }}">
    </a>
  </div>
</div>