<!DOCTYPE html>
<html>

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
    integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

  <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css')}}">

  {% block custom_css %}{% endblock %}



  {% if title %}
  <title>Mortimer - {{ title }}</title>
  {% else %}
  <title>Mortimer</title>
  {% endif %}
</head>

<body>
  <div id="page-container" style="position: relative; min-height: 85vh;">
    <header class="site-header">
      <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
        <div class="container">
          <a class="navbar-brand mr-4" href="/">Mortimer</a>
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle"
            aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarToggle">
            <div class="navbar-nav mr-auto">
              <a class="nav-item nav-link" href="{{ url_for('main.home') }}">Home</a>
            </div>
            <!-- Navbar Right Side -->
            <div class="navbar-nav">
              {% if current_user.is_authenticated %}
              <a class="nav-item nav-link" href="{{ url_for('users.account') }}">Account</a>
              <a class="nav-item nav-link" href="{{ url_for('users.logout') }}">Log out</a>
              {% else %}
              <a class="nav-item nav-link" href="{{ url_for('users.login') }}">Log in</a>
              <a class="nav-item nav-link" href="{{ url_for('users.register') }}">Register
                {% endif %}
              </a>


            </div>
          </div>
        </div>
      </nav>
    </header>


    <main role="main" class="container" style="padding-bottom: 2.5rem;">
      <div class="row">
        <div class="col-md-3">
          <div class="content-section">
            <h3>Navigation</h3>
            <p class='text-muted'>What would you like to do?
              <ul class="list-group">
                {% if current_user.is_authenticated %}
                <li class="list-group-item list-group-item-light"><a class="nav-link p-0"
                    href="{{ url_for('web_experiments.user_experiments', username=current_user.username) }}">Web
                    Experiments</a></li>
                <li class="list-group-item list-group-item-light"><a class="nav-link p-0"
                    href="{{ url_for('local_experiments.user_experiments', username=current_user.username) }}">Local
                    Experiments</a></li>
                {% else %}
                <li class="list-group-item list-group-item-light"><a class="nav-link p-0"
                    href="{{ url_for('web_experiments.experiments') }}">Web Experiments</a></li>
                <li class="list-group-item list-group-item-light"><a class="nav-link p-0"
                    href="{{ url_for('local_experiments.experiments') }}">Local Experiments</a></li>
                {% endif %}
              </ul>
            </p>
          </div>
        </div>
        <div class="col-md-9">
          {% with messages = get_flashed_messages(with_categories=true) %}
          {% if messages %}
          {% for category, message in messages %}
          <div class="alert alert-{{ category }}">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              &times;
            </button>
            {{ message }}
          </div>
          {% endfor %}
          {% endif %}
          {% endwith %}
          {% block content %}{% endblock %}
        </div>

      </div>
    </main>

    <footer id="footer" style="position: absolute; bottom: 0; width: 100%; height: 2.5rem;">
      <div style="text-align:center" class="small text-muted">
        <a href="{{ url_for('main.impressum') }}">Impressum</a>
      </div>
    </footer>


    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
      integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
      crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
      integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
      crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
      integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
      crossorigin="anonymous"></script>

    {% block custom_js %}{% endblock %}

  </div>

</body>



</html>