From c9c730f727945c8cee07a95783b38a8f8c86db21 Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Fri, 8 Feb 2019 11:13:48 +0100 Subject: [PATCH] Handling optional "date" field in past readings list --- static/js/filter-tags.js | 1 + templates/base.html | 2 +- templates/past_readings.html | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) mode change 100755 => 100644 templates/past_readings.html diff --git a/static/js/filter-tags.js b/static/js/filter-tags.js index c5219a2..67c069b 100644 --- a/static/js/filter-tags.js +++ b/static/js/filter-tags.js @@ -86,6 +86,7 @@ updateArticlesVisibility(); }; + // This is a bit redundant with /tag/$tag.html pages, but is slightly more powerful as it allow to combine multiple filters let queryParams = parseQuery(window.location.search); for (let [qpName, qpValue] of Object.entries(queryParams)) { if (!qpValue) { continue; } diff --git a/templates/base.html b/templates/base.html index c35aaab..1542157 100644 --- a/templates/base.html +++ b/templates/base.html @@ -266,7 +266,7 @@ - + {% include 'disqus_count.html' %} {% include 'analytics.html' %} diff --git a/templates/past_readings.html b/templates/past_readings.html old mode 100755 new mode 100644 index 4baa7cf..6e81262 --- a/templates/past_readings.html +++ b/templates/past_readings.html @@ -9,8 +9,8 @@
{% for reading in READINGS %}
- {{ reading['description'] }} -
{{ reading['description'] }}
+ {{ reading['description']+' '+reading.get('date', '') }} +
{{ reading['description']+' '+reading.get('date', '') }}
{% endfor %}