Commit 01864770 authored by Kristian Tan's avatar Kristian Tan

Added sections for different html elements

parent 13d04c55
......@@ -6,4 +6,25 @@ body{
text-decoration: underline;
text-align: center;
background-color: aqua;
}
.container{
display: flex;
flex-direction: row;
background-color: red;
}
.device_list{
width: 25%;
background-color: red;
}
.spacer{
width: 10%;
background-color: green;
}
.smart_meter{
width: 65%;
background-color: coral;
}
\ No newline at end of file
......@@ -9,21 +9,31 @@
</div>
<body>
<h1>Device Listing and Status</h1>
{% for pin in pins %}
<p>The {{ pins[pin].name }}
{% if pins[pin].state == true %}
is currently on (<a href="/{{pin}}">turn off</a>)
{% else %}
is currently off (<a href="/{{pin}}">turn on</a>)
{% endif %}
</p>
{% endfor %}
{% if message %}
<h2>{{ message }}</h2>
{% endif %}
<div class="container">
<div class="device_list">
<h3>Device Listing and Status</h3>
{% for pin in pins %}
<p>The {{ pins[pin].name }}
{% if pins[pin].state == true %}
is currently on (<a href="/{{pin}}">turn off</a>)
{% else %}
is currently off (<a href="/{{pin}}">turn on</a>)
{% endif %}
</p>
{% endfor %}
{% if message %}
<h2>{{ message }}</h2>
{% endif %}
</div>
<div class="spacer"></div>
<div class="smart_meter"></div>
</div>
</body>
</html>
\ No newline at end of file
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