Commit ac01727c authored by Kristian Tan's avatar Kristian Tan

added container for inputs

parent 095a5350
...@@ -9,11 +9,18 @@ body { ...@@ -9,11 +9,18 @@ body {
/*background-color: aqua;*/ /*background-color: aqua;*/
} }
.container { .containerRows {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
/*background-color: darkkhaki;*/ background-color: darkkhaki;
height: 100%; height: 90%;
}
.containerCols {
display: flex;
flex-direction: column;
height: 10%;
background-color: green;
} }
.device_list { .device_list {
......
...@@ -9,41 +9,43 @@ ...@@ -9,41 +9,43 @@
</div> </div>
<body> <body>
<div class="container"> <div class="containerCols">
<form action="{{ url_for('handle_data') }}" method="post"> <div class="containerRows">
<input type="text" name="kWhprice"> <form action="{{ url_for('handle_data') }}" method="post">
<input type="submit"> <input type="text" name="kWhprice">
</form> <input type="submit">
<div class="device_list"> </form>
<h3 class="device_list_title">Device Listing and Status</h3> <div class="device_list">
<h3 class="device_list_title">Device Listing and Status</h3>
{% for pin in pins %}
<p>{{ pins[pin].name }} : {% for pin in pins %}
{% if pins[pin].state == true %} <p>{{ pins[pin].name }} :
(<a href="/toggle/{{pin}}">turn off</a>) {% if pins[pin].state == true %}
{% else %} (<a href="/toggle/{{pin}}">turn off</a>)
(<a href="/toggle/{{pin}}">turn on</a>) {% else %}
{% endif %} (<a href="/toggle/{{pin}}">turn on</a>)
</p> {% endif %}
{% endfor %} </p>
{% endfor %}
</div> </div>
<div class="smart_meter"> <div class="smart_meter">
<div class="smart_meter_info"> <div class="smart_meter_info">
<p> Devices currently in use: </p> <p> Devices currently in use: </p>
<ul> <ul>
{% for pin in pins %} {% for pin in pins %}
{% if pins[pin].state == true %} {% if pins[pin].state == true %}
<li>{{ pins[pin].name }}</li> <li>{{ pins[pin].name }}</li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
{# Implement some way to display "No devices" message if none are in use#} {# Implement some way to display "No devices" message if none are in use#}
<p> Total energy used today: {{ daily_total }} kWh.</p> <p> Total energy used today: {{ daily_total }} kWh.</p>
<p> Total cost of today's energy usage: £{{ todays_cost }}</p> <p> Total cost of today's energy usage: £{{ todays_cost }}</p>
</div>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment