From 5368c0a8b784948dbe567fffd5d301ec9ab5aa31 2015-12-18 20:06:57 From: Bradley M. Kuhn Date: 2015-12-18 20:06:57 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. --- diff --git a/www/conservancy/templates/frontpage.html b/www/conservancy/templates/frontpage.html index 7de5f44aaa68c4e5f8e9a8d7c6ef30a9ccc422ca..fca2e701a93dd55503cf49deb3836f270a81f016 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…