News block

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Scotty
Posts: 35
Joined: Wednesday 28 November 2018 16:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

News block

Post by Scotty »

Hi all,

What am I missing in the news block below? There seems to be a big space, between the icon and article, that I can't get rid of.

Image

Thanks!
User avatar
HansieNL
Posts: 957
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by HansieNL »

Can you also post your block config?
Blah blah blah
Scotty
Posts: 35
Joined: Wednesday 28 November 2018 16:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Scotty »

Of course.

Code: Select all

blocks['news'] = {}
blocks['news']['feed'] = 'http://feeds.bbci.co.uk/news/rss.xml?edition=uk';
blocks['news']['icon'] = 'far fa-newspaper';
It's always worked before I updated to the latest beta. Looks to be a placeholder for something but I can't quite see what.
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: News block

Post by clinkadink »

Scotty wrote: Friday 17 April 2020 19:32 Hi all,

What am I missing in the news block below? There seems to be a big space, between the icon and article, that I can't get rid of.

Image

Thanks!
Good spot. This is where the image goes provided by many rss feeds. It was changed about a month ago.

Image

I can update it so it auto-collapses when there are no images provided by the rss feed. Alternatively, you can ditch your icon and choose an rss feed that also provides images ;)

Sadly, BBC doesn't - despite the cost of a TV license nowadays :x

I don't use an icon, as I use the Daily Mail feed which provides an image. Above picture is your block with my feed. Here are some if you (or anyone else) are interested.

1. http://www.independent.co.uk/rss
2. https://www.dailymail.co.uk/home/index.rss
3. https://www.mirror.co.uk/?service=rss
4. https://metro.co.uk/feed/
5. https://www.standard.co.uk/rss
6. https://rss.nytimes.com/services/xml/rs ... mePage.xml
7. http://www.politico.eu/feed/
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: News block

Post by EdwinK »

Nice layout
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
grecof973
Posts: 24
Joined: Wednesday 26 July 2017 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by grecof973 »

I can ask how did you add that colanna to the left with the three vertical icons .....
I really like
Lokonli
Posts: 2261
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Lokonli »

Scotty wrote: Friday 17 April 2020 19:57 Of course.

Code: Select all

blocks['news'] = {}
blocks['news']['feed'] = 'http://feeds.bbci.co.uk/news/rss.xml?edition=uk';
blocks['news']['icon'] = 'far fa-newspaper';
It's always worked before I updated to the latest beta. Looks to be a placeholder for something but I can't quite see what.
If you add:

Code: Select all

blocks['news']['showimages']  = false;
the placeholder for images should disappear.
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: News block

Post by clinkadink »

I learn something new everyday.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Scotty
Posts: 35
Joined: Wednesday 28 November 2018 16:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Scotty »

Thanks for the replies, everyone.

I think an option to auto collapse would be fantastic for people using a feed without images. This isn't documented in the readthedocs.io page yet.

I personally will update to a different feed for now. Thanks for the heads up.

The left column is just:

Code: Select all

columns['menu'] = {
  blocks:  [ buttons.page1, buttons.page2, buttons.page3, 151],
  width: 1
}
I then added some css to give it a dark background. The clock at the bottom starts the fully kiosk screensaver. For this I created a simple HTML page with a fullscreen clock and date.
Scotty
Posts: 35
Joined: Wednesday 28 November 2018 16:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Scotty »

clinkadink wrote: Friday 17 April 2020 20:34 I don't use an icon, as I use the Daily Mail feed which provides an image.
Brave man :lol:
Scotty
Posts: 35
Joined: Wednesday 28 November 2018 16:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Scotty »

All sorted! Thanks, gents. Have a great weekend.

Image
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: News block

Post by clinkadink »

Yes, quite eye catching :)
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: News block

Post by clinkadink »

Scotty wrote: Friday 17 April 2020 22:00 All sorted! Thanks, gents. Have a great weekend.

Image
Really nice dash, well done!
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
grecof973
Posts: 24
Joined: Wednesday 26 July 2017 6:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by grecof973 »

Scotty wrote: Friday 17 April 2020 21:55 Thanks for the replies, everyone.

I think an option to auto collapse would be fantastic for people using a feed without images. This isn't documented in the readthedocs.io page yet.

I personally will update to a different feed for now. Thanks for the heads up.

The left column is just:

Code: Select all

columns['menu'] = {
  blocks:  [ buttons.page1, buttons.page2, buttons.page3, 151],
  width: 1
}
I then added some css to give it a dark background. The clock at the bottom starts the fully kiosk screensaver. For this I created a simple HTML page with a fullscreen clock and date.

Quite right....
Thanks, it's very kind of you
webrazor
Posts: 61
Joined: Monday 09 November 2015 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: News block

Post by webrazor »

How to change the font-size of the News block?

And the news block is not showing images. This is de news block code below:

Code: Select all

blocks['news_nu_nl'] = {feed: 'http://www.nu.nl/rss/Algemeen', showimages: true, icon:''}
Im using the nu.nl rss feed and it comes with images, check rss feed item below.

Code: Select all

<item>
<title>Weer minder nieuwe sterfgevallen (48) en opnames (88) dan week eerder</title>
<link>https://www.nu.nl/coronavirus/6047685/weer-minder-nieuwe-sterfgevallen-48-en-opnames-88-dan-week-eerder.html</link>
<description>Het Rijksinstituut voor Volksgezondheid en Milieu (RIVM) meldt dinsdag in de dagelijkse update 48 nieuwe sterfgevallen en 88 nieuwe ziekenhuisopnames. Dat zijn er minder dan een week geleden, toen 165 sterfgevallen en 118 opnames werden gemeld. De cijfers passen volgens het RIVM in het beeld dat de coronamaatregelen effect hebben.</description>
<pubDate>Tue, 28 Apr 2020 14:22:02 +0200</pubDate>
<guid isPermaLink="false">https://www.nu.nl/-/6047685/</guid>
<enclosure length="0" type="image/jpeg" url="https://media.nu.nl/m/rijx0mraxsxk_sqr256.jpg/weer-minder-nieuwe-sterfgevallen-48-en-opnames-88-dan-week-eerder.jpg"></enclosure>
<category>Algemeen</category>
<category>Binnenland</category>
<category>Coronavirus</category>
<dc:creator>NU.nl</dc:creator>
<dc:rights>copyright photo: Pro Shots</dc:rights>
<atom:link href="https://nu.nl/coronavirus/6047503/rivm-meldt-kleinste-aantal-geregistreerde-sterfgevallen-43-sinds-22-maart.html" rel="related" title="RIVM meldt kleinste aantal geregistreerde sterfgevallen (43) sinds 22 maart" type="text/html"></atom:link>
<atom:link href="https://nu.nl/coronavirus/6047341/rivm-meldt-minder-opnames-75-en-doden-66-dan-week-eerder.html" rel="related" title="RIVM meldt minder opnames (75) en doden (66) dan week eerder" type="text/html"></atom:link>
<atom:link href="https://nu.nl/coronavirus/6047212/rivm-meldt-minder-nieuwe-opnames-100-en-doden-120-dan-week-eerder.html" rel="related" title="RIVM meldt minder nieuwe opnames (100) en doden (120) dan week eerder" type="text/html"></atom:link>
</item>
Lokonli
Posts: 2261
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Lokonli »

webrazor wrote: Tuesday 28 April 2020 14:34 How to change the font-size of the News block?

And the news block is not showing images. This is de news block code below:

Code: Select all

blocks['news_nu_nl'] = {feed: 'http://www.nu.nl/rss/Algemeen', showimages: true, icon:''}
Im using the nu.nl rss feed and it comes with images, check rss feed item below.

Code: Select all

<item>
<title>Weer minder nieuwe sterfgevallen (48) en opnames (88) dan week eerder</title>
<link>https://www.nu.nl/coronavirus/6047685/weer-minder-nieuwe-sterfgevallen-48-en-opnames-88-dan-week-eerder.html</link>
<description>Het Rijksinstituut voor Volksgezondheid en Milieu (RIVM) meldt dinsdag in de dagelijkse update 48 nieuwe sterfgevallen en 88 nieuwe ziekenhuisopnames. Dat zijn er minder dan een week geleden, toen 165 sterfgevallen en 118 opnames werden gemeld. De cijfers passen volgens het RIVM in het beeld dat de coronamaatregelen effect hebben.</description>
<pubDate>Tue, 28 Apr 2020 14:22:02 +0200</pubDate>
<guid isPermaLink="false">https://www.nu.nl/-/6047685/</guid>
<enclosure length="0" type="image/jpeg" url="https://media.nu.nl/m/rijx0mraxsxk_sqr256.jpg/weer-minder-nieuwe-sterfgevallen-48-en-opnames-88-dan-week-eerder.jpg"></enclosure>
<category>Algemeen</category>
<category>Binnenland</category>
<category>Coronavirus</category>
<dc:creator>NU.nl</dc:creator>
<dc:rights>copyright photo: Pro Shots</dc:rights>
<atom:link href="https://nu.nl/coronavirus/6047503/rivm-meldt-kleinste-aantal-geregistreerde-sterfgevallen-43-sinds-22-maart.html" rel="related" title="RIVM meldt kleinste aantal geregistreerde sterfgevallen (43) sinds 22 maart" type="text/html"></atom:link>
<atom:link href="https://nu.nl/coronavirus/6047341/rivm-meldt-minder-opnames-75-en-doden-66-dan-week-eerder.html" rel="related" title="RIVM meldt minder opnames (75) en doden (66) dan week eerder" type="text/html"></atom:link>
<atom:link href="https://nu.nl/coronavirus/6047212/rivm-meldt-minder-nieuwe-opnames-100-en-doden-120-dan-week-eerder.html" rel="related" title="RIVM meldt minder nieuwe opnames (100) en doden (120) dan week eerder" type="text/html"></atom:link>
</item>
For the font size of the news block, add the following to custom.css:

Code: Select all

.news .headline .title {
    font-size: 20px
}

.news .headline .description {
    font-size: 18px
}

.news .headline .updated {
    font-size: 16px
}
For the images: Which exact Dashticz version are you using? News images have been implemented in 3.4.0 beta.
(you can find it via Dashticz settings->info tab, or in the file version.txt in the Dashticz root folder.

It should work (your config is working on my system).
webrazor
Posts: 61
Joined: Monday 09 November 2015 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: News block

Post by webrazor »

Lokonli wrote: Tuesday 28 April 2020 16:35 For the font size of the news block, add the following to custom.css:

Code: Select all

.news .headline .title {
    font-size: 20px
}

.news .headline .description {
    font-size: 18px
}

.news .headline .updated {
    font-size: 16px
}
For the images: Which exact Dashticz version are you using? News images have been implemented in 3.4.0 beta.
(you can find it via Dashticz settings->info tab, or in the file version.txt in the Dashticz root folder.

It should work (your config is working on my system).
The font-size still the same after adding the you code in custom.css, any idea why?

I am running stable not beta that why the new image is not working.
Lokonli
Posts: 2261
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: News block

Post by Lokonli »

The styling also is applicable to beta only. I'll look into master later today.


Sent from my SM-A320FL using Tapatalk

webrazor
Posts: 61
Joined: Monday 09 November 2015 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: News block

Post by webrazor »

Lokonli wrote: Tuesday 28 April 2020 19:27 The styling also is applicable to beta only. I'll look into master later today.

Sent from my SM-A320FL using Tapatalk
Thanks, let me know if you find out how to change in the master.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest