]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/blog/templates/blog/blog_index.html
f7f3ab0373d0a588f7734cfe1281e5ec6dda6db7
[sommitrealweird.git] / sommitrealweird / blog / templates / blog / blog_index.html
1 {% extends "base.html" %}
2 {% load xhtml11rst %}
3
4 {% block extrahead %}
5 <link rel="alternate" type="application/atom+xml" title="iDunno's Blog - Atom Feed" href="{{ BLOG_FEED_ROOT }}/blog/" />
6 <link rel="alternate" type="application/rss+xml" title="iDunno's Blog - RSS Feed" href="{{ BLOG_FEED_ROOT }}/blog/rss/" />
7 {% endblock %}
8
9 {% block content %}
10     {% if entries %}
11         {% for entry in entries %}
12             <h1>{{ entry.title|escape }}</h1>
13             <div class="blogentry">
14             {{ entry.content|restructuredtext }}
15             </div>
16             <p>Posted: {{ entry.publish_date|date:"Y-m-d H:i" }} in 
17                 {% for section in entry.sections.all %}
18                     {% if forloop.first %}
19                         <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>{% if not forloop.last %}, {% endif %}
20                     {% else %}
21                         {% if forloop.last %}
22                             and <a href="{{ section.get_absolute_url }}">{{ section.title }}</a>
23                         {% else %}
24                             <a href="{{ section.get_abolute_url }}">{{ section.title }}</a>
25                         {% endif %}
26                     {% endif %}
27                 {% endfor %}
28                 <a href="{{ entry.get_absolute_url }}">permalink</a></p>
29         {% endfor %}
30         {% if paginated and has_more_than_one_page %}
31             <p class="paginator">Pages: 
32             {% if has_prev %}
33                 <a href="?page={{ prev }}">Previous</a> |
34             {% endif %}
35             {% for paginator_page in pages %}
36                 {% if forloop.first %}
37                 {% else %}
38                     |
39                 {% endif %}
40                 {% ifequal paginator_page page %}
41                     {{ page }}
42                 {% else %}
43                     <a href="?page={{ paginator_page }}">{{ paginator_page }}</a>
44                 {% endifequal %}
45             {% endfor %}
46             {% if has_next %}
47                 | <a href="?page={{ next }}">Next</a>
48             {% endif %}
49             </p>
50         {% endif %}
51     {% else %}
52         <p>We have no blog entries - that sucks!</p>
53     {% endif %}
54 {% endblock %}