{% extends 'base.html.twig' %}

{% block title %}Photography | Alex Daniels{% endblock %}

{% block body %}
    <h2>Photography</h2>
    <div class="photos">
        {% if app.user %}
            <div class="admin-actions">
                <a href="/brain/photos/new">Add New Album</a>
            </div>
        {% endif %}
        <ul class="albums">
        {% for album in photos %}
            <li class="album">
                <a href="/photos/{{album['url']}}">
                    <h3 class="title">{{album['title']}}</h3>
                    <img src="{{asset(album['thumbnail'])}}" alt="{{ album['title'] ~ 'Thumbnail'}}">
                    <p class="date">{{album['date']|date('l M d Y')}}</p>
                    <div class="overlay"></div>
                </a>
            </li>
        {% endfor %}
    </div>
{% endblock body %}