108 lines
3.8 KiB
HTML
108 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
body { font-family: sans-serif; color: white; background: transparent; margin: 0; padding: 0; }
|
|
|
|
@font-face {
|
|
font-family: 'BrittanySignature';
|
|
src: url("{{ url_for('static', path='/BrittanySignature.woff2') }}") format('woff2');
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
font-display: swap; /* Verhindert unsichtbaren Text beim Laden */
|
|
}
|
|
|
|
.monat {
|
|
font-size: 25px;
|
|
font-weight: bold;
|
|
padding: 1.5ex 0.5em 0.5ex 0.5em;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
font-family: 'BrittanySignature', cursive, sans-serif;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
table-layout: fixed; /* Garantiert gleiches Alignment über mehrere Tabellen */
|
|
width: 100%;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
td {
|
|
padding: 0.5ex 0.5em;
|
|
font-size: 15px;
|
|
vertical-align: top;
|
|
white-space: nowrap;
|
|
/* border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2); */
|
|
}
|
|
|
|
/* tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, 0.1); } */
|
|
tr { background-color: rgba(255, 255, 255, 0.1); }
|
|
tr.week-spacer { border: none !important; background: transparent !important; height: 15px; }
|
|
|
|
/* Feste Prozentwerte für identische Spalten in allen Tabellen */
|
|
.col-wt { text-align: left; width: 9%; padding-right: 0; }
|
|
.col-date { text-align: right; width:14%; }
|
|
.col-time { text-align: right; width: 37%; }
|
|
.col-closed { text-align: center; }
|
|
|
|
.remarks-section { margin-top: 1ex; }
|
|
.remark-item { margin-top: 0ex; margin-bottom: 0.5ex; text-align: center; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
{% if test %}
|
|
<div style="width: 300px ; margin: 20px auto; padding: 10px; background: rgb(55, 55, 55); border-radius: 8px;">
|
|
{% endif %}
|
|
{% set monate = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %}
|
|
{% set ns = namespace(last_month=none, last_week=none) %}
|
|
|
|
{% for event in events %}
|
|
{% set current_month_name = monate[event.Datum.month - 1] %}
|
|
{% set current_week = event.Datum.isocalendar()[1] %}
|
|
|
|
{# Monatstitel und Tabellen-Start/Ende Logik #}
|
|
{% if current_month_name != ns.last_month %}
|
|
{% if ns.last_month is not none %} </table> {% endif %}
|
|
|
|
<div class="monat">{{ current_month_name }}</div>
|
|
<table>
|
|
{% set ns.last_week = none %} {# Reset Wochendistanz bei neuem Monat #}
|
|
{% endif %}
|
|
|
|
{# Wochen-Abstand innerhalb eines Monats #}
|
|
{% if ns.last_week is not none and current_week != ns.last_week %}
|
|
<tr class="week-spacer"><td colspan="4"></td></tr>
|
|
{% endif %}
|
|
|
|
<tr class="data-row">
|
|
<td class="col-wt">{{ event.Wochentag }}.</td>
|
|
<td class="col-date">{{ event.Datum.strftime('%d.%m.') }}</td>
|
|
|
|
{% if not event.Morgen and not event.Nachmittag %}
|
|
<td colspan="2" class="col-closed">geschlossen</td>
|
|
{% else %}
|
|
<td class="col-time">{{ event.Morgen }}</td>
|
|
<td class="col-time">{{ event.Nachmittag }}</td>
|
|
{% endif %}
|
|
</tr>
|
|
|
|
{% set ns.last_month = current_month_name %}
|
|
{% set ns.last_week = current_week %}
|
|
{% endfor %}
|
|
</table>
|
|
|
|
{% if remarks %}
|
|
<div class="remarks-section">
|
|
{% for r in remarks %}
|
|
<div class="remark-item">{{ r | safe }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if test %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
</html> |