2021-01-16 13:37:18 +01:00
|
|
|
{% if loaded %}
|
2021-06-03 11:40:18 +02:00
|
|
|
{% if config.showAsList %}
|
|
|
|
<ul class="newsfeed-list">
|
|
|
|
{% for item in items %}
|
|
|
|
<li>
|
|
|
|
{% if (config.showSourceTitle and item.sourceTitle) or config.showPublishDate %}
|
|
|
|
<div class="newsfeed-source light small dimmed">
|
|
|
|
{% if item.sourceTitle and config.showSourceTitle %}
|
|
|
|
{{ item.sourceTitle }}{% if config.showPublishDate %}, {% else %}: {% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if config.showPublishDate %}
|
|
|
|
{{ item.publishDate }}:
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
|
|
|
{{ item.title }}
|
|
|
|
</div>
|
|
|
|
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
|
|
|
{% if config.truncDescription %}
|
|
|
|
{{ item.description | truncate(config.lengthDescription) }}
|
|
|
|
{% else %}
|
|
|
|
{{ item.description }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2021-05-25 09:29:48 +02:00
|
|
|
{% else %}
|
2021-01-16 13:37:18 +01:00
|
|
|
<div>
|
|
|
|
{% if (config.showSourceTitle and sourceTitle) or config.showPublishDate %}
|
|
|
|
<div class="newsfeed-source light small dimmed">
|
2021-06-03 11:40:18 +02:00
|
|
|
{% if sourceTitle and config.showSourceTitle %}
|
|
|
|
{{ sourceTitle }}{% if config.showPublishDate %}, {% else %}: {% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if config.showPublishDate %}
|
|
|
|
{{ publishDate }}:
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
|
|
|
{{ title }}
|
|
|
|
</div>
|
|
|
|
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
|
|
|
{% if config.truncDescription %}
|
|
|
|
{{ description | truncate(config.lengthDescription) }}
|
|
|
|
{% else %}
|
|
|
|
{{ description }}
|
2021-01-16 13:37:18 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-03 11:40:18 +02:00
|
|
|
{% endif %}
|
2021-03-16 13:47:48 +01:00
|
|
|
{% elseif error %}
|
|
|
|
<div class="small dimmed">
|
2021-03-16 19:16:07 +01:00
|
|
|
{{ "MODULE_CONFIG_ERROR" | translate({MODULE_NAME: "Newsfeed", ERROR: error}) | safe }}
|
2021-03-16 13:47:48 +01:00
|
|
|
</div>
|
2021-01-16 13:37:18 +01:00
|
|
|
{% else %}
|
|
|
|
<div class="small dimmed">
|
|
|
|
{{ "LOADING" | translate | safe }}
|
|
|
|
</div>
|
2021-03-16 13:47:48 +01:00
|
|
|
{% endif %}
|