menu Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

menu

Post by pvklink »

What is the best way to make a menu with buttons to active several pages ?
My goal is to have a clickable button, with an image that is as large as the button with a title center horizontal enad vertical

I tried the button way and had problems with getting the button-height changed
Another way is to use normal blocks, but with this approach i cant get the title aligned vertically


blocks['menu_irrigatie'] = {title: 'IRRIGATIE',width: 3, icon: 'fas fa-hdd',slide:6}

css
div[data-id='menu_irrigatie'] {height: 200px !important;text-align: center; vertical-align: middle} */
also tried v-align: and values middle and center
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
madpatrick
Posts: 667
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: menu

Post by madpatrick »

This is how i did it

config.js

Code: Select all

buttons.slidehome 	= {
	key: "Home",
	width: 12, 
	title:"Home Screen",
	slide:1, 
	icon: 'fas fa-home'}
custom.css

Code: Select all

.button[data-id='Home']				{height: 50px !important;background-color: rgba(255,255,0,0.1)!important;}
.button[data-id='Home'] .dt_title			{font-size: 30px !important; color: #f4ffcc !important;padding-left: 30px !important}
.button[data-id='Home'] .col-icon			{font-size: 30px !important; color: white !important;padding-left: 350px !important}
I use padding to play with the location.
Did not find yet a good alternative to center the text
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: menu

Post by pvklink »

Thanks!
Will try it
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: menu

Post by pvklink »

Works perfect , thanks!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest