Well, while I have you, and not to be dismissive of what you just said.
I haven't done all the buttons. But I think I have the structure with CSS correct.
So this is my settings node code:
<style>
/* Best so far to fit 1x1 area */
.md-button{
border-radius:10px;
}
.nr-dashboard-template {
border-radius:10px;
}
.RCButtons1 {
border: none;
border-radius: 10px;
text-align: center;
background-color: black; /* Backfound colour */
/* color: {{msg.colour}}; */ /* "Font" (forground) colour */
color: white;
padding: 15px 0px;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 0px 0px;
cursor: pointer;
}
.RCButtons2 {
border: none;
border-radius: 2px;
text-align: center;
background-color: black; /* Backfound colour */
color: {{msg.colour}}; /* "Font" (forground) colour */
padding: 15px 0px;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 0px 0px;
cursor: pointer;
}
</style>
(Sorry, pressed save too quickly)
So, you can see that in one of the two declarations color
was set to {{msg.colour}}
and in the other it is set to white.
Probably not the best way to do it, but that's what I was shown.
The one which allows colour change is/are the volume button/s. They blink/flash when held down.
Anyway, just to help me find the buttons I haven't completed, I thought I would do this:
<style>
/* Best so far to fit 1x1 area */
.md-button{
border-radius:10px;
}
.nr-dashboard-template {
border-radius:10px;
}
.RCButtons1 {
border: none;
border-radius: 10px;
text-align: center;
background-color: {{msg.background}};
/* background-color: black; */ /* Backfound colour */
/* color: {{msg.colour}}; */ /* "Font" (forground) colour */
color: white;
(stuff deleted)
}
(stuff deleted)
</style>
So I can inject a different colour to highlight the ones I have done.
But it doesn't work.
When I apply that and inject a payload with msg.background
set to a colour name, it all does wonky.
Buttons stop working.
Wrong format.
Like this:
(Thought)
This is the code:
[{"id":"21191afd.99f226","type":"inject","z":"1781e581.31721a","name":"Black","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":1220,"wires":[["5c513db0.78a6fc"]]},{"id":"5c513db0.78a6fc","type":"change","z":"1781e581.31721a","name":"black","rules":[{"t":"set","p":"background","pt":"msg","to":"black","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":1220,"wires":[["b11b2dfa.681818"]]},{"id":"b11b2dfa.681818","type":"ui_template","z":"1781e581.31721a","group":"eabe7d43.b23f48","name":"","order":32,"width":0,"height":0,"format":"<style>\n/* Best so far to fit 1x1 area */\n.md-button{\n border-radius:10px;\n }\n.nr-dashboard-template {\n border-radius:10px;\n }\n.RCButtons1 {\n border: none;\n border-radius: 10px;\n text-align: center;\n background-color: {{msg.background}};\n/* background-color: black; */ /* Backfound colour */\n/* color: {{msg.colour}}; */ /* \"Font\" (forground) colour */\n color: white;\n padding: 15px 0px;\n text-decoration: none;\n display: inline-block;\n font-size: 14px;\n margin: 0px 0px;\n cursor: pointer;\n}\n.RCButtons2 {\n border: none;\n border-radius: 2px;\n text-align: center;\n background-color: black; /* Backfound colour */\n color: {{msg.colour}}; /* \"Font\" (forground) colour */\n padding: 15px 0px;\n text-decoration: none;\n display: inline-block;\n font-size: 14px;\n margin: 0px 0px;\n cursor: pointer;\n}\n</style>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":500,"y":1330,"wires":[[]]},{"id":"27cb89b3.b6c186","type":"change","z":"1781e581.31721a","name":"blue","rules":[{"t":"set","p":"background","pt":"msg","to":"blue","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":1260,"wires":[["b11b2dfa.681818"]]},{"id":"38b6a619.3c422a","type":"inject","z":"1781e581.31721a","name":"Blue","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":1260,"wires":[["27cb89b3.b6c186"]]},{"id":"eabe7d43.b23f48","type":"ui_group","z":"","name":"Full_Remote2","tab":"b128eb09.9f681","order":3,"disp":false,"width":"3","collapse":false},{"id":"b128eb09.9f681","type":"ui_tab","z":"","name":"HDMI_TV_control","icon":"dashboard","order":7,"disabled":false,"hidden":false}]
I am hoping I didn't fall for a silly mistake. But I have to ask.
I'll check myself too, but.....