{% extends "base.html" %} {% block content %}
{% load taggit_templatetags2_tags %}
<div class="row">
    <div class="mx-auto">
        <h1>
            Dein Newsfeed ...
        </h1>
    </div>
</div>
<div class="row">
    <div class="col-md-8">
        <div>
            {% for post in posts %}
            <div class="mt-5 post">
                <div class="date">
                    {{ post.published_date }}
                </div>
                <h2>
                    <a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
                </h2>
                <p>{{ post.text|linebreaks }}</p>
                Tags: {% for tag in post.tags.all %}
                <a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
                {% if not forloop.last %}, {% endif %} {% endfor %} <p>
                    {{ post.author }}
                </p>
            </div>
            {% endfor %}
        </div>
    </div>
    <div class="mt-5 col-md-4">
        <div class="float-right">
            <a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
            </a>
        </div>
    </div>

</div>
{% endblock %}