Handling optional "date" field in past readings list

This commit is contained in:
Lucas Cimon 2019-02-08 11:13:48 +01:00
parent 5712d577b0
commit c9c730f727
No known key found for this signature in database
GPG Key ID: 08DA831E717571EE
3 changed files with 4 additions and 3 deletions

View File

@ -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; }

View File

@ -266,7 +266,7 @@
</div>
</aside>
<script src="{{SITEURL}}/theme/bundle-SHARE-{{SHARE|string|first|length|string|first}}-MG_FILTER_TAGS-{{MG_FILTER_TAGS|string|first|length|string|first}}-SHORTSHA1-b4c4e94.js"></script>
<script src="{{SITEURL}}/theme/bundle-SHARE-{{SHARE|string|first|length|string|first}}-MG_FILTER_TAGS-{{MG_FILTER_TAGS|string|first|length|string|first}}-SHORTSHA1-efddc02.js"></script>
{% include 'disqus_count.html' %}
{% include 'analytics.html' %}

4
templates/past_readings.html Executable file → Normal file
View File

@ -9,8 +9,8 @@
<div class="uk-grid">
{% for reading in READINGS %}
<figure class="uk-width-1-1 uk-width-small-1-2 uk-width-medium-1-3">
<img class="uk-thumbnail" src="{{ reading['img_url'] }}" alt="{{ reading['description'] }}">
<figcaption>{{ reading['description'] }}</figcaption>
<img class="uk-thumbnail" src="{{ reading['img_url'] }}" alt="{{ reading['description']+' '+reading.get('date', '') }}">
<figcaption>{{ reading['description']+' '+reading.get('date', '') }}</figcaption>
</figure>
{% endfor %}
</div>