From 79140d46a5c8fedf9a8d4e7cf8c791b27ad2264d Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 4 Oct 2010 09:52:04 -0400 Subject: [PATCH] Added blog templates. --- www/conservancy/templates/base_blog.html | 30 ++++++++ .../templates/blog/entry_archive_day.html | 20 +++++ .../templates/blog/entry_archive_month.html | 20 +++++ .../templates/blog/entry_archive_year.html | 16 ++++ .../templates/blog/entry_detail.html | 16 ++++ .../templates/blog/entry_list.html | 38 ++++++++++ www/conservancy/templates/blog/query.html | 75 +++++++++++++++++++ 7 files changed, 215 insertions(+) create mode 100644 www/conservancy/templates/base_blog.html create mode 100644 www/conservancy/templates/blog/entry_archive_day.html create mode 100644 www/conservancy/templates/blog/entry_archive_month.html create mode 100644 www/conservancy/templates/blog/entry_archive_year.html create mode 100644 www/conservancy/templates/blog/entry_detail.html create mode 100644 www/conservancy/templates/blog/entry_list.html create mode 100644 www/conservancy/templates/blog/query.html diff --git a/www/conservancy/templates/base_blog.html b/www/conservancy/templates/base_blog.html new file mode 100644 index 00000000..d5c1ff47 --- /dev/null +++ b/www/conservancy/templates/base_blog.html @@ -0,0 +1,30 @@ +{% extends "base_standard.html" %} + +{% block category %}blog{% endblock %} + +{% block head %} + +{% endblock %} + +{% block internal_navigate %} + +

Authors

+ + +

Tags

+ + +

All posts...

+

Query...

+ +{% endblock %} diff --git a/www/conservancy/templates/blog/entry_archive_day.html b/www/conservancy/templates/blog/entry_archive_day.html new file mode 100644 index 00000000..7c607ad7 --- /dev/null +++ b/www/conservancy/templates/blog/entry_archive_day.html @@ -0,0 +1,20 @@ +{% extends "base_blog.html" %} + +{% block subtitle %}Conservancy Blog Archive: {{ day|date:"F j, Y" }} - {% endblock %} + +{% block content %} + +

Conservancy Blog Archive: {{ day|date:"F j, Y" }}

+ +{% for object in object_list %} +
+

{{ object.pub_date|date:"F j, Y" }}

+

{{ object.headline|safe }}

+ {{ object.summary|safe }} +

Read More...

+

Posted by {{ object.author.formal_name }} on {{ object.pub_date|date:"F j, Y" }}

+ {% if object.tags.all %}

Tags: {% for tag in object.tags.all %}{{ tag.label }}{% if not forloop.last %}, {% endif %}{% endfor %}

{% endif %} +
+{% endfor %} + +{% endblock %} diff --git a/www/conservancy/templates/blog/entry_archive_month.html b/www/conservancy/templates/blog/entry_archive_month.html new file mode 100644 index 00000000..e298a46d --- /dev/null +++ b/www/conservancy/templates/blog/entry_archive_month.html @@ -0,0 +1,20 @@ +{% extends "base_blog.html" %} + +{% block subtitle %}Conservancy Blog Archive: {{ month|date:"F, Y" }} - {% endblock %} + +{% block content %} + +

Conservancy Blog Archive: {{ month|date:"F, Y" }}

+ +{% for object in object_list %} +
+

{{ object.pub_date|date:"F j, Y" }}

+

{{ object.headline|safe }}

+ {{ object.summary|safe }} +

Read More...

+

Posted by {{ object.author.formal_name }} on {{ object.pub_date|date:"F j, Y" }}

+ {% if object.tags.all %}

Tags: {% for tag in object.tags.all %}{{ tag.label }}{% if not forloop.last %}, {% endif %}{% endfor %}

{% endif %} +
+{% endfor %} + +{% endblock %} diff --git a/www/conservancy/templates/blog/entry_archive_year.html b/www/conservancy/templates/blog/entry_archive_year.html new file mode 100644 index 00000000..76628ce5 --- /dev/null +++ b/www/conservancy/templates/blog/entry_archive_year.html @@ -0,0 +1,16 @@ +{% extends "base_blog.html" %} + +{% block subtitle %}Conservancy Blog Archive: {{ year }} - {% endblock %} + +{% block content %} + +

Conservancy Blog Archive: {{ year }}

+ + + +{% endblock %} diff --git a/www/conservancy/templates/blog/entry_detail.html b/www/conservancy/templates/blog/entry_detail.html new file mode 100644 index 00000000..45a86e6e --- /dev/null +++ b/www/conservancy/templates/blog/entry_detail.html @@ -0,0 +1,16 @@ +{% extends "base_blog.html" %} + +{% block subtitle %}{{ object.headline|striptags }} - Conservancy Blog - {% endblock %} + +{% block content %} + +

{{ object.pub_date|date:"F j, Y" }} by {{ object.author.formal_name }}

+

{{ object.headline|safe }}

+{{ object.body|safe }} +

Posted by {{ object.author.formal_name }} on {{ object.pub_date|date:"F j, Y" }}. Please email any comments on this entry to press@softwarefreedom.org.

+ +{% if object.tags.all %}

Tags: {% for tag in object.tags.all %}{{ tag.label }}{% if not forloop.last %}, {% endif %}{% endfor %}

{% endif %} + +

Other Conservancy Blog entries...

+ +{% endblock %} diff --git a/www/conservancy/templates/blog/entry_list.html b/www/conservancy/templates/blog/entry_list.html new file mode 100644 index 00000000..d63cc040 --- /dev/null +++ b/www/conservancy/templates/blog/entry_list.html @@ -0,0 +1,38 @@ +{% extends "base_blog.html" %} +{% block subtitle %}Conservancy Blog - {% endblock %} + +{% block content %} + +

[RSS] Conservancy Blog{% if author %} — {{ author.formal_name }}{% endif %}

+ +{% if authors or tags %} +

Displaying posts +{% if authors %}by {% for author in authors %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}{{ author.formal_name }}{% ifequal forloop.revcounter 2 %} and {% endifequal %}{% endfor %}{% endif %} +{% if tags %}tagged {% for tag in tags %}{% if not forloop.last %}{% if not forloop.first %}, {% endif %}{% endif %}{{ tag.label }}{% ifequal forloop.revcounter 2 %} or {% endifequal %}{% endfor %}{% endif %} +

+{% endif %} + +{% for object in object_list %} +
+

{{ object.pub_date|date:"F j, Y" }} by {{ object.author.formal_name }}

+

{{ object.headline|safe }}

+ {{ object.body|safe }} +

Posted by {{ object.author.formal_name }} on {{ object.pub_date|date:"F j, Y" }}

+ {% if object.tags.all %}

Tags: {% for tag in object.tags.all %}{{ tag.label }}{% if not forloop.last %}, {% endif %}{% endfor %}

{% endif %} +
+{% endfor %} + +

+{% if has_next %}Next page (older) »{% endif %} +{% if has_previous %}« Previous page (newer){% endif %} +

+
+ +{% if date_list %} +

Index by date

+ +{% endif %} + +{% endblock %} diff --git a/www/conservancy/templates/blog/query.html b/www/conservancy/templates/blog/query.html new file mode 100644 index 00000000..661700b4 --- /dev/null +++ b/www/conservancy/templates/blog/query.html @@ -0,0 +1,75 @@ +{% extends "base_blog.html" %} +{% block subtitle %}Conservancy Blog Query - {% endblock %} + +{% block head %} + + + +{% endblock %} + +{% block content %} + +
+ +

Return posts written by any of these authors...

+ +
+ +

+ +
+{% for author in authors %} + {% cycle ,,
%} +{% endfor %} +
+ +
+ +

marked with any of these tags...

+ +
+ +

+ +
+{% for tag in tags %} + {% cycle ,,
%} +{% endfor %} +
+ +
+ +

+

+ +
+ +{% endblock %} + +{# get rid of side bar #} +{% block internal_navigate %}{% endblock %}