<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
  <title>STARK</title>

  <!-- CSS  -->
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link href="/static/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link href="/static/css/nouislider.css" type="text/css" rel="stylesheet" media="screen,projection"/>
  <link href="/static/css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body>
  <nav class="grey darken-2" role="navigation">
    <div class="nav-wrapper container"><a id="logo-container" href="/" class="brand-logo">STARK</a>
      <ul id="nav-mobile" class="right hide-on-med-and-down">
        <li><a href="/about">About</a></li>
      </ul>
    </div>
  </nav>
  <div class="container">
    <br>
    <div class="row">
      <div class="col s12">
        <form action="{{ url_for('result', result_id=request.view_args['result_id']) }}" method="POST" enctype="multipart/form-data" id="submit-form">
          <button class="btn waves-effect waves-light btn-large" type="submit" name="action">Download complete results
            <i class="material-icons right">download</i>
          </button>
        </form>
      </div>
    </div>

      <!-- Your table with many columns -->
      <div class="table-wrapper">
        <table>
          <thead>
            <tr>
              {% for head in head_row %}
                {% if not head == 'Grew-match URL' %}
              <th><span>{{ head }} </span><span class="th-desc">&#x25be;</span><span class="th-asc">&#x25b4;</span></th>
                {% endif %}
              {% endfor %}
            </tr>
          </thead>
          <tbody>
            {% for i in range(content['Tree']|length) %}
            <tr {% if 'Grew-match URL' in content %} class="tr-link" data-href={{ content['Grew-match URL'][i] }} {% endif %}>
              {% for col in content %}
                {% if not col == 'Grew-match URL' %}
              <td>{{ content[col][i] }}</td>
                {% endif %}
              {% endfor %}
            </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
  </div>

  <footer class="page-footer light-blue">
    <div class="container">
      <div class="row">
        <div class="col l6 s12">
          <h5 class="white-text">Credits</h5>
          <p class="grey-text text-lighten-4">Add some logos here?</p>


        </div>
      </div>
    </div>
    <div class="footer-copyright">
      <div class="container">
      Made by <a class="orange-text text-lighten-3" href="http://materializecss.com">Materialize</a>
      </div>
    </div>
  </footer>


  <!--  Scripts-->
  <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  <script src="/static/js/materialize.js"></script>
  <script src="/static/js/wNumb.js"></script>
  <script src="/static/js/result.js"></script>
  </body>
</html>