mumblebaj / MMM-NewsAPI

MagicMirror² module - displaying news articles from Newsapi.org API V2
MIT License
7 stars 5 forks source link

The headlines are not centered and sorces are undefined #10

Closed rebeccabrandt1101 closed 6 months ago

rebeccabrandt1101 commented 6 months ago

Heii there, i have this code: { module: "MMM-NewsAPI", header: "Nachrichten", position: "bottom_bar", config: { apiKey: "xxx", type: "horizontal", choice: "everything", pageSize: 10, sortBy: "relevance", drawInterval: 100030, templateFile: "template.html", fetchInterval: 100060*60, query: { country: "de", category: "general", language: "de", domains: "tagesschau.de" } } },

IMG_2859

and I have the following problem. The headlines of the news are unfortunately not centered and the message "undefined" appears next to the domains you want to specify (separated with | ). I don't know how to fix this and I hope you can help me.

Thank you very much in advance.

mumblebaj commented 6 months ago

Hi. Thank you for your issue.

The Headline is centered to the bottom bar as that is the space it lives in. It is not centered to the news text that you see. Same applies to the news content. If I have to change this I have to change the layout and that would require a bit of testing. May look at it over the weekend as well.

Undefined is unfortunately returned by the API itself. Will see if I can replace it with just a blank space. Will have a look when I have some time over the weekend to fix that.

mumblebaj commented 6 months ago

Hi @rebeccabrandt1101

I have managed to fix the issue of "UNDEFINED". You an do a pull and restart your mirror.

The second issue of the alignment of the text I will take a look at when I have more time. It requires reworking the template and content etc. which will take time.

rebeccabrandt1101 commented 6 months ago

Heii @mumblebaj

Thank you very much for your help. The problem with the Undefined has been fixed. Hopefully it will also work with the text alignment.

But you've already helped me a lot with that