From 5368c0a8b784948dbe567fffd5d301ec9ab5aa31 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Fri, 18 Dec 2015 12:06:57 -0800 Subject: [PATCH] Actually implement up to 5 blogs in template. The early change to frontpage.py was not sufficient; the template obviously needs to make use of those five blog posts as well. Note the cascading effect here. We only put lots on the front page if they are recent. --- www/conservancy/templates/frontpage.html | 42 +++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/www/conservancy/templates/frontpage.html b/www/conservancy/templates/frontpage.html index 7de5f44a..fca2e701 100644 --- a/www/conservancy/templates/frontpage.html +++ b/www/conservancy/templates/frontpage.html @@ -99,8 +99,48 @@

{{ blog.1.headline|safe }}

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

{{ blog.1.summary|safe }} -

Read More from {{ blog.1.author.casual_name }} on this…

+

Read More from {{ blog.1.author.casual_name }} on this…

{% endif %} +{% if blog.2.is_recent %} +{% if blog.2.pub_date|date_within_past_days:20 %} +
+

{{ blog.2.headline|safe }}

+

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

+{{ blog.1.summary|safe }} +

Read More from {{ blog.2.author.casual_name }} on this…

+{% endif %} +{% endif %} + +{% if blog.3.is_recent %} +{% if blog.3.pub_date|date_within_past_days:15 %} +
+

{{ blog.3.headline|safe }}

+

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

+{{ blog.1.summary|safe }} +

Read More from {{ blog.3.author.casual_name }} on this…

+{% endif %} +{% endif %} + +{% if blog.4.is_recent %} +{% if blog.4.pub_date|date_within_past_days:10 %} +
+

{{ blog.4.headline|safe }}

+

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

+{{ blog.1.summary|safe }} +

Read More from {{ blog.4.author.casual_name }} on this…

+{% endif %} +{% endif %} + +{% if blog.5.is_recent %} +{% if blog.5.pub_date|date_within_past_days:7 %} +
+

{{ blog.5.headline|safe }}

+

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

+{{ blog.1.summary|safe }} +

Read More from {{ blog.5.author.casual_name }} on this…

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

Conservancy Blog Archive…