From 8654b936be4f4bd111c8ecfc3bf5f82390ac63e4 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 15 May 2018 12:04:25 -0400 Subject: [PATCH] New carbon ad code (#254) * new carbon ad code * final fixes --- download-all-plogs.py | 2 + peterbecom/plog/jinja2/plog/post.html | 110 ++++++++++++++++++++++++++ reload_and_clear_cache.py | 21 +++++ 3 files changed, 133 insertions(+) create mode 100755 reload_and_clear_cache.py diff --git a/download-all-plogs.py b/download-all-plogs.py index 9079ed5bd..d2191148d 100755 --- a/download-all-plogs.py +++ b/download-all-plogs.py @@ -8,6 +8,8 @@ def get_urls(base_url): + if base_url.endswith('/'): + base_url = base_url[:-1] doc = PyQuery(base_url + '/plog/') doc.make_links_absolute(base_url=base_url) urls = [] diff --git a/peterbecom/plog/jinja2/plog/post.html b/peterbecom/plog/jinja2/plog/post.html index f52bc3c1d..d6aba33be 100644 --- a/peterbecom/plog/jinja2/plog/post.html +++ b/peterbecom/plog/jinja2/plog/post.html @@ -120,6 +120,71 @@ } } + + {# These are for the new BuySellAds Carbon campaign #} + {% endif %} {% if request.path == '/plog/blogitem-040601-1' %} @@ -156,6 +221,12 @@

{{ post.url }}

{% endif %} + {# + {% if request.path != '/plog/blogitem-040601-1' %} +
+ {% endif %} + #} + {% endblock %} {% block extrajs %} @@ -165,10 +236,48 @@

{{ post.url }}

{% javascript 'plog:post' %} {% endif %} +{##} + + {% endblock %} {% block content %} +{% if request.path != '/plog/blogitem-040601-1' %} +
+{% endif %} + {% if pub_date_years > 3 and request.path != '/plog/blogitem-040601-1' %}
@@ -185,6 +294,7 @@

{{ post.url }}

{% include "plog/_post.html" %} + {% if show_buttons %}