basic page layout

This commit is contained in:
iou1name 2019-06-05 16:04:44 -04:00
parent 0399f9076a
commit d36612dfb6
2 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,25 @@
body {
padding: 5%;
display: flex;
justify-content: center;
}
.device {
border: 1px solid #ccc;
padding: 5%;
margin: 5%;
display: flex;
flex-direction: column;
align-items: center;
}
.sub_devices {
display: flex;
border: 1px solid #ccc;
}
.sub_device {
border: 1px solid #ccc;
padding: 1em;
margin: 1em;
}

View File

@ -8,7 +8,7 @@
<body>
{% for dev_type, devices in network.items() %}
{% for device in devices %}
<div class="{{ dev_type }}" id="{{ device.id }}">
<div class="device {{ dev_type }}" id="{{ device.id }}">
<div class="id">{{ device.id }}</div>
<div class="description">{{ device.description }}</div>
<div class="location">{{ device.location }}</div>
@ -16,7 +16,7 @@
<div class="sub_devices">
{% for sub_dev_type, sub_devs in device.sub_devices.items() %}
{% for sub_dev in sub_devs %}
<div class="{{ sub_dev_type }}" id="{{ sub_dev.id }}">
<div class="sub_device {{ sub_dev_type }}" id="{{ sub_dev.id }}">
<div class="id">{{ sub_dev.id }}</div>
<div class="outlet_image">OUTLET_IMAGE</div>
<div class="description">{{ sub_dev.description }}</div>