mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Moves validation into template
This commit is contained in:
parent
256d5ae14f
commit
a49962b8de
@ -135,7 +135,7 @@ Module.register("newsfeed", {
|
|||||||
sourceTitle: item.sourceTitle,
|
sourceTitle: item.sourceTitle,
|
||||||
publishDate: moment(new Date(item.pubdate)).fromNow(),
|
publishDate: moment(new Date(item.pubdate)).fromNow(),
|
||||||
title: item.title,
|
title: item.title,
|
||||||
description: this.isShowingDescription ? item.description : null
|
description: item.description
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</div>
|
</div>
|
||||||
|
{% if (config.showDescription) %}
|
||||||
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
||||||
{% if config.truncDescription %}
|
{% if config.truncDescription %}
|
||||||
{{ description | truncate(config.lengthDescription) }}
|
{{ description | truncate(config.lengthDescription) }}
|
||||||
@ -20,6 +21,7 @@
|
|||||||
{{ description }}
|
{{ description }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% elseif error %}
|
{% elseif error %}
|
||||||
<div class="small dimmed">
|
<div class="small dimmed">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user