mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Add in option to have single line news
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user