{# Recipe Index page #}
{% extends  '_layout' %}

{% block main %}
    <div class="page-title">
        <h2>Our Latest Brew Recipes</h2>

        <p>That's right, you can brew our brews at home. We don't care. Bring some in for us to try and we'll compare.
            If yours is better, we'll hire you. On the spot. No kidding. Just ask our brew master.</p>
    </div>
    <div class="large-12 small-12 columns">
        <table width="100%">
            <tr>
                <th>Beer Name</th>
                <th>Original Brew Date</th>
                <th>Style</th>
            </tr>
            {% for entry in craft.entries.section('recipes') %}
                {% set categories = entry.style %}
                <tr>
                    <td><a href="{{ entry.url }}">{{ entry.title }}</a></td>
                    <td>{{ entry.originalBrewDate | date('F Y') }}</td>
                    <td>{%  for category in categories %}<a href="{{ category.url }}">{{ category.title }}</a>{% endfor %}</td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock %}