{% load embed_video_tags %}
<div class="col-12">
    <div class="small-picture-wide-title">
        Twoje dodane prezentacje
    </div>
</div>
<div class="col-12">
    <div class="small-picture-wide-container">
        {% for answer in answers.all %}
            <a href="{% url 'tasks:task-submit-detail' task_answer_id=answer.id task_answer_slug=answer.slug %}">
                <div class="small-picture-wide">
                    <div class="small-picture-wide__image">
                        {% if answer.video_2 %}
                            {% video answer.video_2 as answer_video %}
                                <img src="{{ answer_video.thumbnail }}"
                                     alt="{{ answer.custom_title }}">
                            {% endvideo %}
                        {% elif answer.video_1 %}
                            {% video answer.video_1 as answer_video %}
                                <img src="{{ answer_video.thumbnail }}"
                                     alt="{{ answer.custom_title }}">
                            {% endvideo %}
                        {% endif %}
                    </div>
                    <div class="small-picture-wide__text">
                        <div class="small-picture-wide__text__description">
                            {{ answer.custom_title }}
                        </div>
                        <div class="small-picture-wide__text__category">
                            {{ answer.task.subtitle }}
                        </div>
                        <div class="small-picture-wide__text__date">
                            {{ answer.created|date:'d E Y' }}
                        </div>
                    </div>
                </div>
            </a>
        {% endfor %}
    </div>
</div>
