{% extends "layouts/default.html" %}
{% block title %}Deck List{% endblock %}
{% block content %}

<form id="deck-search" name="deck-search" method="post" action="/decks/search">
  {{ token | safe }}
</form>

{% include "decks/deck-menu-bar.html" %}

<div class="columns">
  <div class="column is-full">
    <div class="field">
      <label class="label" for="name">Deck Name:</label>
      <div class="control">
        <input class="input"
               form="deck-search"
               id="name"
               name="name"
               value="{{ name }}">
      </div>
    </div>
    <div class="field">
      <div class="control">
        <button class="button"
                form="deck-search"
                type="submit">Search</button>
      </div>
    </div>
  </div>
</div>

{% if decks %}
<ul>
  {% for deck in decks %}
  <li><a href="/decks/{{ deck.id }}/view">{{ deck.id }} - {{ deck.name | capfirst }}</a></li>
  {% endfor %}
</ul>
{% endif %}

{% endblock %}
