Update blog templates in an effort to make them XHTML1.1 compliant
[sommitrealweird.git] / sommitrealweird / blog / templates / blog / blog_index.html
1 {% extends "base.html" %}
2 {% load markup %}
3
4 {% block content %}
5     {% if entries %}
6         {% for entry in entries %}
7             <h1>{{ entry.title|escape }}</h1>
8             <div class="blogentry">
9             {{ entry.content|restructuredtext }}
10             </div>
11             <p>Posted: {{ entry.publish_date|date:"Y-m-d H:i" }} in 
12                 {% for section in entry.sections.all %}
13                     {% if forloop.first %}
14                         <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>{% if not forloop.last %}, {% endif %}
15                     {% else %}
16                         {% if forloop.last %}
17                             and <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>
18                         {% else %}
19                             <a href="{{ section.get_abolute_url }}">{{ section.title }}</a>
20                         {% endif %}
21                     {% endif %}
22                 {% endfor %}
23                 <a href="{{ entry.get_absolute_url }}">permalink</a></p>
24         {% endfor %}
25         {% if paginated and has_more_than_one_page %}
26             <p class="paginator">Pages: 
27             {% if has_prev %}
28                 <a href="?page={{ prev }}">Previous</a> |
29             {% endif %}
30             {% for paginator_page in pages %}
31                 {% if forloop.first %}
32                 {% else %}
33                     |
34                 {% endif %}
35                 {% ifequal paginator_page page %}
36                     {{ page }}
37                 {% else %}
38                     <a href="?page={{ paginator_page }}">{{ paginator_page }}</a>
39                 {% endifequal %}
40             {% endfor %}
41             {% if has_next %}
42                 | <a href="?page={{ next }}">Next</a>
43             {% endif %}
44             </p>
45         {% endif %}
46     {% else %}
47         <p>We have no blog entries - that sucks!</p>
48     {% endif %}
49 {% endblock %}