<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--<meta name="viewport" content="width=fluid-width, initial-scale=1, shrink-to-fit=no">-->
    <title>{% block title %}MusicBot{% endblock %}</title>
    <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" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
    <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://cdnjs.cloudflare.com/ajax/libs/URI.js/1.19.0/URI.min.js" 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>
    <link rel="stylesheet" type="text/css" href="/static/musicbot.css">
    <script src="/static/musicbot.js"></script>
    <link rel="icon" href="/static/favicon.ico">
  </head>
  <body>
    <nav class="fixed-top navbar navbar-expand-lg navbar-light bg-primary">
      <a class="navbar-brand" href="/">MusicBot</a>
      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item active">
            <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Favorite
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{{ url_for('collection.player', shuffle=1, filter="no rating", autoplay=1) }}">No Rating</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', no_artists="Buckethead", keywords="best", shuffle=1, autoplay=1) }}">Best</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', shuffle=1, filter="best (5.0+)", autoplay=1) }}">Bests (5.0+)</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', shuffle=1, filter="best (4.5+)", autoplay=1) }}">Bests (4.5+)</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', shuffle=1, filter="best (4.0+)", autoplay=1) }}">Bests (4.0+)</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', artists="Buckethead", min_rating="5.0", shuffle=1, autoplay=1) }}">Buckethead (5.0+)</a>
              <a class="dropdown-item" href="{{ url_for('collection.player', artists="Buckethead", keywords="best", shuffle=1, autoplay=1) }}">Buckethead (best)</a>
            </div>
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Collection
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{{ url_for('collection.musics') }}">Musics</a>
              <a class="dropdown-item" href="{{ url_for('collection.artists') }}">Artists</a>
              <a class="dropdown-item" href="{{ url_for('collection.albums') }}">Albums</a>
              <a class="dropdown-item" href="{{ url_for('collection.genres') }}">Genres</a>
              <a class="dropdown-item" href="{{ url_for('collection.keywords') }}">Keywords</a>
              <a class="dropdown-item" href="{{ url_for('collection.generate') }}">Playlist</a>
              <a class="dropdown-item" href="{{ url_for('collection.filters') }}">Filters</a>
            </div>
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Folders
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{{ url_for('collection.folders') }}">List</a>
              <a class="dropdown-item" href="{{ url_for('collection.rescan') }}">Rescan</a>
            </div>
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Utilities
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{{ url_for('collection.stats') }}">Stats</a>
              <a class="dropdown-item" href="{{ url_for('collection.consistency') }}">Consistency</a>
              <a class="dropdown-item" href="{{ url_for('collection.refresh') }}">Refresh DB</a>
              <a class="dropdown-item" href="{{ url_for('collection.youtube') }}">Crawl YouTube</a>
              <a class="dropdown-item" href="{{ url_for('collection.schedule') }}">Schedule all jobs</a>
            </div>
          </li>

          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              API
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="{{ url_for('api_v1.stats') }}">Stats</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.musics') }}">Musics</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.artists') }}">Artists</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.albums') }}">Albums</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.genres') }}">Genres</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.keywords') }}">Keywords</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.playlist') }}">Playlist</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.filters') }}">Filters</a>
              <a class="dropdown-item" href="{{ url_for('api_v1.folders') }}">Folders</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="/swagger">Swagger</a>
            </div>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Help
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <a class="dropdown-item" href="https://github.com/AdrienPensart/musicbot">GitHub</a>
              <a class="dropdown-item" href="https://github.com/AdrienPensart/musicbot/issues">Feedback / bugs</a>
              <div class="dropdown-divider"></div>
              <a class="nav-link disabled" href="#">Rendered in {{ request_time() }}</a>
            </div>
          </li>
        </ul>
        <form class="form-inline" action="/action_page.php" method="get" role="search">
          <div class="form-check mb-2 mr-sm-2 mb-sm-0">
            <input id="limit" class="form-control form-check-input" type="number" min="0" step="1" placeholder="Playlist length">
            <input id="volume" class="form-control form-check-input" type="number" min="0" max="100" step="1" placeholder="Volume">

            <input id="shuffle" class="form-control form-check-input" type="checkbox">
            <label class="form-check-label">Shuffle&nbsp;</label>

            <input id="loop" class="form-control form-check-input" type="checkbox">
            <label class="form-check-label">Loop&nbsp;</label>

            <input id="lives" class="form-control form-check-input" type="checkbox">
            <label class="form-check-label">No lives&nbsp;</label>

            <input id="autoplay" class="form-control form-check-input" type="checkbox">
            <label class="form-check-label">Autoplay</label>
          </div>
        </form>
      </div>
    </nav>
    <div class="container-music container-fluid">
      <div class="p-1">
        {% with messages = get_flashed_messages() %}
          {% if messages|count %}
            <ul class="flashes">
            {% for message in messages %}
              <li>{{ message }}</li>
            {% endfor %}
            </ul>
          {% endif %}
        {% endwith %}
        {% block body %}{% endblock %}
      </div>
    </div>
  </body>
</html>
