stundenplaner/assets/template.html.tera
2022-01-22 18:50:19 +01:00

110 lines
2.8 KiB
Text

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Plan</title>
<style type="text/css">
body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica,
Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
table td,
table th {
padding: 4px 10px;
border: 2px solid #dfe2e5;
}
tr {
background-color: #fff;
border-top: 2px solid #c6cbd1;
}
table {
display: block;
width: 100%;
overflow: auto;
border-spacing: 0;
border-collapse: collapse;
}
</style>
</head>
<body>
{% for i in range(end=repeat) %}
<table>
<thead>
<tr>
<th>&#35;</th>
{% if times %}
<th align="left">{{ locale.time }}</th>
{% endif %}
<th align="left">{{ locale.mo }}</th>
<th align="left">{{ locale.tu }}</th>
<th align="left">{{ locale.we }}</th>
<th align="left">{{ locale.th }}</th>
<th align="left">{{ locale.fr }}</th>
</tr>
</thead>
<tbody>
{% for r in rows %}
<tr>
<td>{{ r.idx }}</td>
{% if times %}
<td>{{ r.time }}</td>
{% endif %}
<td>
{% if r.mo %} {% if r.mo.room %}
<b>{{ r.mo.room }}</b>
{% endif %}
{{ r.mo.name }}
{% endif %}
</td>
<td>
{% if r.tu %} {% if r.tu.room %}
<b>{{ r.tu.room }}</b>
{% endif %}
{{ r.tu.name }}
{% endif %}
</td>
<td>
{% if r.we %} {% if r.we.room %}
<b>{{ r.we.room }}</b>
{% endif %}
{{ r.we.name }}
{% endif %}
</td>
<td>
{% if r.th %} {% if r.th.room %}
<b>{{ r.th.room }}</b>
{% endif %}
{{ r.th.name }}
{% endif %}
</td>
<td>
{% if r.fr %} {% if r.fr.room %}
<b>{{ r.fr.room }}</b>
{% endif %}
{{ r.fr.name }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if i != repeat - 1 %}
<hr />
{% endif %}{% endfor %}
</body>
</html>