fix html indentation
parent
7198d6121a
commit
337523e151
|
@ -45,9 +45,9 @@
|
|||
}
|
||||
|
||||
#walls {
|
||||
fill: none;
|
||||
stroke: var(--color-p-4);
|
||||
stroke-width: 0.07;
|
||||
fill: none;
|
||||
stroke: var(--color-p-4);
|
||||
stroke-width: 0.07;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -57,97 +57,97 @@
|
|||
</header>
|
||||
<div style="margin-left:auto;margin-right:auto;width:480px">
|
||||
<svg width="480px" viewBox="-2 -2 18 16" >
|
||||
<g
|
||||
id="layer1">
|
||||
<g id="walls" >
|
||||
<path
|
||||
d="M 0,0 V 12.0 H 14 V 0 Z"
|
||||
id="path2101" />
|
||||
<path
|
||||
d="M 3.5,0 V 6.0 H 7.0 V 7.5"
|
||||
id="path2103" />
|
||||
<path
|
||||
d="M 7.0,12.0 V 9.0 h 0.875"
|
||||
id="path2105" />
|
||||
<path
|
||||
d="M 10.5,12.0 V 9.0 H 9.625"
|
||||
id="path2107" />
|
||||
<path
|
||||
d="m 14.0,3.75 h -2.625 v 3.75 h 2.625"
|
||||
id="path2109" />
|
||||
<path
|
||||
d="M 11.8125,7.5 V 9.0"
|
||||
id="path2111" />
|
||||
<path
|
||||
d="m 14,10.5 h -2.1875 l 0,-0.375"
|
||||
id="path2113" />
|
||||
<path
|
||||
d="m 14,9.0 h -1.3125"
|
||||
id="path2115" />
|
||||
<path
|
||||
d="M 11.375,6.0 H 9.625 v 0"
|
||||
id="path2117" />
|
||||
</g>
|
||||
<g id="lights">
|
||||
<rect
|
||||
id="l4"
|
||||
width="9.625"
|
||||
height="2.25"
|
||||
x="3.9374995"
|
||||
y="0.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l5"
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="3.9374995"
|
||||
y="3.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l6"
|
||||
width="2.625"
|
||||
height="2.25"
|
||||
x="7.4375"
|
||||
y="6.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l7"
|
||||
width="2.625"
|
||||
height="2.25"
|
||||
x="7.4375"
|
||||
y="9.374999"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l8"
|
||||
width="1.75"
|
||||
height="3.0"
|
||||
x="11.8125"
|
||||
y="4.125"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="0.4375"
|
||||
y="6.375"
|
||||
ry="0.375"
|
||||
id="l2" />
|
||||
<rect
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="0.4375"
|
||||
y="9.375"
|
||||
ry="0.375"
|
||||
id="l3" />
|
||||
<rect
|
||||
id="l1"
|
||||
width="2.625"
|
||||
height="5.25"
|
||||
x="0.4375"
|
||||
y="0.375"
|
||||
ry="0.375" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<g
|
||||
id="layer1">
|
||||
<g id="walls" >
|
||||
<path
|
||||
d="M 0,0 V 12.0 H 14 V 0 Z"
|
||||
id="path2101" />
|
||||
<path
|
||||
d="M 3.5,0 V 6.0 H 7.0 V 7.5"
|
||||
id="path2103" />
|
||||
<path
|
||||
d="M 7.0,12.0 V 9.0 h 0.875"
|
||||
id="path2105" />
|
||||
<path
|
||||
d="M 10.5,12.0 V 9.0 H 9.625"
|
||||
id="path2107" />
|
||||
<path
|
||||
d="m 14.0,3.75 h -2.625 v 3.75 h 2.625"
|
||||
id="path2109" />
|
||||
<path
|
||||
d="M 11.8125,7.5 V 9.0"
|
||||
id="path2111" />
|
||||
<path
|
||||
d="m 14,10.5 h -2.1875 l 0,-0.375"
|
||||
id="path2113" />
|
||||
<path
|
||||
d="m 14,9.0 h -1.3125"
|
||||
id="path2115" />
|
||||
<path
|
||||
d="M 11.375,6.0 H 9.625 v 0"
|
||||
id="path2117" />
|
||||
</g>
|
||||
<g id="lights">
|
||||
<rect
|
||||
id="l4"
|
||||
width="9.625"
|
||||
height="2.25"
|
||||
x="3.9374995"
|
||||
y="0.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l5"
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="3.9374995"
|
||||
y="3.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l6"
|
||||
width="2.625"
|
||||
height="2.25"
|
||||
x="7.4375"
|
||||
y="6.375"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l7"
|
||||
width="2.625"
|
||||
height="2.25"
|
||||
x="7.4375"
|
||||
y="9.374999"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
id="l8"
|
||||
width="1.75"
|
||||
height="3.0"
|
||||
x="11.8125"
|
||||
y="4.125"
|
||||
ry="0.375" />
|
||||
<rect
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="0.4375"
|
||||
y="6.375"
|
||||
ry="0.375"
|
||||
id="l2" />
|
||||
<rect
|
||||
width="6.125"
|
||||
height="2.25"
|
||||
x="0.4375"
|
||||
y="9.375"
|
||||
ry="0.375"
|
||||
id="l3" />
|
||||
<rect
|
||||
id="l1"
|
||||
width="2.625"
|
||||
height="5.25"
|
||||
x="0.4375"
|
||||
y="0.375"
|
||||
ry="0.375" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<script src="static/paho-mqtt.js"></script>
|
||||
|
@ -160,7 +160,7 @@
|
|||
}
|
||||
}
|
||||
config_request.open("GET", "/config", true);
|
||||
config_request.send(null);
|
||||
config_request.send(null);
|
||||
}
|
||||
|
||||
var onConfig = function(config) {
|
||||
|
@ -168,7 +168,7 @@
|
|||
for (i = 1; i <= 8; i++) {
|
||||
id = "l" + i;
|
||||
element = document.getElementById(id);
|
||||
element.classList = ["light-disabled"];
|
||||
element.classList = ["light-disabled"];
|
||||
|
||||
lights[i] = {
|
||||
"element": element,
|
||||
|
@ -187,9 +187,9 @@
|
|||
var light = lights[i];
|
||||
if ( message.topic == light.mqtt_path ) {
|
||||
if (message.payloadString == "true") {
|
||||
light.element.classList = ["light-on"];
|
||||
} else {
|
||||
light.element.classList = ["light-off"];
|
||||
light.element.classList = ["light-on"];
|
||||
} else {
|
||||
light.element.classList = ["light-off"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@
|
|||
onFailure: function(response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue