{% extends "base.html" %}
{% load i18n staticfiles %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <h1>{% trans "The blog of Example.com" %}</h1>

        {% for post in post_list %}
            <h3>
                <a href="{% url 'blog_detail' post.pk %}">
                    {{ post.title }}
                </a>
            </h3>
            {% if post.published %}
                <p>
                    {{ post.body }}
                </p>
            {% else %}
                {% url 'home' as home_url %}
                <p>
                    {% blocktrans %}Unpublished - Choose an <a href="{{ home_url }}">admin</a> tool and publish it.{% endblocktrans %}
                </p>
            {% endif %}
        {% empty %}
            <h3>{% trans "No Content Yet!" %}</h3>
            <p>
                {% url 'home' as home_url %}
                {% blocktrans %}Choose an <a href="{{ home_url }}">admin</a> tool and add content.{% endblocktrans %}
            </p>
        {% endfor %}
    </div>
</div>
{% endblock %}