{% load humanize %}
{% load cms_tags %}
<div class="ui container blog-content" id="blog-content">
    <h2 class="blog-title">{{ instance.title }}</h2>
    {% for post in instance.get_posts %}
    <article class="post">
        <h3 class="post-title">
            <a href="/{{post.blog.slug}}/{{post.slug}}">{{post.title}}</a>
        </h3>
        <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.profile_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 %}
</div>



