diff options
author | Tom Willemsen | 2011-10-17 01:34:04 +0200 |
---|---|---|
committer | Tom Willemsen | 2011-10-17 01:34:04 +0200 |
commit | 4b29603d79cc1f79c66786684f27ec9abfbaa825 (patch) | |
tree | 655c321b7ee3b0cc919ab3b7bf937b50fc13c69c /templates/blog | |
download | dotfiles-4b29603d79cc1f79c66786684f27ec9abfbaa825.tar.gz dotfiles-4b29603d79cc1f79c66786684f27ec9abfbaa825.zip |
Initial commit
Diffstat (limited to 'templates/blog')
-rw-r--r-- | templates/blog/base.html | 5 | ||||
-rw-r--r-- | templates/blog/posts.html | 42 | ||||
-rw-r--r-- | templates/blog/tags.html | 19 |
3 files changed, 66 insertions, 0 deletions
diff --git a/templates/blog/base.html b/templates/blog/base.html new file mode 100644 index 0000000..2eadc88 --- /dev/null +++ b/templates/blog/base.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block subtitle %} + blog +{% endblock %} diff --git a/templates/blog/posts.html b/templates/blog/posts.html new file mode 100644 index 0000000..d9bc72d --- /dev/null +++ b/templates/blog/posts.html @@ -0,0 +1,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 %} diff --git a/templates/blog/tags.html b/templates/blog/tags.html new file mode 100644 index 0000000..a180634 --- /dev/null +++ b/templates/blog/tags.html @@ -0,0 +1,19 @@ +<!-- -*- Mode: django-html-mumamo -*- --> + +{% extends "blog/base.html" %} + +{% block subtitle %} + blog/tags +{% endblock %} + +{% block content %} + <ul> + {% for tag in taglist %} + <li> + <a href="/blog/tag/{{ tag.name }}">{{ tag.name }}</a> + </li> + {% empty %} + Sorry, no tags here. + {% endfor %} + </ul> +{% endblock %} |