Add in option to have single line news

This commit is contained in:
Andrew McOlash
2017-03-11 17:36:47 -06:00
parent d26d94b62a
commit afe0e3c1d6
3 changed files with 12 additions and 2 deletions

View File

@@ -21,6 +21,8 @@ Module.register("newsfeed",{
showSourceTitle: true,
showPublishDate: true,
showDescription: false,
wrapTitle: true,
wrapDescription: true,
reloadInterval: 5 * 60 * 1000, // every 5 minutes
updateInterval: 10 * 1000,
animationSpeed: 2.5 * 1000,
@@ -155,14 +157,14 @@ Module.register("newsfeed",{
if(!this.config.showFullArticle){
var title = document.createElement("div");
title.className = "bright medium light";
title.className = "bright medium light" + (!this.config.wrapTitle ? " no-wrap" : "");
title.innerHTML = this.newsItems[this.activeItem].title;
wrapper.appendChild(title);
}
if (this.config.showDescription) {
var description = document.createElement("div");
description.className = "small light";
description.className = "small light" + (!this.config.wrapDescription ? " no-wrap" : "");
description.innerHTML = this.newsItems[this.activeItem].description;
wrapper.appendChild(description);
}