pvklink wrote: ↑Sunday 10 November 2019 9:58
Hi, i am busy changing my styling with the new formats for special blocks...
Cam, garbage, clock & sunrise are working.
But
1.i cant style news ...
this is the js part
//
// NEWS FEED
blocks['news_nualg'] = {}
blocks['news_nualg']['feed'] = '
http://www.nu.nl/rss/algemeen';
and these are some samples of my css, i cant define the height of a news block like news_nualg
2. Other question: Why can i use an item like divcam1 without buttons. and for cams i have to add calenders. in front, why is this different?
Code: Select all
* news */
div[data-id='news_nualg'] {height: 136;} /* does not work */
[data-id='news_nualg'].blocktitle {height: 136;} /* does not work */
/* cam */
div[data-id='divcam1'] {height: 172px;width: 240px;}
div[data-id='divcam2'] {height: 172px;width: 240px;}
div[data-id='divcam3'] {height: 550px;}
div[data-id='divcam4'] {height: 550px;}
/* calenders */
div[data-id='calendars.dvpeter'] {height: 133px;}
div[data-id='calendars.dvado'] {height: 133px;}
div[data-id='calendars.dvf1'] {height: 352px;}
div[data-id='calendars.dvfam'] {height: 135px;}
div[data-id='calendars.dvfam'] .items {height: 100%;overflow-y: auto;}
/* clock & sunrise */
div[data-id='clock'] {height: 118px;}
div[data-id='sunrise'] {height: 90px;}
/* garbage */
div[data-id='garbage'] {height: 85px;width: 480px;}
div[data-id='garbage'] .items {height: 100%;overflow-y: auto;}
/
news1.png
You can set the height of a news block in CONFIG.js as follows:
Code: Select all
blocks['news_nualg'] = {
feed: 'http://www.nu.nl/rss/algemeen',
maxheight: 400,
title: 'Nu.nl' //optional
}
I see this is not documented yet...
If you have added a title to the news block, then you can change the styling of the title part in custom.css:
Code: Select all
[data-id='news_nualg'].news .dt_title {
height:50px
}
Back to your two lines that didn't work:
The first one doesn't work because normally the height is calculated dynamically by the news content, and that overrules the css styling. You can have a forced height by using the the maxheight parameter in the block definition in CONFIG.js, as described above.
The second one doesn't work, because the data-id is not added to the title, but only to the container.
2)
The calendar block still uses the 'old' format. In the old html template 'calendar' was added in front of the key (=date-id). In one of the future updates I'll change it to the new template.