News block
Posted: Friday 17 April 2020 19:32
Code: Select all
blocks['news'] = {}
blocks['news']['feed'] = 'http://feeds.bbci.co.uk/news/rss.xml?edition=uk';
blocks['news']['icon'] = 'far fa-newspaper';
Good spot. This is where the image goes provided by many rss feeds. It was changed about a month ago.
If you add:Scotty wrote: ↑Friday 17 April 2020 19:57 Of course.
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.Code: Select all
blocks['news'] = {} blocks['news']['feed'] = 'http://feeds.bbci.co.uk/news/rss.xml?edition=uk'; blocks['news']['icon'] = 'far fa-newspaper';
Code: Select all
blocks['news']['showimages'] = false;
Code: Select all
columns['menu'] = {
blocks: [ buttons.page1, buttons.page2, buttons.page3, 151],
width: 1
}
Brave manclinkadink wrote: ↑Friday 17 April 2020 20:34 I don't use an icon, as I use the Daily Mail feed which provides an image.
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: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.Code: Select all
columns['menu'] = { blocks: [ buttons.page1, buttons.page2, buttons.page3, 151], width: 1 }
Code: Select all
blocks['news_nu_nl'] = {feed: 'http://www.nu.nl/rss/Algemeen', showimages: true, icon:''}
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: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:Im using the nu.nl rss feed and it comes with images, check rss feed item below.Code: Select all
blocks['news_nu_nl'] = {feed: 'http://www.nu.nl/rss/Algemeen', showimages: true, icon:''}
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>
Code: Select all
.news .headline .title {
font-size: 20px
}
.news .headline .description {
font-size: 18px
}
.news .headline .updated {
font-size: 16px
}
The font-size still the same after adding the you code in custom.css, any idea why?Lokonli wrote: ↑Tuesday 28 April 2020 16:35 For the font size of the news block, add the following to custom.css:
For the images: Which exact Dashticz version are you using? News images have been implemented in 3.4.0 beta.Code: Select all
.news .headline .title { font-size: 20px } .news .headline .description { font-size: 18px } .news .headline .updated { font-size: 16px }
(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).