New functionality to change feed dates to relative dates (e.g. 1 day ago) where the feed items are available on page load. Contributes to #50.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
==
|
||||
{% if feeditemclass is empty %}
|
||||
{% set feeditemclass = 'masonry-item' %}
|
||||
{% set feeditemclass = 'feeditem masonry-item' %}
|
||||
{% else %}
|
||||
{% set feeditemclass = 'masonry-item ' ~ feeditemclass %}
|
||||
{% set feeditemclass = 'feeditem masonry-item ' ~ feeditemclass %}
|
||||
{% endif %}
|
||||
|
||||
{% if posts is empty %}
|
||||
@@ -10,7 +10,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% for post in posts %}
|
||||
<div class="{{ feeditemclass }}">
|
||||
<div class="{{ feeditemclass }}" data-timestamp="{{ post.timestamp }}">
|
||||
<div class="card">
|
||||
{% if post.extra.img %}
|
||||
<img class="card-img-top" src="{{ post.extra.img }}">
|
||||
@@ -32,7 +32,7 @@
|
||||
<p class="card-text">{{ post.extra.address }}</p>
|
||||
{% endif %}
|
||||
<div class="feedcard-footer">
|
||||
<p class="float-right feedcard-itemtype">{{ post.friendlytime }} <i class="{{ post.channel.icon }}" style="color: {{ post.channel.colour }};"></i></p>
|
||||
<p class="float-right feedcard-itemtype"><span class="friendlytime">{{ post.friendlytime }}</span> <i class="{{ post.channel.icon }}" style="color: {{ post.channel.colour }};"></i></p>
|
||||
{% if post.channel.slug == 'twitter' and post.extra.opuser %}
|
||||
<p class="float-left feedcard-attribution"><i class="fas fa-retweet"></i> <a href="https://twitter.com/{{ post.extra.opuser }}">{{ post.extra.opname }}</a> <img src="{{ post.extra.opimg }}"></p>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user