{% from 'pagination.jinja2' import render_pagination %}


{% extends "layout.jinja2" %}

{% block content %}
<div class="content">
    <h1>Cards for {{cards_date | datestring('long')}}</h1>

    <div style="text-center">
        {{render_pagination(pagination, "/cards/" + cards_date)}}
    </div>

    <table class="table table-striped"
        <thead>
            <tr>
                <th>Stroke</th>
                <th>Datetime</th>
            </tr>
        </thead>
        <tbody>
            {%  for card in cards %}
                <tr>
                    <td>{{card.strokeNumber}}</td>
                    <td><a href="/card/view/{{card.strokeNumber}}">{{card.timestamp | datetime('long')}}</a></td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock content %}

{% block card_dates %}
    <h3>Card Dates</h3>
    <ul class="nav nav-sidebar">
    {% for d in datelist %}
        <li><a href="/cards/{{d.date}}">{{d.date}} <span class="badge">{{d.count}}</span></a></li>
    {% endfor %}
    </ul>
{% endblock card_dates %}
