misc-scripts/postoffice/post_office_jinja/templates/postbox.j2.html

64 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Haven Post Office layout</title>
<style>
h1,
h2 {
text-align: center;
}
table {
border-collapse: collapse;
}
td {
text-align: center;
white-space:nowrap;
border: 0px solid black;
border-width: 0px 1px;
}
tr:nth-of-type(2n) td {
border-bottom: 1px solid black;
}
tr:first-of-type td {
border-top: 1px solid black;
}
.pb_empty {
background: green;
font-style: italic;
}
.pb_occupied {
background: red;
}
.pb_none {
background: white;
}
.coords {
font-size: x-small;
}
</style>
</head>
<body>
<h1>Haven Post Office</h1>
<h2>{{ today }}</h2>
<table>
{% for X in postboxes %}
{% for Y in X %}
<tr>
{% for pb in Y %}
{% if pb.owner is none %}
<td class='pb_none'>&nbsp;<br><span class="coords">&nbsp;</span></td>
{% elif pb.owner %}
<td class='pb_occupied'>{{pb.owner}}<br><span class="coords">{{pb.x}}, {{pb.y}}, {{pb.z}}</span></td>
{% else %}
<td class='pb_empty'>empty<br><span class="coords">{{pb.x}}, {{pb.y}}, {{pb.z}}</span></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
</table>
</body>
</html>