70 lines
3.0 KiB
Plaintext
Raw Normal View History

{% if loaded %}
2021-06-03 11:40:18 +02:00
{% if config.showAsList %}
<ul class="newsfeed-list">
{% for item in items %}
<li>
2021-06-03 12:38:54 +02:00
{% 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>
{% if config.showDescription %}
<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>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
2021-06-03 12:38:54 +02:00
<div>
{% if (config.showSourceTitle and sourceTitle) or config.showPublishDate %}
<div class="newsfeed-source light small dimmed">
{% if sourceTitle and config.showSourceTitle %}
2021-11-28 21:32:04 +01:00
{{ sourceTitle | safe }}{% if config.showPublishDate %}, {% else %}: {% endif %}
2021-06-03 12:38:54 +02:00
{% endif %}
{% if config.showPublishDate %}
{{ publishDate }}:
{% endif %}
</div>
{% endif %}
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
{{ title }}
2021-06-03 11:40:18 +02:00
</div>
2021-06-03 12:38:54 +02:00
{% if config.showDescription %}
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
{% if config.truncDescription %}
2021-11-28 21:32:04 +01:00
{{ description | truncate(config.lengthDescription) | safe }}
2021-06-03 12:38:54 +02:00
{% else %}
2021-11-28 21:32:04 +01:00
{{ description | safe }}
2021-06-03 12:38:54 +02:00
{% endif %}
</div>
{% endif %}
</div>
2021-06-03 11:40:18 +02:00
{% endif %}
{% elseif empty %}
<div class="small dimmed">
{{ "NEWSFEED_NO_ITEMS" | translate | safe }}
</div>
{% elseif error %}
<div class="small dimmed">
2021-03-16 19:16:07 +01:00
{{ "MODULE_CONFIG_ERROR" | translate({MODULE_NAME: "Newsfeed", ERROR: error}) | safe }}
</div>
{% else %}
<div class="small dimmed">
{{ "LOADING" | translate | safe }}
</div>
{% endif %}