Configuration question - how to create an empty block

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
egberts
Posts: 1
Joined: Sunday 02 December 2018 19:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Configuration question - how to create an empty block

Post by egberts »

Hi all,
I want to display the layout of my solar panels on a page in Dashticz. 21 panels are placed in a matrix of 4 columns and 6 rows. There are some empty spaces.

X X X X
X X X X
X X X X
X X X - <-----
X X X X
X X

How do I create an 'empty' block (see arrow)?

Regards,
Egbert
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Configuration question - how to create an empty block

Post by Lokonli »

egberts wrote: Thursday 22 April 2021 20:50 Hi all,
I want to display the layout of my solar panels on a page in Dashticz. 21 panels are placed in a matrix of 4 columns and 6 rows. There are some empty spaces.

X X X X
X X X X
X X X X
X X X - <-----
X X X X
X X

How do I create an 'empty' block (see arrow)?

Regards,
Egbert
It's a bit clumsy, but you can do it as follows:

1) Define a button, without title, of a certain width:

Code: Select all

blocks['empty'] = {
    title:'',
    width: 4
}
2) Add it to a column at the right position:

Code: Select all


columns[1] = {
   ...
   blocks: [ ..., 'empty', ...],
   ...
}
 
3) Modify custom.css

a) To set the height and show the background:

Code: Select all

div[data-id='empty'] {
    height: 300px
}

b) To completely hide the block

Code: Select all

div[data-id='empty'] {
    visibility: hidden;
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest