{% extends 'news/base.html' %}
{% load staticfiles seo_tags %}
{% block seo %}
    {% seo post_list.first.category %}
{% endblock seo %}
{% block post %}
    <div class="posts sidemeta">
        {% for post in post_list %}
            <div class="post format-image">
                <div class="date-wrapper">
                    <div class="date">
                        <span class="month">{{ post.published_date|date:"M" }}</span>
                        <span class="day">{{ post.published_date|date:"d" }}</span>
                    </div>
                </div>
                <div class="post-content">
                    <div class="post-media">
                        {% if post.image %}
                            <img src="{{ post.image.image.url }}" alt="{{ post.image.captions }}">
                        {% else %}
                            <img src="{% static 'images/blog-post/blog-post-image.jpg' %}" alt="">
                        {% endif %}
                    </div>
                    <h2 class="post-title">{{ post.title }}</h2>
                    <ul class="meta">
                        {% if post.author %}
                            <li>{{ post.author }}</li>{% endif %}
                        <li><a href="{{ post.category.get_absolute_url }}">{{ post.category }}</a></li>
                        <li><a href="#">{{ post.comments_set.all.count }} Комментариев</a></li>
                    </ul>
                    <p>{{ post.mini_text|safe }}</p>
                    <a href="{{ post.get_absolute_url }}" class="le-button huge">Читать</a>
                </div>
            </div>
        {% endfor %}
    </div>

    <hr/>
    <div>
        {% if is_paginated %}
            {% include 'base/includes/pagination.html' %}
        {% endif %}
    </div>

{% endblock post %}