{% include "header.html" %}

<nav aria-label="breadcrumb">
  <ol class="breadcrumb bg-light">
    {% for crumb in crumbs %}
      {% if not loop.last %}
    <li class="breadcrumb-item"><a href="{{ crumb.url }}/">{{ crumb.part }}</a></li>
      {% else %}<li class="breadcrumb-item active" aria-current="page">{{ crumb.part }}</li>
      {% endif %}
    {% endfor %}

    <li class="ml-auto json-link"><a target="_blank" href="{{ url }}?f=json">JSON</a></li>
  </ol>
</nav>

<h1>Collections</h1>

<div class="table-responsive">
  <table class="table" style="width:100%;">
    <thead class="thead-light">
      <tr>
        <th>Title</th>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
{% for collection in response.collections %}
      <tr>
        <td><a href="{{ template.api_root }}/collections/{{ collection.id }}">{{ collection.title or collection.id }}</a></td>
        <td>{{ collection.itemType }}</td>
        <td>{{ collection.description or collection.title or collection.id }}</td>
      </tr>
{% endfor %}
    </tbody>
  </table>
</div>

{% include "footer.html" %}
