Commit 28ccd452 authored by Kristian Tan's avatar Kristian Tan

Added input section

parent ac01727c
...@@ -9,18 +9,18 @@ body { ...@@ -9,18 +9,18 @@ body {
/*background-color: aqua;*/ /*background-color: aqua;*/
} }
.containerRows { .inputs {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
background-color: darkkhaki; background-color: green;
height: 90%; height: 10%;
} }
.containerCols { .containerRows {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
height: 10%; background-color: darkkhaki;
background-color: green; height: 90%;
} }
.device_list { .device_list {
......
...@@ -9,43 +9,44 @@ ...@@ -9,43 +9,44 @@
</div> </div>
<body> <body>
<div class="containerCols"> <div class="inputs">
<div class="containerRows">
<form action="{{ url_for('handle_data') }}" method="post">
<input type="text" name="kWhprice">
<input type="submit">
</form>
<div class="device_list">
<h3 class="device_list_title">Device Listing and Status</h3>
{% for pin in pins %}
<p>{{ pins[pin].name }} :
{% if pins[pin].state == true %}
(<a href="/toggle/{{pin}}">turn off</a>)
{% else %}
(<a href="/toggle/{{pin}}">turn on</a>)
{% endif %}
</p>
{% endfor %}
</div>
<div class="containerRows">
<form action="{{ url_for('handle_data') }}" method="post">
<input type="text" name="kWhprice">
<input type="submit">
</form>
<div class="device_list">
<h3 class="device_list_title">Device Listing and Status</h3>
{% for pin in pins %}
<p>{{ pins[pin].name }} :
{% if pins[pin].state == true %}
(<a href="/toggle/{{pin}}">turn off</a>)
{% else %}
(<a href="/toggle/{{pin}}">turn on</a>)
{% endif %}
</p>
{% endfor %}
</div>
<div class="smart_meter"> </div>
<div class="smart_meter_info">
<p> Devices currently in use: </p> <div class="smart_meter">
<ul> <div class="smart_meter_info">
{% for pin in pins %} <p> Devices currently in use: </p>
{% if pins[pin].state == true %} <ul>
<li>{{ pins[pin].name }}</li> {% for pin in pins %}
{% endif %} {% if pins[pin].state == true %}
{% endfor %} <li>{{ pins[pin].name }}</li>
</ul> {% endif %}
{# Implement some way to display "No devices" message if none are in use#} {% endfor %}
</ul>
<p> Total energy used today: {{ daily_total }} kWh.</p> {# Implement some way to display "No devices" message if none are in use#}
<p> Total cost of today's energy usage: £{{ todays_cost }}</p>
</div> <p> Total energy used today: {{ daily_total }} kWh.</p>
<p> Total cost of today's energy usage: £{{ todays_cost }}</p>
</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