summaryrefslogtreecommitdiffstats
path: root/templates/blog/posts.html
blob: d9bc72dddcb841ca453b3be087cc94eaf2ffc847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!-- -*- Mode: django-html-mumamo -*- -->

{% extends "blog/base.html" %}

{% block content %}
  {% if postlist %}
    {% for post in postlist %}
      <div class="container">
	<div class="header">
	  <a href="/blog/post/{{ post.pk }}/">
	     <span class="title">{{ post.subject }}</span>
	  </a>
	</div>
	{% autoescape off %}
	{{ post.body|linebreaksbr }}
	{% endautoescape %}
	<div class="footer">
	  Date posted: {{ post.postdate|date:"r" }}
	  Tags:
	  {% for tag in post.tags.all %}
	    {% if forloop.counter > 1 %}, {% endif %}
	    <a href="/blog/tag/{{ tag.name }}">{{ tag.name }}</a>
	  {% empty %}
	    None
	  {% endfor %}
	</div>
      </div>
    {% endfor %}

    <div class="navigation">
      {% if has_next %}
        <a class="next" href="/blog/{{ next_page }}/">next</a>
      {% endif %}

      {% if has_previous %}
        <a class="previous" href="/blog/{{ previous_page }}/">previous</a>
      {% endif %}
    </div>
  {% else %}
    Yeah I know, I'm boring.
  {% endif %}
{% endblock %}