а как поставить три виджета в ряд?
нашел в описаниях
но как только не эксперементировал - ничего хорошего не получалось...
поставить в ряд хочу это:
нашел в описаниях
Код:
{
"id" : 1,
"widget" : "gauge",
"topic" : prefix + "/" + deviceID + "/gauge1",
"class1" : "text-center col-xs-4 no-padding-left no-padding-right",
}
поставить в ряд хочу это:
Код:
JsonObject& root1 = jsonBuffer.createObject();
sTopic[2] = prefix + "/" + deviceID + "/button_on1+";
root1["id"] = "2";
root1["page"] = "buttons";
root1["widget"] = "simple-btn";
root1["class1"] = "item no-border no-padding-right"; // class for 1st div
root1["style1"] = ""; // style for 1st div
root1["descr"] = ""; // text for description
root1["class2"] = "balanced"; // class for description from Widgets Guide - Color classes
root1["style2"] = "font-size:20px;float:left;padding-top:10px;font-weight:bold;"; // style for description
root1["topic"] = sTopic[2];
root1["class3"] = "button button-balanced icon ion-plus-round"; // class for button
root1["style3"] = "font-size:20px; float:left;"; // style for button
root1.printTo(thing_config[2]);
JsonObject& root3 = jsonBuffer.createObject();
sTopic[3] = prefix + "/" + deviceID + "/Tnow1";
root3["id"] = "3";
root3["page"] = "second";
root3["widget"] = "display-value";
root3["class1"] = "item no-border";
root3["style1"] = "",
root3["descr"] = "";
root3["class2"] = "assertive";
root3["style2"] = "font-size:20px;float:left;font-weight:bold;";
root3["topic"] = sTopic[3];
root3["class3"] = "";
root3["style3"] = "float:right;";
root3["height"] = "40";
root3["color"] = "#F10014";
root3["inactive_color"] = "#414141";
root3["digits_count"] = 4;
root3.printTo(thing_config[3]);
JsonObject& root2 = jsonBuffer.createObject();
sTopic[4] = prefix + "/" + deviceID + "/button_on1-";
root2["id"] = "4";
root2["page"] = "buttons";
root2["widget"] = "simple-btn";
root2["class1"] = "item no-border"; // class for 1st div
root2["style1"] = ""; // style for 1st div
root2["descr"] = ""; // text for description
root2["class2"] = "balanced"; // class for description from Widgets Guide - Color classes
root2["style2"] = "font-size:20px;float:left;padding-top:10px;font-weight:bold;"; // style for description
root2["topic"] = sTopic[4];
root2["class3"] = "button button-balanced icon ion-minus-round"; // class for button
root2["style3"] = "font-size:20px; float:left;"; // style for button
root2.printTo(thing_config[4]);