{% load humanize %}

{% for post in object.get_posts %}
<article class="post">
    <h2 class="post-title">
        <a href="/{{post.blog.slug}}/{{post.slug}}">{{post.title}}</a>
    </h2>
    <p class="post-description">{{post.description}}</p>
    <div class="post-meta">
        <a class="post-meta__user" href="/author/{{post.author.slug}}">
            <img class="ui avatar image" src="{{post.author.image.url}}">{{post.author.user.username}}</a>
        {% for tag in post.get_tags %}
        <a href="/{{post.blog.slug}}/tag/{{tag.slug}}/" class="ui {{tag.color}} label">
            {{tag.name}}
            <div class="detail">{{tag.get_post_count}}</div>
        </a>
        {% endfor %}
        <div class="post-meta__time">{{ post.published_date|naturaltime }}</div>
    </div>
    <div class="ui divider"></div>
</article>
{% endfor %}