27 lines
689 B
HTML
27 lines
689 B
HTML
{% extends 'blog/base.html' %}
|
|
{% load pagination_tags %}
|
|
{% block content %}
|
|
|
|
<div id="posts">
|
|
{% for post in posts %}
|
|
<div class="post">
|
|
<div class="post-header">
|
|
<h2><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h2>
|
|
<div class="date">{{ post.published_date}}</div>
|
|
</div>
|
|
{{ post.text|safe|linebreaksbr|truncatewords:80 }} <!--|linebreaksbr|truncatewords:80 }}</p--><br>
|
|
<p>
|
|
{% if post.tags.names %}
|
|
Tags:
|
|
{% for tag in post.tags.names %}
|
|
<a href="{% url 'search_by_tag' tag=tag%}">{{ tag }}</a>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock content %}
|